Commits

Joe Bogner committed 38afc68

cleanup and retab

  • Participants
  • Parent commits d64c1d9

Comments (0)

Files changed (2)

 (load "picostache.l")
 
 (de readLines (File)
-	(filter '((X) X)(make
-		(in File
- 			 (until (eof)
-				 (link (pack (line))))))))
+	(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)))
+         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))))
+         (push 'Model '((X) (if View (renderTree (cons 'org (list (list View))) TemplateTree))))
+         (push 'Model 'orgt)
+         (prinl (renderTree Model TemplateTree))))
 
 (de go ()
  (server 21000 "!start") )
-
 (de collectUntil (Lst Func)
 	(let (Ret NIL) (find '((X) (if (Func X) T (push 'Ret X) NIL)) Lst) (reverse Ret)))
 
 				 (setq Lines (cdr Lines)))))
        (reverse Lst)))
 
-(de testing ()
-	(setq Lines '("* ABC" "blah" "blah" "* foo"))
-	(setq Lines '("* h1" "blah blah blah" "more" "** h1-1" "body" "* h2" "** h2-1" "asdfasdf" "* h3"))
-	(setq Lines '("* h1" "blah blah blah" "more" "** h1-1" "body2" "*** h3" "more body"))
-
-	(setq Org (org-parse Lines 0))
-	(printsp Org)
-
-
-	(load "picostache.l")
-
-	(setq Lines (make
-	(in "example.org.bak"
-	 (until (eof)
-		 (link (pack (line)))))))
-
-	(setq Org (org-parse Lines 0))
-	(de passoc (Key Lst) (cadr (seek '((X) (= Key (car X))) Lst)))
-	(setq lookup passoc)
-
-	(setq Model (cons 'org (list Org)))
-	(setq Model (cons '((X) (if View (renderTree (cons 'org (list (list View))) *Tree))) Model))
-	(setq Model (cons 'orgt  Model))
-
-	(printsp Org)
-	(prinl)
-	(prinl)
-	(setq *Tree (parse "{{#org}}{{name}}^J{{#body}}{{.}}^J{{/body}}{{#children}}{{#orgt}}{{/orgt}} ^J{{/children}}{{/org}}"))
-	# (setq *Tree (parse "{{#org}}{{name}}^J{{{#children}}{{#orgt}}{{/#orgt}} ^j{{/children}}{{/org}}"))
-	(setq *Tree (parse "{{#org}}HEADING!!!  -- level {{level}} {{name}}^J{{#body}}{{.}}^J{{/body}}{{#children}}{{#orgt}}{{/orgt}}{{/children}}{{/org}}"))
-	# (setq *Tree '((Section "org" (Name "name") (Text "^J") (Section "body" (Name ".") (Text "^J")) (Section "children" (Section "orgt")))))
-	(prinl (renderTree Model *Tree)))