From bbd8c8cb899f4f33f19084c82df277fb324e32ee Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Mon, 29 Sep 2008 04:23:42 -0500 Subject: [PATCH] Finishing up with help.html --- basis/help/html/html.factor | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/basis/help/html/html.factor b/basis/help/html/html.factor index 1e5d672658..763cc68c42 100644 --- a/basis/help/html/html.factor +++ b/basis/help/html/html.factor @@ -63,11 +63,11 @@ M: topic browser-link-href topic>filename ; : all-topics ( -- topics ) [ - ! articles get keys [ >link ] map % - ! all-words [ >link ] map % - ! all-authors [ ] map % + articles get keys [ >link ] map % + all-words [ >link ] map % + all-authors [ ] map % all-tags [ ] map % - ! all-vocabs-really % + all-vocabs-really % ] { } make ; : serialize-index ( index file -- ) @@ -79,9 +79,19 @@ M: topic browser-link-href topic>filename ; all-words [ dup name>> ] { } map>assoc "words.idx" serialize-index all-vocabs-really [ dup vocab-name ] { } map>assoc "vocabs.idx" serialize-index ; -: generate-help ( -- ) +: generate-help-files ( -- ) all-topics [ help>html ] each ; +: generate-help ( -- ) + { "resource:core" "resource:basis" "resource:extra" } vocab-roots [ + load-everything + + "/tmp/docs/" [ + generate-indices + generate-help-files + ] with-directory + ] with-variable ; + MEMO: load-index ( name -- index ) binary file-contents bytes>object ;