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: main.go
+33-10Lines changed: 33 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,14 @@ type page struct {
22
22
textstring
23
23
}
24
24
25
+
typeexportOptionsstruct {
26
+
graphPathstring
27
+
blogFolderstring
28
+
assetsRelativePathstring
29
+
webAssetsPathPrefixstring
30
+
unquotedProperties []string
31
+
}
32
+
25
33
/*
26
34
findMatchingFiles finds all files in rootPath that contain substring
27
35
ignoreRegexp is an expression that is evaluated on **relative** path of files within the graph (e.g. `.git/HEAD` or `logseq/.bkp/something.md`) if it matches, the file is not processed
if a mandatory argument is missing, parseOptions will print error message, program usage and exits with os.Exit(1)
77
+
*/
78
+
funcparseOptions() exportOptions {
67
79
graphPath:=flag.String("graphPath", "", "[MANDATORY] Folder where all public pages are exported.") // TODO rename graphPath -> graphFolder or maybe logseqFolder
68
80
blogFolder:=flag.String("blogFolder", "", "[MANDATORY] Folder where this program creates a new subfolder with public logseq pages.")
69
81
assetsRelativePath:=flag.String("assetsRelativePath", "logseq-images", "relative path within blogFolder where the assets (images) should be stored (e.g. 'static/images/logseq'). Default is `logseq-images`")
70
82
webAssetsPathPrefix:=flag.String("webAssetsPathPrefix", "/logseq-images", "path that the images are going to be served on on the web (e.g. '/public/images/logseq'). Default is `/logseq-images`")
71
-
unquotedProperties:=flag.String("unquotedProperties", "", "comma-separated list of logseq page properties that won't be quoted in the markdown front matter, e.g. 'date,public,slug")
83
+
rawUnquotedProperties:=flag.String("unquotedProperties", "", "comma-separated list of logseq page properties that won't be quoted in the markdown front matter, e.g. 'date,public,slug")
0 commit comments