TOC to CSV
This commit is contained in:
parent
8b0fc2d7c9
commit
ee8262b21c
@ -214,6 +214,28 @@ songs =
|
|||||||
) "\n" )
|
) "\n" )
|
||||||
)))
|
)))
|
||||||
|
|
||||||
|
#(define (writeTOCtoCSV)
|
||||||
|
(let ((song-lines (map (lambda (song)
|
||||||
|
(list
|
||||||
|
(symbol->string (car song))
|
||||||
|
))
|
||||||
|
(alist-delete 'imagePage (alist-delete 'emptyPage song-list)))))
|
||||||
|
(call-with-output-file "toc.csv"
|
||||||
|
(lambda (port)
|
||||||
|
(csv-write (cons '("filename") song-lines) port))
|
||||||
|
)))
|
||||||
|
|
||||||
|
%% https://github.com/NalaGinrut/guile-csv/blob/master/csv/csv.scm
|
||||||
|
|
||||||
|
#(define* (sxml->csv sxml port #:key (delimiter #\,))
|
||||||
|
(let* ((d (string delimiter))
|
||||||
|
(csv (map (lambda (l) (string-join l d)) sxml)))
|
||||||
|
(for-each (lambda (l)
|
||||||
|
(format port "~a~%" l))
|
||||||
|
csv)))
|
||||||
|
|
||||||
|
#(define csv-write sxml->csv)
|
||||||
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
%% Include Images once and reference them:
|
%% Include Images once and reference them:
|
||||||
#(define bbox-regexp
|
#(define bbox-regexp
|
||||||
|
Loading…
Reference in New Issue
Block a user