change resource id schema to type/headline
This commit is contained in:
parent
2e134c7644
commit
b64d7d47e0
1 changed files with 5 additions and 9 deletions
14
publish.rkt
14
publish.rkt
|
@ -88,10 +88,8 @@
|
|||
".scm"))
|
||||
(error "'root resource requires headline")))
|
||||
(define (make-res-file-handle x r id)
|
||||
(if (< 0 id)
|
||||
(path->string (path-add-extension (build-path (if x "publish-test/source" "source") r (~a id))
|
||||
".scm"))
|
||||
(error "~a resource requires r-id" r)))
|
||||
(path->string (path-add-extension (build-path (if x "publish-test/source" "source") r (~a id))
|
||||
".scm")))
|
||||
(if (equal? r-type "root")
|
||||
(make-root-file-handle x-test l-headline)
|
||||
(make-res-file-handle x-test r-type r-id)))
|
||||
|
@ -144,8 +142,8 @@
|
|||
[resources (make-weak-hash)]
|
||||
[posts (map (lambda (lookup/id)
|
||||
(if (hash-has-key? post-lookup lookup/id)
|
||||
(append (list lookup/id) (rest (hash-ref post-lookup lookup/id)))
|
||||
(append (list lookup/id) (rest (get-post-data lookup/id resources post-lookup x)))))
|
||||
(hash-ref post-lookup lookup/id)
|
||||
(get-post-data lookup/id resources post-lookup x)))
|
||||
(filter non-empty-string? (rest tag-table-row)))]
|
||||
[make-index (read (open-input-file "source/make-index.scm"))]
|
||||
[new-index ((eval make-index ns) (~a "tagged/" tag) posts)]
|
||||
|
@ -225,9 +223,7 @@
|
|||
(build-path "data" r))
|
||||
#".csv"))))
|
||||
|
||||
(define res-id (if (equal? r "root")
|
||||
(string-replace l " " "-")
|
||||
(length res-table)))
|
||||
(define res-id (string-replace l " " "-"))
|
||||
;; before anything else, open output file
|
||||
;; doing this means that if a file exists of the intended
|
||||
(define out
|
||||
|
|
Loading…
Reference in a new issue