|
|
@ -1,5 +1,5 @@
|
|
|
|
#lang racket/base
|
|
|
|
#lang racket/base
|
|
|
|
(require racket/contract racket/match xml/path)
|
|
|
|
(require racket/contract racket/match xml/path racket/bool)
|
|
|
|
(require "tools.rkt" "world.rkt" "debug.rkt" "decode.rkt")
|
|
|
|
(require "tools.rkt" "world.rkt" "debug.rkt" "decode.rkt")
|
|
|
|
|
|
|
|
|
|
|
|
(module+ test (require rackunit))
|
|
|
|
(module+ test (require rackunit))
|
|
|
@ -19,7 +19,7 @@
|
|
|
|
(directory-pathish? . -> . ptree?)
|
|
|
|
(directory-pathish? . -> . ptree?)
|
|
|
|
(let ([files (map remove-ext (filter (λ(x) (has-ext? x POLLEN_DECODER_EXT)) (directory-list dir)))])
|
|
|
|
(let ([files (map remove-ext (filter (λ(x) (has-ext? x POLLEN_DECODER_EXT)) (directory-list dir)))])
|
|
|
|
(message "Generating ptree from file listing")
|
|
|
|
(message "Generating ptree from file listing")
|
|
|
|
(ptree-root->ptree (cons POLLEN_TREE_ROOT_NAME (map path->name files)))))
|
|
|
|
(ptree-root->ptree (cons POLLEN_TREE_ROOT_NAME files))))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; Try loading from ptree file, or failing that, synthesize ptree.
|
|
|
|
;; Try loading from ptree file, or failing that, synthesize ptree.
|
|
|
@ -30,33 +30,22 @@
|
|
|
|
(ptree-source->ptree ptree-source)
|
|
|
|
(ptree-source->ptree ptree-source)
|
|
|
|
(directory->ptree project-dir)))
|
|
|
|
(directory->ptree project-dir)))
|
|
|
|
|
|
|
|
|
|
|
|
;; remove parents from tree (i.e., just remove attrs)
|
|
|
|
|
|
|
|
;; is not the inverse of add-parents, i.e., you do not get back your original input.
|
|
|
|
|
|
|
|
(define/contract (remove-parents mt)
|
|
|
|
|
|
|
|
(ptree? . -> . tagged-xexpr?)
|
|
|
|
|
|
|
|
(remove-attrs mt))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(module+ test
|
|
|
|
|
|
|
|
(check-equal? (remove-parents
|
|
|
|
|
|
|
|
`(ptree-main ((,POLLEN_TREE_PARENT_NAME "")) (foo ((,POLLEN_TREE_PARENT_NAME ""))) (bar ((,POLLEN_TREE_PARENT_NAME ""))) (one ((,POLLEN_TREE_PARENT_NAME "")) (two ((,POLLEN_TREE_PARENT_NAME "one")) (three ((,POLLEN_TREE_PARENT_NAME "two")))))))
|
|
|
|
|
|
|
|
'(ptree-main (foo) (bar) (one (two (three))))))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(module+ test
|
|
|
|
(module+ test
|
|
|
|
(let ([sample-main `(POLLEN_TREE_ROOT_NAME "foo" "bar" (one (two "three")))])
|
|
|
|
(let ([sample-main `(POLLEN_TREE_ROOT_NAME "foo" "bar" (one (two "three")))])
|
|
|
|
(check-equal? (ptree-root->ptree sample-main)
|
|
|
|
(check-equal? (ptree-root->ptree sample-main)
|
|
|
|
`(POLLEN_TREE_ROOT_NAME ((,POLLEN_TREE_PARENT_NAME "")) (foo ((,POLLEN_TREE_PARENT_NAME "POLLEN_TREE_ROOT_NAME"))) (bar ((,POLLEN_TREE_PARENT_NAME "POLLEN_TREE_ROOT_NAME"))) (one ((,POLLEN_TREE_PARENT_NAME "POLLEN_TREE_ROOT_NAME")) (two ((,POLLEN_TREE_PARENT_NAME "one")) (three ((,POLLEN_TREE_PARENT_NAME "two")))))))))
|
|
|
|
`(POLLEN_TREE_ROOT_NAME "foo" "bar" (one (two "three"))))))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; return the parent of a given name
|
|
|
|
;; return the parent of a given name
|
|
|
|
(define/contract (parent name [ptree current-ptree])
|
|
|
|
(define/contract (parent name [ptree current-ptree])
|
|
|
|
((ptree-name?) (ptree?) . ->* . (or/c string? boolean?))
|
|
|
|
((ptree-name?) (ptree?) . ->* . (or/c ptree-name? false?))
|
|
|
|
(and name (let ([result (se-path* `(,(->symbol name) #:parent) ptree)])
|
|
|
|
(and name
|
|
|
|
(and result (->string result))))) ; se-path* returns #f if nothing found
|
|
|
|
(if (member (->string name) (map (λ(x) (->string (if (list? x) (car x) x))) (cdr ptree)))
|
|
|
|
|
|
|
|
(->string (car ptree))
|
|
|
|
|
|
|
|
(ormap (λ(x) (parent name x)) (filter list? ptree)))))
|
|
|
|
|
|
|
|
|
|
|
|
(define ptree-parent parent)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(module+ test
|
|
|
|
(module+ test
|
|
|
|
(define test-ptree-main `(ptree-main "foo" "bar" (one (two "three"))))
|
|
|
|
(define test-ptree-main `(ptree-main "foo" "bar" (one (two "three"))))
|
|
|
@ -66,14 +55,13 @@
|
|
|
|
(check-false (parent 'nonexistent-name test-ptree)))
|
|
|
|
(check-false (parent 'nonexistent-name test-ptree)))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; get children of a particular name
|
|
|
|
; get children of a particular name
|
|
|
|
(define/contract (children name [ptree current-ptree])
|
|
|
|
(define/contract (children name [ptree current-ptree])
|
|
|
|
((ptree-name?) (ptree?) . ->* . (or/c list? boolean?))
|
|
|
|
((ptree-name?) (ptree?) . ->* . (or/c (listof ptree-name?) false?))
|
|
|
|
;; se-path*/list returns '() if nothing found
|
|
|
|
(and name
|
|
|
|
(and name (let ([children (se-path*/list `(,(->symbol name)) ptree)])
|
|
|
|
(if (equal? (->string name) (->string (car ptree)))
|
|
|
|
; If there are sublists, just take first name
|
|
|
|
(map (λ(x) (->string (if (list? x) (car x) x))) (cdr ptree))
|
|
|
|
(and (not (empty? children)) (map (λ(i) (->string (if (list? i) (car i) i))) children)))))
|
|
|
|
(ormap (λ(x) (children name x)) (filter list? ptree)))))
|
|
|
|
|
|
|
|
|
|
|
|
(module+ test
|
|
|
|
(module+ test
|
|
|
|
(check-equal? (children 'one test-ptree) (list "two"))
|
|
|
|
(check-equal? (children 'one test-ptree) (list "two"))
|
|
|
@ -86,9 +74,10 @@
|
|
|
|
(define/contract (siblings name [ptree current-ptree])
|
|
|
|
(define/contract (siblings name [ptree current-ptree])
|
|
|
|
;; this never returns false: name is always a sibling of itself.
|
|
|
|
;; this never returns false: name is always a sibling of itself.
|
|
|
|
;; todo: how to use input value in contract? e.g., to check that name is part of output list
|
|
|
|
;; todo: how to use input value in contract? e.g., to check that name is part of output list
|
|
|
|
((ptree-name?) (ptree?) . ->* . (or/c list? boolean?))
|
|
|
|
((ptree-name?) (ptree?) . ->* . (or/c (listof string?) false?))
|
|
|
|
(children (parent name ptree) ptree))
|
|
|
|
(children (parent name ptree) ptree))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(module+ test
|
|
|
|
(module+ test
|
|
|
|
(check-equal? (siblings 'one test-ptree) '("foo" "bar" "one"))
|
|
|
|
(check-equal? (siblings 'one test-ptree) '("foo" "bar" "one"))
|
|
|
|
(check-equal? (siblings 'foo test-ptree) '("foo" "bar" "one"))
|
|
|
|
(check-equal? (siblings 'foo test-ptree) '("foo" "bar" "one"))
|
|
|
@ -98,8 +87,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(define/contract (siblings-split name [ptree current-ptree])
|
|
|
|
(define/contract (siblings-split name [ptree current-ptree])
|
|
|
|
((ptree-name?) (ptree?) . ->* . (values (or/c (listof ptree-name?) boolean?)
|
|
|
|
((ptree-name?) (ptree?) . ->* . (values (or/c (listof ptree-name?) false?)
|
|
|
|
(or/c (listof ptree-name?) boolean?)))
|
|
|
|
(or/c (listof ptree-name?) false?)))
|
|
|
|
(let-values ([(left right) (splitf-at (siblings name ptree)
|
|
|
|
(let-values ([(left right) (splitf-at (siblings name ptree)
|
|
|
|
(λ(e) (not (equal? (->string e) (->string name)))))])
|
|
|
|
(λ(e) (not (equal? (->string e) (->string name)))))])
|
|
|
|
(values (if (empty? left) #f left) (if (empty? (cdr right)) #f (cdr right)))))
|
|
|
|
(values (if (empty? left) #f left) (if (empty? (cdr right)) #f (cdr right)))))
|
|
|
@ -128,9 +117,10 @@
|
|
|
|
(check-equal? (siblings-right 'foo test-ptree) '("bar" "one")))
|
|
|
|
(check-equal? (siblings-right 'foo test-ptree) '("bar" "one")))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; get name immediately to the left in tree
|
|
|
|
;; get name immediately to the left in tree
|
|
|
|
(define/contract (sibling-previous name [ptree current-ptree])
|
|
|
|
(define/contract (sibling-previous name [ptree current-ptree])
|
|
|
|
((ptree-name?) (ptree?) . ->* . (or/c string? boolean?))
|
|
|
|
((ptree-name?) (ptree?) . ->* . (or/c ptree-name? false?))
|
|
|
|
(let ([siblings (siblings-left name ptree)])
|
|
|
|
(let ([siblings (siblings-left name ptree)])
|
|
|
|
(and siblings (last siblings))))
|
|
|
|
(and siblings (last siblings))))
|
|
|
|
|
|
|
|
|
|
|
@ -140,7 +130,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
;; get name immediately to the right in tree
|
|
|
|
;; get name immediately to the right in tree
|
|
|
|
(define/contract (sibling-next name [ptree current-ptree])
|
|
|
|
(define/contract (sibling-next name [ptree current-ptree])
|
|
|
|
((ptree-name?) (ptree?) . ->* . (or/c string? boolean?))
|
|
|
|
((ptree-name?) (ptree?) . ->* . (or/c ptree-name? false?))
|
|
|
|
(let ([siblings (siblings-right name ptree)])
|
|
|
|
(let ([siblings (siblings-right name ptree)])
|
|
|
|
(and siblings (first siblings))))
|
|
|
|
(and siblings (first siblings))))
|
|
|
|
|
|
|
|
|
|
|
@ -153,14 +143,16 @@
|
|
|
|
(define/contract (all-names [ptree current-ptree])
|
|
|
|
(define/contract (all-names [ptree current-ptree])
|
|
|
|
(ptree? . -> . (listof string?))
|
|
|
|
(ptree? . -> . (listof string?))
|
|
|
|
; use cdr to get rid of root tag at front
|
|
|
|
; use cdr to get rid of root tag at front
|
|
|
|
(map ->string (cdr (flatten (remove-parents ptree)))))
|
|
|
|
(map ->string (cdr (flatten ptree))))
|
|
|
|
|
|
|
|
|
|
|
|
(module+ test
|
|
|
|
(module+ test
|
|
|
|
(check-equal? (all-names test-ptree) '("foo" "bar" "one" "two" "three")))
|
|
|
|
(check-equal? (all-names test-ptree) '("foo" "bar" "one" "two" "three")))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; helper function for get-previous-names and get-next-names
|
|
|
|
;; helper function for get-previous-names and get-next-names
|
|
|
|
(define/contract (adjacent-names side name [ptree current-ptree])
|
|
|
|
(define/contract (adjacent-names side name [ptree current-ptree])
|
|
|
|
((symbol? ptree-name?) (ptree?) . ->* . (or/c list? boolean?))
|
|
|
|
((symbol? ptree-name?) (ptree?) . ->* . (or/c (listof ptree-name?) false?))
|
|
|
|
(let ([result ((if (equal? side 'left)
|
|
|
|
(let ([result ((if (equal? side 'left)
|
|
|
|
takef
|
|
|
|
takef
|
|
|
|
takef-right) (all-names ptree)
|
|
|
|
takef-right) (all-names ptree)
|
|
|
@ -175,7 +167,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
;; get sequence of earlier names
|
|
|
|
;; get sequence of earlier names
|
|
|
|
(define/contract (ptree-previous* name [ptree current-ptree])
|
|
|
|
(define/contract (ptree-previous* name [ptree current-ptree])
|
|
|
|
((ptree-name?) (ptree?) . ->* . (or/c list? boolean?))
|
|
|
|
((ptree-name?) (ptree?) . ->* . (or/c (listof ptree-name?) false?))
|
|
|
|
(adjacent-names 'left name ptree))
|
|
|
|
(adjacent-names 'left name ptree))
|
|
|
|
|
|
|
|
|
|
|
|
(module+ test
|
|
|
|
(module+ test
|
|
|
@ -184,9 +176,11 @@
|
|
|
|
(check-false (ptree-previous* 'foo test-ptree)))
|
|
|
|
(check-false (ptree-previous* 'foo test-ptree)))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; get sequence of next names
|
|
|
|
;; get sequence of next names
|
|
|
|
(define (ptree-next* name [ptree current-ptree])
|
|
|
|
(define (ptree-next* name [ptree current-ptree])
|
|
|
|
((ptree-name?) (ptree?) . ->* . (or/c list? boolean?))
|
|
|
|
((ptree-name?) (ptree?) . ->* . (or/c (listof ptree-name?) false?))
|
|
|
|
(adjacent-names 'right name ptree))
|
|
|
|
(adjacent-names 'right name ptree))
|
|
|
|
|
|
|
|
|
|
|
|
(module+ test
|
|
|
|
(module+ test
|
|
|
@ -196,7 +190,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
;; get name immediately previous
|
|
|
|
;; get name immediately previous
|
|
|
|
(define/contract (ptree-previous name [ptree current-ptree])
|
|
|
|
(define/contract (ptree-previous name [ptree current-ptree])
|
|
|
|
((ptree-name?) (ptree?) . ->* . (or/c string? boolean?))
|
|
|
|
((ptree-name?) (ptree?) . ->* . (or/c ptree-name? false?))
|
|
|
|
(let ([result (ptree-previous* name ptree)])
|
|
|
|
(let ([result (ptree-previous* name ptree)])
|
|
|
|
(and result (last result))))
|
|
|
|
(and result (last result))))
|
|
|
|
|
|
|
|
|
|
|
@ -207,7 +201,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
;; get name immediately next
|
|
|
|
;; get name immediately next
|
|
|
|
(define (ptree-next name [ptree current-ptree])
|
|
|
|
(define (ptree-next name [ptree current-ptree])
|
|
|
|
((ptree-name?) (ptree?) . ->* . (or/c string? boolean?))
|
|
|
|
((ptree-name?) (ptree?) . ->* . (or/c ptree-name? false?))
|
|
|
|
(let ([result (ptree-next* name ptree)])
|
|
|
|
(let ([result (ptree-next* name ptree)])
|
|
|
|
(and result (first result))))
|
|
|
|
(and result (first result))))
|
|
|
|
|
|
|
|
|
|
|
@ -216,27 +210,17 @@
|
|
|
|
(check-equal? (ptree-next 'one test-ptree) "two")
|
|
|
|
(check-equal? (ptree-next 'one test-ptree) "two")
|
|
|
|
(check-false (ptree-next 'three test-ptree)))
|
|
|
|
(check-false (ptree-next 'three test-ptree)))
|
|
|
|
|
|
|
|
|
|
|
|
;; convert path to name
|
|
|
|
|
|
|
|
;; used for converting "here" values to names
|
|
|
|
|
|
|
|
(define/contract (path->name x)
|
|
|
|
|
|
|
|
(pathish? . -> . ptree-name?)
|
|
|
|
|
|
|
|
(->string (remove-all-ext (last (explode-path (->path x))))))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(module+ test
|
|
|
|
|
|
|
|
(check-equal? (path->name "bar") "bar")
|
|
|
|
|
|
|
|
(check-equal? (path->name "foo/bar") "bar")
|
|
|
|
|
|
|
|
(check-equal? (path->name "foo/bar.html") "bar")
|
|
|
|
|
|
|
|
(check-equal? (path->name "/Users/this/that/foo/bar.html.pp") "bar"))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(define here->name path->name)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(define/contract (name->url name [files current-url-context])
|
|
|
|
(define/contract (name->url name [files current-url-context])
|
|
|
|
((ptree-name?) ((listof pathish?)) . ->* . (or/c string? boolean?))
|
|
|
|
((ptree-name?) ((listof pathish?)) . ->* . (or/c ptree-name? false?))
|
|
|
|
;; upconvert all files to their output path
|
|
|
|
;; upconvert all files to their output path
|
|
|
|
;; then remove duplicates because some sources might have already been rendered
|
|
|
|
;; then remove duplicates because some sources might have already been rendered
|
|
|
|
(define output-paths (remove-duplicates (map ->output-path files) equal?))
|
|
|
|
(define output-paths (remove-duplicates (map ->output-path files) equal?))
|
|
|
|
;; find ones that match name
|
|
|
|
;; find ones that match name
|
|
|
|
(define matching-paths (filter (λ(x) (equal? (path->name x) (->string name))) output-paths))
|
|
|
|
(define matching-paths (filter (λ(x) (equal? (->string x) (->string name))) output-paths))
|
|
|
|
|
|
|
|
|
|
|
|
(cond
|
|
|
|
(cond
|
|
|
|
[((len matching-paths) . = . 1) (->string (car matching-paths))]
|
|
|
|
[((len matching-paths) . = . 1) (->string (car matching-paths))]
|
|
|
@ -248,38 +232,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
(module+ test
|
|
|
|
(module+ test
|
|
|
|
(define files '("foo.html" "bar.html" "bar.html.p" "zap.html" "zap.xml"))
|
|
|
|
(define files '("foo.html" "bar.html" "bar.html.p" "zap.html" "zap.xml"))
|
|
|
|
(check-equal? (name->url 'foo files) "foo.html")
|
|
|
|
(check-equal? (name->url 'foo.html files) "foo.html")
|
|
|
|
(check-equal? (name->url 'bar files) "bar.html")
|
|
|
|
(check-equal? (name->url 'bar.html files) "bar.html")
|
|
|
|
;; (check-equal? (name->url 'zap files) 'error) ;; todo: how to test error?
|
|
|
|
;; (check-equal? (name->url 'zap files) 'error) ;; todo: how to test error?
|
|
|
|
(check-false (name->url 'hee files)))
|
|
|
|
(check-false (name->url 'hee files)))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; recursively processes tree, converting tree locations & their parents into xexprs of this shape:
|
|
|
|
|
|
|
|
;; '(location ((parent "parent")))
|
|
|
|
|
|
|
|
(define/contract (add-parents x [parent empty])
|
|
|
|
|
|
|
|
((tagged-xexpr?) (xexpr-tag?) . ->* . ptree?)
|
|
|
|
|
|
|
|
(match x
|
|
|
|
|
|
|
|
;; this pattern signifies next level in hierarchy
|
|
|
|
|
|
|
|
;; where first element is new parent, and rest are children.
|
|
|
|
|
|
|
|
[(list (? xexpr-tag? next-parent) children ...)
|
|
|
|
|
|
|
|
(let-values ([(tag attr _) (break-tagged-xexpr (add-parents next-parent parent))])
|
|
|
|
|
|
|
|
;; xexpr with tag as name, parent as attr, children as elements with tag as next parent
|
|
|
|
|
|
|
|
(make-tagged-xexpr tag attr (map (λ(c) (add-parents c tag)) children)))]
|
|
|
|
|
|
|
|
;; single map entry: convert to xexpr with parent
|
|
|
|
|
|
|
|
[else (make-tagged-xexpr (->symbol x) (make-xexpr-attr POLLEN_TREE_PARENT_NAME (->string parent)))]))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; this sets default input for following functions
|
|
|
|
;; this sets default input for following functions
|
|
|
|
(define/contract (ptree-root->ptree tx)
|
|
|
|
(define/contract (ptree-root->ptree tx)
|
|
|
|
;; (not/c ptree) prevents ptrees from being accepted as input
|
|
|
|
;; (not/c ptree) prevents ptrees from being accepted as input
|
|
|
|
((and/c tagged-xexpr? (not/c ptree?)) . -> . ptree?)
|
|
|
|
((and/c tagged-xexpr?) . -> . ptree?)
|
|
|
|
(add-parents tx))
|
|
|
|
tx)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(module+ test
|
|
|
|
(module+ test
|
|
|
|
(set! test-ptree-main `(ptree-main "foo" "bar" (one (two "three"))))
|
|
|
|
(set! test-ptree-main `(ptree-main "foo" "bar" (one (two "three"))))
|
|
|
|
(check-equal? (ptree-root->ptree test-ptree-main)
|
|
|
|
(check-equal? (ptree-root->ptree test-ptree-main)
|
|
|
|
`(ptree-main ((,POLLEN_TREE_PARENT_NAME "")) (foo ((,POLLEN_TREE_PARENT_NAME "ptree-main"))) (bar ((,POLLEN_TREE_PARENT_NAME "ptree-main"))) (one ((,POLLEN_TREE_PARENT_NAME "ptree-main")) (two ((,POLLEN_TREE_PARENT_NAME "one")) (three ((,POLLEN_TREE_PARENT_NAME "two"))))))))
|
|
|
|
`(ptree-main "foo" "bar" (one (two "three")))))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -322,8 +293,11 @@
|
|
|
|
;; set the state variable using the setter
|
|
|
|
;; set the state variable using the setter
|
|
|
|
(set-current-url-context PROJECT_ROOT)
|
|
|
|
(set-current-url-context PROJECT_ROOT)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#|
|
|
|
|
(module+ main
|
|
|
|
(module+ main
|
|
|
|
(displayln "Running module main")
|
|
|
|
(displayln "Running module main")
|
|
|
|
(set-current-ptree (make-project-ptree (->path "/Users/MB/git/bpt/")))
|
|
|
|
(set-current-ptree (make-project-ptree (->path "/Users/MB/git/bpt/")))
|
|
|
|
(set-current-url-context "/Users/MB/git/bpt/")
|
|
|
|
(set-current-url-context "/Users/MB/git/bpt/")
|
|
|
|
(name->url (ptree-previous (ptree-previous 'what-is-typography))))
|
|
|
|
(ptree-previous (ptree-previous 'what-is-typography.html))
|
|
|
|
|
|
|
|
(name->url "how-to-pay-for-this-book.html"))
|
|
|
|
|
|
|
|
|#
|