]> gitweb.factorcode.org Git - factor.git/blob - unmaintained/tangle/page/page.factor
tools.test: Make the flag public. Finish porting tester changes to fuzzer.
[factor.git] / unmaintained / tangle / page / page.factor
1 ! Copyright (C) 2008 Alex Chapman
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: accessors kernel semantic-db sequences sequences.lib ;
4 IN: tangle.page
5
6 RELATION: has-abbreviation
7 RELATION: has-content
8 RELATION: has-subsection
9 RELATION: before
10 RELATION: authored-by
11 RELATION: authored-on
12
13 TUPLE: page name abbreviation author created content ;
14 C: <page> page
15
16 : load-page-content ( node -- content )
17     has-content-objects [ node-content ] map concat ;
18
19 : load-page ( node -- page )
20     dup [ has-abbreviation-objects ?first ] keep
21     [ authored-by-objects ?first ] keep
22     [ authored-on-objects ?first ] keep
23     load-page-content <page> ;