|
|
|
@ -7,12 +7,12 @@
|
|
|
|
;; it under the terms of the GNU Lesser General Public License as
|
|
|
|
;; it under the terms of the GNU Lesser General Public License as
|
|
|
|
;; published by the Free Software Foundation; either version 3 of the
|
|
|
|
;; published by the Free Software Foundation; either version 3 of the
|
|
|
|
;; License, or (at your option) any later version.
|
|
|
|
;; License, or (at your option) any later version.
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
;; This program is distributed in the hope that it will be useful, but
|
|
|
|
;; This program is distributed in the hope that it will be useful, but
|
|
|
|
;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
;; Lesser General Public License for more details.
|
|
|
|
;; Lesser General Public License for more details.
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
;; You should have received a copy of the GNU Lesser General Public
|
|
|
|
;; You should have received a copy of the GNU Lesser General Public
|
|
|
|
;; License along with this program; if not, contact:
|
|
|
|
;; License along with this program; if not, contact:
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
@ -95,7 +95,7 @@
|
|
|
|
(let* ((line (map list header (car rest)))
|
|
|
|
(let* ((line (map list header (car rest)))
|
|
|
|
(r (string->symbol (format #f "record-~a" n))))
|
|
|
|
(r (string->symbol (format #f "record-~a" n))))
|
|
|
|
(lp (cdr rest) (cons (list r line) result) (1+ n))))))))
|
|
|
|
(lp (cdr rest) (cons (list r line) result) (1+ n))))))))
|
|
|
|
|
|
|
|
|
|
|
|
(define* (sxml->csv sxml port #:key (delimiter #\,))
|
|
|
|
(define* (sxml->csv sxml port #:key (delimiter #\,))
|
|
|
|
(let* ((d (string delimiter))
|
|
|
|
(let* ((d (string delimiter))
|
|
|
|
(csv (map (lambda (l) (string-join l d)) sxml)))
|
|
|
|
(csv (map (lambda (l) (string-join l d)) sxml)))
|
|
|
|
|