Overview
| SHA1 Hash: | 73c6a0a14c957d8dd4aef8f5a097224755e0fb21 |
|---|---|
| Date: | 2011-04-23 15:25:39 |
| User: | crc |
| Comment: | add tool to extract doc{ blocks from library files |
| Timelines: | family | ancestors | descendants | both | trunk |
| Other Links: | files | manifest |
Tags And Properties
- branch=trunk inherited from [dc67bca1f3]
- sym-trunk inherited from [dc67bca1f3]
Changes
[hide diffs]
[patch]Added util/extract-doc.rx version [3e17f841feb8db8f]
@@ -0,0 +1,17 @@
+2 elements in out
+
+: seekDocBlock ( - )
+ [ @in ^files'readLine "doc{" compare not ] while ;
+
+: extractDocBlock ( - )
+ [ @in ^files'readLine dup
+ "}doc" compare [ drop 0 ] [ @out ^files'writeLine -1 ] if ] while ;
+
+: changeSuffix ( $-$ )
+ 3 [ ^strings'chop ] times ".rst" ^strings'append ;
+
+: extractDocs ( $- )
+ dup ^files':R ^files'open !in changeSuffix ^files':W ^files'open !out
+ seekDocBlock
+ extractDocBlock
+ @in @out [ ^files'close drop ] bi@ ;