diff options
author | Arun Isaac | 2022-03-15 15:08:15 +0530 |
---|---|---|
committer | Arun Isaac | 2022-03-15 15:13:08 +0530 |
commit | 7a8aaacf35bfc32e8f22cd24a34bb5955d7c2383 (patch) | |
tree | ba5a201a4201804954fa303236093788943424fb /bin | |
parent | 923d4977c6a4a29a777f3d442fa29ff7831874e6 (diff) | |
download | tissue-7a8aaacf35bfc32e8f22cd24a34bb5955d7c2383.tar.gz tissue-7a8aaacf35bfc32e8f22cd24a34bb5955d7c2383.tar.lz tissue-7a8aaacf35bfc32e8f22cd24a34bb5955d7c2383.zip |
bin: Add `tissue web' subcommand.
* bin/tissue: Import (tissue tissue) and (tissue web).
(tissue-web): New function.
(print-usage): Document web subcommand.
(main): Hook up web subcommand.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/tissue | 24 |
1 files changed, 23 insertions, 1 deletions
@@ -31,7 +31,9 @@ (ice-9 regex) (tissue conditions) (tissue issue) - (tissue utils)) + (tissue tissue) + (tissue utils) + (tissue web)) (define (invoke program . args) (unless (zero? (apply system* program args)) @@ -345,6 +347,24 @@ Show the text of issue #ISSUE-NUMBER. port))) (raise (issue-file-not-found-error issue-file))))))) +(define tissue-web + (match-lambda* + (("--help") + (format #t "Usage: ~a web OUTPUT-DIRECTORY +Export the repository as a website to OUTPUT-DIRECTORY. + +" + (command-line-program))) + ((output-directory) + (let ((config (load (string-append (call-with-input-pipe + get-line + "git" "rev-parse" "--show-toplevel") + "/tissue.scm")))) + (build-website output-directory + #:title (tissue-configuration-project config) + #:css (tissue-configuration-web-css config) + #:tags-path (tissue-configuration-web-tags-path config)))))) + (define (print-usage) (format #t "Usage: ~a COMMAND [OPTIONS] [ARGS] @@ -354,6 +374,7 @@ COMMAND must be one of the sub-commands listed below: edit edit an issue show show the text of an issue news list recent updates + web export repository as website To get usage information for one of these sub-commands, run ~a COMMAND --help @@ -378,6 +399,7 @@ To get usage information for one of these sub-commands, run ("list" tissue-list) ("edit" tissue-edit) ("show" tissue-show) + ("web" tissue-web) (invalid-command (format (current-error-port) "Invalid command `~a'~%~%" invalid-command) |