pandoc/pandoc.sld

46 lines
1.1 KiB
Plaintext
Raw Normal View History

2021-08-24 14:03:49 -04:00
(define-library (pandoc)
2021-09-05 05:50:52 -04:00
(export
pandoc-json->sxml
pandoc-port->json
pandoc-port->sxml
pandoc-file->json
pandoc-file->sxml
pandoc-files->json
pandoc-files->sxml
pandoc-bytevector->json
pandoc-bytevector->sxml
pandoc-bytevectors->json
pandoc-bytevectors->sxml
pandoc-string->json
pandoc-string->sxml
pandoc-strings->json
pandoc-strings->sxml)
2021-08-24 14:03:49 -04:00
(import (scheme base)
(scheme file)
(scheme write))
(cond-expand
2021-09-05 05:50:52 -04:00
(gauche (import (only (srfi 180) json-read)
(only (gauche base) copy-port)
(only (gauche process) call-with-process-io))))
2021-08-24 14:03:49 -04:00
(cond-expand
2021-09-05 05:50:52 -04:00
(gauche (include "pandoc.gauche.scm")))
(begin (define inexact->exact exact)
(define (call-with-binary-input-file filename proc)
(call-with-port (open-binary-input-file filename) proc))
(define (read-bytevector-all binary-input-port)
(let loop ((whole (bytevector)))
(let ((part (read-bytevector 1000)))
(if (eof-object? part) whole
(loop (bytevector-append whole part)))))))
2021-08-24 14:03:49 -04:00
(include "pandoc.r5rs.scm"))