From: Clinton Ebadi Date: Thu, 12 Dec 2013 20:32:31 +0000 (-0500) Subject: Command line interface to abcddb-tool X-Git-Url: https://git.hcoop.net/clinton/abcde.git/commitdiff_plain/27e5be1d838b3e0586bb076708eebdd28bb8f971 Command line interface to abcddb-tool Punts to `cddb-tool' for commands other than parse --- diff --git a/abcddb-tool b/abcddb-tool index 334486b..414839d 100755 --- a/abcddb-tool +++ b/abcddb-tool @@ -133,6 +133,13 @@ of (disc-number . tag-value)" (map (lambda (ttitle) (list (1+ (first ttitle)) (escape-for-shell (second ttitle)))) (cddb-query-tracks cddb 'TITLE))))) +(define (main args) + (cond ((string= (second args) "parse") + (call-with-input-file (third args) + (lambda (f) (cddb->export (read-cddb f))))) + (else + (apply execlp "cddb-tool" args)))) - +(when (batch-mode?) + (exit (main (program-arguments)))) \ No newline at end of file