diff options
author | Case Duckworth | 2023-03-29 23:18:06 -0500 |
---|---|---|
committer | Case Duckworth | 2023-03-29 23:18:06 -0500 |
commit | 246b99687121b3863a931945aa2f3b259adb905a (patch) | |
tree | 773a760aae90b2a2fdd8c38ffec9e26e7d5949e1 /wikme.scm | |
parent | Initial commit (oops) (diff) | |
download | wikme-246b99687121b3863a931945aa2f3b259adb905a.tar.gz wikme-246b99687121b3863a931945aa2f3b259adb905a.zip |
Begin on executable
Diffstat (limited to 'wikme.scm')
-rw-r--r-- | wikme.scm | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/wikme.scm b/wikme.scm new file mode 100644 index 0000000..7f992a3 --- /dev/null +++ b/wikme.scm | |||
@@ -0,0 +1,39 @@ | |||
1 | ;;; wikme.scm --- build a wiki from a folder of markdown --- executable | ||
2 | |||
3 | (import (args) | ||
4 | (chicken process-context) | ||
5 | (chicken port)) | ||
6 | |||
7 | (include "src/wikme") | ||
8 | |||
9 | |||
10 | |||
11 | ;; (make-wiki base-url ; base URL for links | ||
12 | ;; origin-dir ; origin directory | ||
13 | ;; destination-dir ; destination directory | ||
14 | ;; page-template ; template for pages | ||
15 | ;; file-transformers ; list of filename transformers | ||
16 | ;; transformers ; list of source transformer functions | ||
17 | ;; pages ; list of <page>s | ||
18 | ;; ) | ||
19 | |||
20 | |||
21 | (define options | ||
22 | (list (args:make-option ))) | ||
23 | |||
24 | |||
25 | |||
26 | (define (usage) | ||
27 | (with-output-to-port (current-error-port) | ||
28 | (lambda () | ||
29 | (print "Usage: " (car (argv)) " [options...] [directory]") | ||
30 | (newline) | ||
31 | (print (args:usage options)))) | ||
32 | (exit 1)) | ||
33 | |||
34 | (define (main args) | ||
35 | (receive (options operands) | ||
36 | (args:parse args options) | ||
37 | #f)) | ||
38 | |||
39 | (main (command-line-arguments)) | ||