#!/usr/bin/csi -ns (use chicken-syntax hyde matchable) (define usage #< Commands are: hyde init Initializes a site in the current directory. hyde new [ ...] Creates a new page with the given page type and title. The page's filename will be inferred from the given title by downcasing it and replacing spaces with dashes. hyde serve Serves the current site with spiffy, (re-)compiling the site on each request (useful for development). hyde Compiles the current site. END ) (match (command-line-arguments) (("init") (initialize-site)) (("new" ext . args) (load-hyde-file) (generate-page ext args)) (("serve") (load-hyde-file) (serve)) (() (if (load-hyde-file) (compile-pages) (begin (print "no hyde.scm found") (print usage) (exit 1)))) ((command) (printf "Unknown command '~a'~%" command) (print usage) (exit 1)))