diff options
author | EuAndreh <eu@euandre.org> | 2018-12-29 09:38:39 -0200 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2018-12-29 09:38:39 -0200 |
commit | 9934dd7fae3b881690df158b3f15a5f96c3aed72 (patch) | |
tree | e80ed6deab9006c8b5a20fdca8a912fade9c2746 /cli | |
parent | Add initial Racket CLI for handling scripts. (diff) | |
download | euandre.org-9934dd7fae3b881690df158b3f15a5f96c3aed72.tar.gz euandre.org-9934dd7fae3b881690df158b3f15a5f96c3aed72.tar.xz |
WIP: Use Perl instead of Racket for CLI.
Diffstat (limited to 'cli')
-rwxr-xr-x | cli | 43 |
1 files changed, 0 insertions, 43 deletions
@@ -1,43 +0,0 @@ -#!/usr/bin/env racket -#lang racket - -(define pastebin-verbose? (make-parameter #false)) -(define pastebin-title (make-parameter "")) -(define slide-verbose? (make-parameter #false)) - -(define subcommand - (command-line - #:program "website-cli" - #:args (subcommand . subcommand-options) - (match subcommand - ["pastebin" - (command-line - #:program "website-cli pastebin" - #:argv subcommand-options - #:multi - [("-v" "--verbose") "dunno" (pastebin-verbose? #true)] - [("-t" "--title") title "The title of the pastebin, will be slugified for creating the filename." (pastebin-title title)])] - ["slide" - (command-line - #:program "website-cli slide" - #:argv subcommand-options - #:usage-help - "woeifj ijfe" - #:multi - [("-v" "--verbose") "Turn on verbose mode" (slide-verbose? #false)] - #:help-labels - "oefijeifjeijfiejfijeij ijij" - #:ps "ps")] - [_ - (printf "Invalid subcommand: ~a\n" subcommand) - (exit 1)]) - subcommand)) - -(define out - (match subcommand - ["pastebin" - (system "./pastebin/new.sh")] - ["slide" - (system "./slides/new.sh")])) - -(exit (if out 0 1)) |