Command line interface to abcddb-tool
authorClinton Ebadi <clinton@unknownlamer.org>
Thu, 12 Dec 2013 20:32:31 +0000 (15:32 -0500)
committerClinton Ebadi <clinton@unknownlamer.org>
Thu, 12 Dec 2013 20:32:31 +0000 (15:32 -0500)
Punts to `cddb-tool' for commands other than parse

abcddb-tool

index 334486b..414839d 100755 (executable)
@@ -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