Source

pico-org / org-http.l

(load "@lib/http.l")
(load "org.l")
(load "picostache.l")

(de readLines (File)
	(filter '((X) X)(make
		(in File
 			 (until (eof)
				 (link (pack (line))))))))

(de passoc (Key Lst) (cadr (seek '((X) (= Key (car X))) Lst)))
(setq lookup passoc) #hack to override picostache to use plists

(de start() 
	(let (Html (pack (readLines "org-html.html"))
				TemplateTree (parse Html)
				Lines (readLines "example.org.bak")
				Org (org-parse Lines 0)
				Model (cons 'org (list Org)))

				(push 'Model '((X) (if View (renderTree (cons 'org (list (list View))) TemplateTree))))
				(push 'Model 'orgt)
				(prinl (renderTree Model TemplateTree))))

(de go ()
 (server 21000 "!start") )