Schema for Fork. Clean it up.
Chris Pressey
2 years ago
114 | 114 | [Apple II][] floppy disk images. We use it as part of [Funicular][]. |
115 | 115 | There was a bug in it that we fixed so we maintain a fork for that. |
116 | 116 | |
117 | [Scheme]: TBW | |
118 | [ANSI C]: TBW | |
119 | [C99]: TBW | |
120 | [AmigaDOS 1.3]: TBW | |
121 | [Pixley]: TBW | |
122 | [Zz]: TBW | |
123 | [Zzrk]: TBW | |
124 | [Java]: TBW | |
125 | [Bubble Escape 2K]: TBW | |
126 | [The Never-Ending Maze]: TBW | |
127 | [Z-Machine]: TBW | |
128 | [C++]: TBW | |
117 | [Scheme]: ../article/Project%20Dependencies.md#scheme | |
118 | [ANSI C]: ../article/Project%20Dependencies.md#ansi-c | |
119 | [C99]: ../article/Project%20Dependencies.md#c99 | |
120 | [AmigaDOS 1.3]: ../article/Retrocomputing.md#amiga-500 | |
121 | [Pixley]: ../article/Languages.md#pixley | |
122 | [Zz]: https://cdn.rawgit.com/catseye/OpenZz/90896648/doc/zzdoc.html | |
123 | [Zzrk]: ../article/Games.md#zzrk | |
124 | [Java]: ../article/Project%20Dependencies.md#java | |
125 | [Bubble Escape 2K]: ../article/Games.md#bubble-escape | |
126 | [The Never-Ending Maze]: ../article/Games.md#the-never-ending-maze | |
127 | [Z-Machine]: ../article/Retrocomputing.md#z-machine | |
128 | [C++]: http://www.open-std.org/jtc1/sc22/wg21/ | |
129 |
0 | Fork (schema) | |
1 | ============= | |
2 | ||
3 | This is a schema which defines, for now, a few rudimentary things about | |
4 | what properties Fork entries in Chrysoberyl should have. | |
5 | ||
6 | The order in which they are listed here induces an order in which they | |
7 | should appear on each entry. | |
8 | ||
9 | * implementation of: [Scheme][] (R4RS) | |
10 | * implementation type: interpreter | |
11 | * license: Public Domain | |
12 | * host language: [ANSI C][] | |
13 | * inception date: Nov 5, 1989 | |
14 | * in distribution: [Minischeme distribution](http://catseye.tc/distribution/Minischeme_distribution) | |
15 | ||
16 | ### implementation of | |
17 | ||
18 | * optional: true | |
19 | ||
20 | implementation of | |
21 | ||
22 | ### implementation type | |
23 | ||
24 | * optional: true | |
25 | ||
26 | implementation type | |
27 | ||
28 | ### license | |
29 | ||
30 | * optional: true | |
31 | ||
32 | license | |
33 | ||
34 | ### host language | |
35 | ||
36 | * optional: true | |
37 | ||
38 | what it's written in | |
39 | ||
40 | ### inception date | |
41 | ||
42 | * optional: true | |
43 | ||
44 | date | |
45 | ||
46 | ### in distribution | |
47 | ||
48 | where it's at |
21 | 21 | ('Archived', 'Tool',), |
22 | 22 | ('Languages', 'Language',), |
23 | 23 | ('Language Implementations', 'Language Implementation',), |
24 | ('Forks', None,), | |
24 | ('Forks', 'Fork',), | |
25 | 25 | ('Automata', 'Language',), |
26 | 26 | ('Gewgaws', 'Gewgaw',), |
27 | 27 | ('Events', 'Event',), |
45 | 45 | |
46 | 46 | def rewrite_documents(refdex): |
47 | 47 | for title, schema in ARTICLES: |
48 | if title in ('News',): | |
49 | continue | |
48 | 50 | print("{}...".format(title)) |
49 | 51 | filename = document_name(title) |
50 | 52 | document = read_document_from(filename) |
51 | 53 | document.rewrite_reference_links(refdex) |
54 | ||
52 | 55 | if schema: |
53 | 56 | schema_document = read_document_from("schema/{}.md".format(schema)) |
54 | 57 | schema = Schema(schema_document) |
55 | 58 | results = schema.check_documents([document]) |
56 | 59 | if results: |
57 | 60 | raise ValueError(json.dumps(results, indent=4, sort_keys=True)) |
58 | s = feedmark_markdownize(document, schema=schema) | |
59 | with open(document.filename, 'w') as f: | |
60 | f.write(s.encode('UTF-8')) | |
61 | ||
62 | text = feedmark_markdownize(document, schema=schema) | |
63 | with open(document.filename, 'w') as f: | |
64 | f.write(text.encode('UTF-8')) | |
61 | 65 | |
62 | 66 | |
63 | 67 | def accumulate_article_refdex(refdex): |