aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxj92019-10-29 06:45:43 -0600
committerxj92019-10-29 06:45:43 -0600
commita2ceff6825bcb3b13b78bcef665d1c7e51901b4b (patch)
tree7f6ac238a85b4b7eba5dae338271962445462872
parente32f9dcc6d1be3fada43d1da391fdd84ec1890c6 (diff)
downloadtracker-format-a2ceff6825bcb3b13b78bcef665d1c7e51901b4b.tar.gz
tracker-format-a2ceff6825bcb3b13b78bcef665d1c7e51901b4b.tar.xz
basic render module
-rw-r--r--render.scm30
1 files changed, 13 insertions, 17 deletions
diff --git a/render.scm b/render.scm
index d326cc8..d08d4de 100644
--- a/render.scm
+++ b/render.scm
@@ -1,19 +1,15 @@
-(import (chicken io))
-(import (sxml-transforms))
-(import lowdown)
-
-(define parse-file
- (lambda (file-name)
- (markdown->sxml (call-with-input-file
+(import hahn)
+(module tracker-format (markdown-file->html)
+ (import scheme)
+ (import (chicken io))
+ (import sxml-transforms)
+ (import lowdown)
+ (define (parse-markdown-file file-name)
+ (markdown->sxml (call-with-input-file
file-name
(lambda (port)
- (read-string #f port))))))
-(define render
- (lambda (file-name)
- (let ((parsed (parse-file file-name)))
- (SXML->HTML parsed))))
-
-(define main
- (lambda (args . b)
- (let ((file-name (car args)))
- (render file-name))))
+ (read-string #f port)))))
+ (define (markdown-file->html file-name)
+ @("render a markdown file to html")
+ (let ((parsed (parse-markdown-file file-name)))
+ (SXML->HTML parsed))))