You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main.go
+27-7Lines changed: 27 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
package main
2
2
3
3
import (
4
+
"fmt"
4
5
"github.com/alecthomas/kong"
5
6
"github.com/hauke96/sigolo"
6
7
"os"
@@ -19,15 +20,17 @@ import (
19
20
"wiki2book/util"
20
21
)
21
22
23
+
constVERSION="v0.1.0"
22
24
constRFC1123Millis="Mon, 02 Jan 2006 15:04:05.999 MST"
23
25
24
26
varclistruct {
25
-
Loggingstring`help:"Logging verbosity. Possible values: debug, trace" short:"l"`
26
-
DiagnosticsProfilingbool`help:"Enable profiling and write results to ./profiling.prof."`
27
-
DiagnosticsTracebool`help:"Enable tracing to analyse memory usage and write results to ./trace.out."`
28
-
ForceRegenerateHtmlbool`help:"Forces wiki2book to recreate HTML files even if they exists from a previous run." short:"r"`
29
-
SvgSizeToViewboxbool`help:"Sets the 'width' and 'height' property of an SimpleSvgAttributes image to its viewbox width and height. This might fix wrong SVG sizes on some eBook-readers."`
30
-
Configstring`help:"The path to the overall application config. If not specified, default values are used." type:"existingfile" short:"c" placeholder:"<file>"`
27
+
Loggingstring`help:"Logging verbosity. Possible values: debug, trace" short:"l"`
28
+
DiagnosticsProfilingbool`help:"Enable profiling and write results to ./profiling.prof."`
29
+
DiagnosticsTracebool`help:"Enable tracing to analyse memory usage and write results to ./trace.out."`
30
+
ForceRegenerateHtmlbool`help:"Forces wiki2book to recreate HTML files even if they exists from a previous run." short:"r"`
31
+
SvgSizeToViewboxbool`help:"Sets the 'width' and 'height' property of an SimpleSvgAttributes image to its viewbox width and height. This might fix wrong SVG sizes on some eBook-readers."`
32
+
Configstring`help:"The path to the overall application config. If not specified, default values are used." type:"existingfile" short:"c" placeholder:"<file>"`
33
+
VersionVersionFlag`help:"Print version information and quit" name:"version" short:"v"`
31
34
Standalonestruct {
32
35
Filestring`help:"A mediawiki file tha should be rendered to an eBook." arg:""`
33
36
OutputFilestring`help:"The path to the EPUB-file." short:"o" default:"ebook.epub" placeholder:"<file>"`
@@ -53,8 +56,25 @@ var cli struct {
53
56
} `cmd:"" help:"Renders a single article into an eBook."`
0 commit comments