summaryrefslogtreecommitdiffabout
path: root/scheme/idest/format/shortlist.scm
blob: a3d5bedaee0e88b969be8fd44af5d0815e0ce98c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
;; 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-public description
  "display title, artist name and year, on a single line")

(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

Return to:

Send suggestions and report system problems to the System administrator.