diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-07-20 12:14:30 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-07-20 12:14:30 +0300 |
commit | 69751df3b8f70a6e62f497a8870d81d5d1e14aa4 (patch) | |
tree | 85c3f2cf2d4bb091c910cc64ddb408b26f5c3e7d /scheme/idest/format | |
parent | b6aabc9c0877eb5c209244a93627ae232cf71d4d (diff) | |
download | idest-69751df3b8f70a6e62f497a8870d81d5d1e14aa4.tar.gz idest-69751df3b8f70a6e62f497a8870d81d5d1e14aa4.tar.bz2 |
Implement --format option.
* Makefile.am (SUBDIRS): Add scheme (conditionally).
* configure.ac (IDEST_COND_GUILE): New condition.
* examples/dry-run.scm: Move to scheme.
* examples/Makefile.am: Update.
* src/Makefile.am (AM_CPPFLAGS): Add VERSION_SITE.
* src/cmdline.opt: New options --format and --load-path.
* src/editem.c (str_split_col): Remove static qualifier.
* src/guile.c (guile_add_load_path): New function.
(load_startup_file): Flush user additions to the load path.
Add VERSION_SITE at the beginning.
* src/idest.h (list_supported_frames)
(str_split_col,guile_add_load_path): New protos.
* src/main.c (format_name): New global.
(main): Handle --format option.
* scheme/dry-run.scm: New file (from examples)
* scheme/format.scm: New file.
* scheme/idest/format/shortlist.scm: New file.
Diffstat (limited to 'scheme/idest/format')
-rw-r--r-- | scheme/idest/format/shortlist.scm | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/scheme/idest/format/shortlist.scm b/scheme/idest/format/shortlist.scm new file mode 100644 index 0000000..fb83036 --- /dev/null +++ b/scheme/idest/format/shortlist.scm @@ -0,0 +1,22 @@ +;; shortlist.scm - List file name, artist and year, on a single line. +;; Copyright (C) 2011 Sergey Poznyakoff +;; License GPLv3+: GNU GPL version 3 or later +;; <http://gnu.org/licenses/gpl.html> +;; This is free software: you are free to change and redistribute it. +;; There is NO WARRANTY, to the extent permitted by law. + +(define-module (idest format shortlist)) + +(define (get-frame code frames) + (or (assoc-ref + (or (assoc-ref frames code) '()) + 'text) + "unknown")) + +(define-public (idest-main name frames) + (format #t "~A: ~A by ~A, ~A~%" + name + (get-frame "TIT2" frames) ; Title + (get-frame "TPE1" frames) ; Artist + (get-frame "TDRC" frames))) ; Year + |