glyph 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. data/AUTHORS.textile +1 -1
  2. data/CHANGELOG.textile +119 -222
  3. data/LICENSE.textile +1 -1
  4. data/README.textile +42 -23
  5. data/Rakefile +1 -3
  6. data/VERSION +1 -1
  7. data/benchmark.rb +72 -0
  8. data/book/config.yml +4 -4
  9. data/book/document.glyph +90 -57
  10. data/book/images/document_generation.png +0 -0
  11. data/book/lib/macros/reference.rb +75 -22
  12. data/book/output/html/glyph.html +3183 -2121
  13. data/book/output/html/images/document_generation.png +0 -0
  14. data/book/output/pdf/glyph.pdf +7370 -4913
  15. data/book/resources/document_generation.txt +34 -0
  16. data/book/snippets.yml +6 -0
  17. data/book/text/changelog.glyph +45 -34
  18. data/book/text/compiling/compiling.glyph +23 -0
  19. data/book/text/compiling/lite_mode.glyph +23 -0
  20. data/book/text/compiling/programmatic_usage.glyph +77 -0
  21. data/book/text/extending/bookmarks_headers.glyph +21 -0
  22. data/book/text/extending/further_reading.glyph +13 -0
  23. data/book/text/extending/internals.glyph +79 -0
  24. data/book/text/extending/interpreting.glyph +51 -0
  25. data/book/text/extending/macro_def.glyph +64 -0
  26. data/book/text/extending/params_attrs.glyph +70 -0
  27. data/book/text/extending/placeholders.glyph +34 -0
  28. data/book/text/extending/validators.glyph +16 -0
  29. data/book/text/getting_started/configuration.glyph +49 -0
  30. data/book/text/getting_started/create_project.glyph +41 -0
  31. data/book/text/getting_started/structure.glyph +55 -0
  32. data/book/text/introduction.glyph +49 -26
  33. data/book/text/license.glyph +1 -1
  34. data/book/text/macros/macros_block.glyph +99 -0
  35. data/book/text/macros/macros_core.glyph +208 -0
  36. data/book/text/macros/macros_filters.glyph +40 -0
  37. data/book/text/macros/macros_inline.glyph +50 -0
  38. data/book/text/macros/macros_structure.glyph +100 -0
  39. data/book/text/ref_commands.glyph +94 -73
  40. data/book/text/ref_config.glyph +34 -42
  41. data/book/text/ref_macros.glyph +1 -373
  42. data/book/text/text_editing/code.glyph +51 -0
  43. data/book/text/text_editing/conditionals.glyph +49 -0
  44. data/book/text/text_editing/evaluation.glyph +13 -0
  45. data/book/text/text_editing/glyph_files.glyph +7 -0
  46. data/book/text/text_editing/images.glyph +29 -0
  47. data/book/text/text_editing/inclusions.glyph +44 -0
  48. data/book/text/text_editing/links.glyph +53 -0
  49. data/book/text/text_editing/macro_intro.glyph +111 -0
  50. data/book/text/text_editing/raw_html.glyph +112 -0
  51. data/book/text/text_editing/sections.glyph +63 -0
  52. data/book/text/text_editing/stylesheets.glyph +36 -0
  53. data/book/text/troubleshooting/errors_command.glyph +39 -0
  54. data/book/text/troubleshooting/errors_generic.glyph +29 -0
  55. data/book/text/troubleshooting/errors_intro.glyph +3 -0
  56. data/book/text/troubleshooting/errors_macro.glyph +98 -0
  57. data/book/text/troubleshooting/errors_parser.glyph +29 -0
  58. data/config.yml +77 -58
  59. data/document.glyph +25 -25
  60. data/glyph.gemspec +57 -22
  61. data/lib/glyph.rb +54 -13
  62. data/lib/glyph/commands.rb +84 -17
  63. data/lib/glyph/config.rb +3 -3
  64. data/lib/glyph/document.rb +14 -8
  65. data/lib/glyph/interpreter.rb +18 -58
  66. data/lib/glyph/macro.rb +160 -55
  67. data/lib/glyph/macro_validators.rb +104 -12
  68. data/lib/glyph/node.rb +24 -0
  69. data/lib/glyph/parser.rb +278 -0
  70. data/lib/glyph/syntax_node.rb +225 -0
  71. data/macros/core.rb +212 -0
  72. data/macros/filters.rb +66 -15
  73. data/macros/html/block.rb +43 -105
  74. data/macros/html/inline.rb +11 -12
  75. data/macros/html/structure.rb +123 -58
  76. data/macros/xml.rb +33 -0
  77. data/spec/files/container.textile +2 -2
  78. data/spec/files/document.glyph +2 -2
  79. data/spec/files/document_with_toc.glyph +3 -3
  80. data/spec/files/included.textile +1 -1
  81. data/spec/files/ligature.jpg +0 -0
  82. data/spec/files/markdown.markdown +2 -1
  83. data/spec/lib/commands_spec.rb +46 -3
  84. data/spec/lib/document_spec.rb +4 -4
  85. data/spec/lib/glyph_spec.rb +17 -46
  86. data/spec/lib/interpreter_spec.rb +6 -25
  87. data/spec/lib/macro_spec.rb +141 -43
  88. data/spec/lib/macro_validators_spec.rb +27 -5
  89. data/spec/lib/node_spec.rb +26 -1
  90. data/spec/lib/parser_spec.rb +246 -0
  91. data/spec/lib/syntax_node_spec.rb +111 -0
  92. data/spec/macros/core_spec.rb +195 -0
  93. data/spec/macros/filters_spec.rb +38 -4
  94. data/spec/macros/macros_spec.rb +20 -176
  95. data/spec/macros/textile_spec.rb +13 -71
  96. data/spec/macros/xml_spec.rb +77 -0
  97. data/spec/spec_helper.rb +50 -10
  98. data/spec/tasks/load_spec.rb +13 -2
  99. data/styles/default.css +18 -6
  100. data/styles/pagination.css +1 -19
  101. data/tasks/generate.rake +2 -2
  102. data/tasks/load.rake +27 -17
  103. data/tasks/project.rake +1 -1
  104. metadata +75 -62
  105. data/book/script/compile.rb +0 -8
  106. data/book/script/prof +0 -1
  107. data/book/script/prof_results.htm +0 -21079
  108. data/book/text/authoring.glyph +0 -548
  109. data/book/text/extending.glyph +0 -224
  110. data/book/text/getting_started.glyph +0 -158
  111. data/book/text/troubleshooting.glyph +0 -179
  112. data/lib/glyph/glyph_language.rb +0 -538
  113. data/lib/glyph/glyph_language.treetop +0 -27
  114. data/macros/common.rb +0 -160
data/AUTHORS.textile CHANGED
@@ -5,4 +5,4 @@ Special thanks to the following individuals who contributed to Glyph by reportin
5
5
  * <a href="http://koraktor.github.com">Sebastian Staudt</a> (koraktor)
6
6
 
7
7
 
8
-
8
+
data/CHANGELOG.textile CHANGED
@@ -1,260 +1,157 @@
1
1
 
2
2
 
3
- <div class="section">
4
- <h2 id="h_1">v0.2.0 &ndash; May 9th 2010</h2>
5
- <div class="section">
6
- <h3 id="h_2">11 Features Implemented</h3>
7
- <table>
8
- <tr>
9
- <th>ID</th>
10
- <th>Description</th>
11
- </tr>
12
- <tr>
13
- <td>
14
- <a href="http://github.com/h3rald/glyph/issues/closed#issue/62">#62</a>
15
3
 
16
- </td>
17
- <td>
18
- <p>A new highlight macro is available to highlight source code (CodeRay or UltraViolet requireed).</p>
19
4
 
20
- </td>
21
- </tr>
22
-
23
-
24
- <tr>
25
- <td>
26
- <a href="http://github.com/h3rald/glyph/issues/closed#issue/76">#76</a>
27
5
 
28
- </td>
29
- <td>
30
- <p>It is now possible to use Glyph programmatically via the new <code>Glyph#filter</code> and <code>Glyph#compile</code> methods.</p>
31
-
32
- </td>
33
- </tr>
34
-
6
+ <div class="section">
7
+ <h2 id="h_1">v0.3.0 &ndash; June 13th 2010</h2>
8
+ <div class="section">
9
+ <h3 id="h_2">27 Features Implemented</h3>
10
+ <table><tr><th>ID</th>
11
+ <th>Description</th></tr>
12
+
35
13
 
36
- <tr>
37
- <td>
38
- <a href="http://github.com/h3rald/glyph/issues/closed#issue/87">#87</a>
39
-
40
- </td>
41
- <td>
42
- <p>It is now possible to define snippets inside a Glyph source file using the snippet: macro.</p>
43
-
44
- </td>
45
- </tr>
14
+ <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/39">#39</a></td>
15
+ <td><p>A new outline command is available to display the document outline.</p></td></tr>
46
16
 
17
+ <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/110">#110</a></td>
18
+ <td><p>It is now possible to use Glyph language to produce arbitrary <span class="caps">XML</span> code.</p></td></tr>
47
19
 
48
- <tr>
49
- <td>
50
- <a href="http://github.com/h3rald/glyph/issues/closed#issue/88">#88</a>
51
-
52
- </td>
53
- <td>
54
- <p>It is now possible to change configuration settings inside a Glyph source file using the config: macro macro (Jabbslad).</p>
55
-
56
- </td>
57
- </tr>
20
+ <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/111">#111</a></td>
21
+ <td><p>System settings are now stored within a <code>system.*</code> namespace and cannot be changed via the config: macro or the config command.</p></td></tr>
58
22
 
23
+ <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/116">#116</a></td>
24
+ <td><p>It is now possible to use named attributes within Glyph macros.</p></td></tr>
59
25
 
60
- <tr>
61
- <td>
62
- <a href="http://github.com/h3rald/glyph/issues/closed#issue/89">#89</a>
63
-
64
- </td>
65
- <td>
66
- <p>It is now possible to compile a single Glyph source file without creating a Glyph project.</p>
67
-
68
- </td>
69
- </tr>
70
-
26
+ <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/119">#119</a></td>
27
+ <td><p><a id="new_parser"></a>A new parser was implemented from scratch to improve performance. Treetop gem no longer required.</p></td></tr>
71
28
 
72
- <tr>
73
- <td>
74
- <a href="http://github.com/h3rald/glyph/issues/closed#issue/92">#92</a>
75
-
76
- </td>
77
- <td>
78
- <p>6 new macros have been defined to allow conditional processing (condition macro, eq macro, not macro, and macro, or macro, match macro)</p>
79
-
80
- </td>
81
- </tr>
82
-
29
+ <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/121">#121</a></td>
30
+ <td><p>Some macros have been removed in favor of <span class="caps">XML</span> fallback, others have been updated.</p></td></tr>
83
31
 
84
- <tr>
85
- <td>
86
- <a href="http://github.com/h3rald/glyph/issues/closed#issue/94">#94</a>
87
-
88
- </td>
89
- <td>
90
- <p>It is now possible to add <em>validators</em> to macros, for example to check the number of parameters they take.</p>
91
-
92
- </td>
93
- </tr>
94
-
32
+ <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/123">#123</a></td>
33
+ <td><p>The SyntaxNode class has been specialized to differentiate between macros, attributes, parameters, text and escapes.</p></td></tr>
95
34
 
96
- <tr>
97
- <td>
98
- <a href="http://github.com/h3rald/glyph/issues/closed#issue/97">#97</a>
99
-
100
- </td>
101
- <td>
102
- <p>The compile command command can now take an extra <code>--auto</code> switch to trigger document auto-regeneration whenever a source file is changed (koraktor).</p>
103
-
104
- </td>
105
- </tr>
106
-
35
+ <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/124">#124</a></td>
36
+ <td><p>Implemented new article macro and book macro.</p></td></tr>
107
37
 
108
- <tr>
109
- <td>
110
- <a href="http://github.com/h3rald/glyph/issues/closed#issue/99">#99</a>
111
-
112
- </td>
113
- <td>
114
- <p>Added a <code>document.draft</code> setting. If set to <code>true</code>, comments and TODOs are rendered in output files.</p>
115
-
116
- </td>
117
- </tr>
118
-
38
+ <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/126">#126</a></td>
39
+ <td><p>A new rewrite: macro has been implemented to create simple macros using just Glyph code.</p></td></tr>
119
40
 
120
- <tr>
121
- <td>
122
- <a href="http://github.com/h3rald/glyph/issues/closed#issue/100">#100</a>
123
-
124
- </td>
125
- <td>
126
- <p><a id="system_css"></a>Glyph <span class="caps">CSS</span> files are no longer copied to new projects, but they can be referenced as if they were (see also <a href="#css_not_copied">#93</a>).</p>
127
-
128
- </td>
129
- </tr>
130
-
41
+ <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/127">#127</a></td>
42
+ <td><p>A new alias macro has been implemented to create macro aliases.</p></td></tr>
131
43
 
132
- <tr>
133
- <td>
134
- <a href="http://github.com/h3rald/glyph/issues/closed#issue/108">#108</a>
135
-
136
- </td>
137
- <td>
138
- <p>It is now possible to define Glyph macros within Glyph source files using the macro: macro.</p>
139
-
140
- </td>
141
- </tr>
142
- </table>
44
+ <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/128">#128</a></td>
45
+ <td><p>A blacklist for <span class="caps">XML</span> tags has been exposed via the language.options.xml_blacklist setting.</p></td></tr>
46
+
47
+ <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/129">#129</a></td>
48
+ <td><p>The include macro can now be used in lite mode, it can evaluate ruby files and requires relative paths.</p></td></tr>
49
+
50
+ <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/130">#130</a></td>
51
+ <td><p>A new &#8220;safe mode&#8221; has been implemented to explicitly forbid certain potentially unsafe macros.</p></td></tr></table>
143
52
 
144
53
  </div>
145
54
 
146
55
 
147
56
  <div class="section">
148
- <h3 id="h_3">8 Bugs Fixed</h3>
149
- <table>
150
- <tr>
151
- <th>ID</th>
152
- <th>Description</th>
153
- </tr>
154
- <tr>
155
- <td>
156
- <a href="http://github.com/h3rald/glyph/issues/closed#issue/86">#86</a>
157
-
158
- </td>
159
- <td>
160
- <p>Warning and error messages have been updated, and it is now possible to show additional debug information. Additionally, syntax errors are now handled before the document is processed.</p>
161
-
162
- </td>
163
- </tr>
164
-
57
+ <h3 id="h_3">7 Bugs Fixed</h3>
58
+ <table><tr><th>ID</th>
59
+ <th>Description</th></tr>
60
+
165
61
 
166
- <tr>
167
- <td>
168
- <a href="http://github.com/h3rald/glyph/issues/closed#issue/93">#93</a>
169
-
170
- </td>
171
- <td>
172
- <p><a id="css_not_copied"></a>Default css files were not copied when creating a new project. The issue has been resolved by allowing the style macro to reference Glyph&#8217;s system styles (see also <a href="#system_css">#100</a>).</p>
173
-
174
- </td>
175
- </tr>
176
-
62
+ <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/109">#109</a></td>
63
+ <td><p>Performance has been dramatically improved by implementing a parser from scratch (see <a href="#new_parser">#119</a>)</p></td></tr>
177
64
 
178
- <tr>
179
- <td>
180
- <a href="http://github.com/h3rald/glyph/issues/closed#issue/95">#95</a>
181
-
182
- </td>
183
- <td>
184
- <p>The config command did not save data to <span class="caps">YAML</span> configuration files. This has been fixed ensuring that internal configuration overrides are not saved to the <span class="caps">YAML</span> file too.</p>
185
-
186
- </td>
187
- </tr>
188
-
65
+ <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/122">#122</a></td>
66
+ <td><p>Macro encoding/decoding no longer necessary due to the new parser (see <a href="#new_parser">#119</a>)</p></td></tr>
189
67
 
190
- <tr>
191
- <td>
192
- <a href="http://github.com/h3rald/glyph/issues/closed#issue/98">#98</a>
193
-
194
- </td>
195
- <td>
196
- <p>Glyph is now fully compatible with Ruby 1.9.1 and JRuby 1.4.0.</p>
68
+ <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/125">#125</a></td>
69
+ <td><p>Warning messages have been streamlined.</p></td></tr></table>
197
70
 
198
- </td>
199
- </tr>
200
-
201
-
202
- <tr>
203
- <td>
204
- <a href="http://github.com/h3rald/glyph/issues/closed#issue/101">#101</a>
71
+ </div>
205
72
 
206
- </td>
207
- <td>
208
- <p>Additional tests have been developed to improve Textile support. There should no longer be errors when using textile block elements inside Glyph macros.</p>
73
+ </div>
209
74
 
210
- </td>
211
- </tr>
212
-
75
+ <div class="section">
76
+ <h2 id="h_4">v0.2.0 &ndash; May 9th 2010</h2>
77
+ <div class="section">
78
+ <h3 id="h_5">23 Features Implemented</h3>
79
+ <table><tr><th>ID</th>
80
+ <th>Description</th></tr>
81
+
213
82
 
214
- <tr>
215
- <td>
216
- <a href="http://github.com/h3rald/glyph/issues/closed#issue/103">#103</a>
217
-
218
- </td>
219
- <td>
220
- <p>Fixed a bug that caused test failures when deleting the test project directory.</p>
221
-
222
- </td>
223
- </tr>
224
-
83
+ <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/62">#62</a></td>
84
+ <td><p>A new highlight macro is available to highlight source code (CodeRay or UltraViolet required).</p></td></tr>
225
85
 
226
- <tr>
227
- <td>
228
- <a href="http://github.com/h3rald/glyph/issues/closed#issue/104">#104</a>
229
-
230
- </td>
231
- <td>
232
- <p>Nested Glyph macros calling <code>Macro#interpret</code> no longer ignore escape delimiters.</p>
86
+ <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/76">#76</a></td>
87
+ <td><p>It is now possible to use Glyph programmatically via the new <code>Glyph#filter</code> and <code>Glyph#compile</code> methods.</p></td></tr>
88
+
89
+ <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/87">#87</a></td>
90
+ <td><p>It is now possible to define snippets inside a Glyph source file using the snippet: macro.</p></td></tr>
91
+
92
+ <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/88">#88</a></td>
93
+ <td><p>It is now possible to change configuration settings inside a Glyph source file using the config: macro (Jabbslad).</p></td></tr>
94
+
95
+ <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/89">#89</a></td>
96
+ <td><p>It is now possible to compile a single Glyph source file without creating a Glyph project.</p></td></tr>
97
+
98
+ <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/92">#92</a></td>
99
+ <td><p>6 new macros have been defined to allow conditional processing (condition macro, eq macro, not macro, and macro, or macro, match macro)</p></td></tr>
100
+
101
+ <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/94">#94</a></td>
102
+ <td><p>It is now possible to add <em>validators</em> to macros, for example to check the number of parameters they take.</p></td></tr>
103
+
104
+ <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/97">#97</a></td>
105
+ <td><p>The compile command command can now take an extra <code>--auto</code> switch to trigger document auto-regeneration whenever a source file is changed (koraktor).</p></td></tr>
106
+
107
+ <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/99">#99</a></td>
108
+ <td><p>Added a <code>document.draft</code> setting. If set to <code>true</code>, comments and TODOs are rendered in output files.</p></td></tr>
109
+
110
+ <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/100">#100</a></td>
111
+ <td><p><a id="system_css"></a>Glyph <span class="caps">CSS</span> files are no longer copied to new projects, but they can be referenced as if they were (see also <a href="#css_not_copied">#93</a>).</p></td></tr>
112
+
113
+ <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/108">#108</a></td>
114
+ <td><p>It is now possible to define Glyph macros within Glyph source files using the macro: macro.</p></td></tr></table>
233
115
 
234
- </td>
235
- </tr>
116
+ </div>
236
117
 
118
+
119
+ <div class="section">
120
+ <h3 id="h_6">17 Bugs Fixed</h3>
121
+ <table><tr><th>ID</th>
122
+ <th>Description</th></tr>
123
+
237
124
 
238
- <tr>
239
- <td>
240
- <a href="http://github.com/h3rald/glyph/issues/closed#issue/107">#107</a>
241
-
242
- </td>
243
- <td>
244
- <p>Added the possibility to encode (using the encode macro) and decode (using the decode macro) macros so that they can be interpreted later.</p>
245
-
246
- </td>
247
- </tr>
248
- </table>
125
+ <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/86">#86</a></td>
126
+ <td><p>Warning and error messages have been updated, and it is now possible to show additional debug information. Additionally, syntax errors are now handled before the document is processed.</p></td></tr>
127
+
128
+ <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/93">#93</a></td>
129
+ <td><p><a id="css_not_copied"></a>Default css files were not copied when creating a new project. The issue has been resolved by allowing the style macro to reference Glyph&#8217;s system styles (see also <a href="#system_css">#100</a>).</p></td></tr>
130
+
131
+ <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/95">#95</a></td>
132
+ <td><p>The config command did not save data to <span class="caps">YAML</span> configuration files. This has been fixed ensuring that internal configuration overrides are not saved to the <span class="caps">YAML</span> file too.</p></td></tr>
133
+
134
+ <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/98">#98</a></td>
135
+ <td><p>Glyph is now fully compatible with Ruby 1.9.1 and JRuby 1.4.0.</p></td></tr>
136
+
137
+ <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/101">#101</a></td>
138
+ <td><p>Additional tests have been developed to improve Textile support. There should no longer be errors when using textile block elements inside Glyph macros.</p></td></tr>
139
+
140
+ <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/103">#103</a></td>
141
+ <td><p>Fixed a bug that caused test failures when deleting the test project directory.</p></td></tr>
142
+
143
+ <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/104">#104</a></td>
144
+ <td><p>Nested Glyph macros calling <code>Macro#interpret</code> no longer ignore escape delimiters.</p></td></tr>
145
+
146
+ <tr><td><a href="http://github.com/h3rald/glyph/issues/closed#issue/107">#107</a></td>
147
+ <td><p>Added the possibility to encode (using the <code>encode</code> macro) and decode (using the <code>decode</code> macro) macros so that they can be interpreted later.</p></td></tr></table>
249
148
 
250
149
  </div>
251
150
 
252
151
  </div>
253
-
254
152
 
255
- <div class="section">
256
- <h2 id="h_4">v0.1.0 &ndash; April 8th 2010</h2>
257
- Initial release.
153
+ <div class="section">
154
+ <h2 id="h_7">v0.1.0 &ndash; April 8th 2010</h2>
155
+ Initial release.
258
156
 
259
- </div>
260
-
157
+ </div>
data/LICENSE.textile CHANGED
@@ -23,4 +23,4 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
23
  THE SOFTWARE.
24
24
  </code>
25
25
  </pre>
26
- </div>
26
+ </div>
data/README.textile CHANGED
@@ -1,11 +1,11 @@
1
+
1
2
  Glyph is a _Rapid Document Authoring Framework_.
2
3
 
3
- Think of it like a sort of <a href="http://www.rubyonrails.org">Ruby on Rails</a> but for creating text documents instead of web sites. With Glyph, you can manage your documents tidily in _projects_ that can be used to generate deliverables in different formats such as HTML or PDF (through <a href="http://www.princexml.com/">Prince</a>).
4
+ With Glyph, you can manage your documents tidily in _projects_ and generate deliverables in different formats such as HTML or PDF (through <a href="http://www.princexml.com/">Prince</a>).
4
5
 
5
6
  <div class="section">
6
7
  <h2 id="h_1">Main Features</h2>
7
-
8
- Glyph uses a simple macro system to perform a wide variety of advanced tasks:
8
+ Glyph comes with its very own macro system to perform a wide variety of advanced tasks:
9
9
  * Generate block-level HTML tags not commonly managed by lightweight markups, like @head@, @body@, @div@ and @table@.
10
10
  * Create and validate internal and external links.
11
11
  * Include and validate images and figures.
@@ -14,37 +14,40 @@ Glyph uses a simple macro system to perform a wide variety of advanced tasks:
14
14
  * Store common snippets of text in a single YAML file and use them anywhere in your document, as many times as you need.
15
15
  * Store configuration settings in a YAML file and use them anywhere in your document, as many times as you need.
16
16
  * Evaluate Ruby code within your document.
17
+ * Include content only if certain conditions are satisfied.
18
+ * Define macros, snippets and configuration settings directly within your document.
19
+ * Highlight source code.
17
20
  * Call macros from other macros (including snippets), avoiding mutual calls.
18
- * Include text files in other text files.
21
+ * Include text files within other text files.
19
22
  * Include the value of any configuration setting (like author, title) in the document.
20
- * Filter input explicitly or implicitly, based on file extensions when including files.
21
- * Manage comments and todo items.
23
+ * Filter input explicitly or implicitly (based on file extensions).
24
+ * Manage draft comments and todo items.
25
+ * Provide a simple, less-verbose syntax to write XML code.
22
26
 
23
27
  </div>
24
28
 
25
29
  <div class="section">
26
30
  <h2 id="h_2">Installation</h2>
27
-
28
31
  @gem install glyph@ -- simple, as always.
29
32
 
30
33
  </div>
31
34
 
32
35
  <div class="section">
33
36
  <h2 id="h_3">Essential Glyph commands</h2>
34
-
35
37
  Glyph is 100% command line. Its interface resambles <a href="http://git-scm.com/">Git's</a> for its simplicity and power (thanks to the <a href="http://github.com/davetron5000/gli">gli</a> gem). Here are some example commands:
36
38
 
37
39
  * @glyph init@ -- to initialize a new Glyph project in the current (empty) directory.
38
40
  * @glyph add introduction.textile@ -- to create a new file called _introduction.textile_.
39
41
  * @glyph compile@ -- to compile the current document into a single HTML file.
42
+ * @glyph compile --auto@ -- to keep recompiling the current document every time a file is changed.
40
43
  * @glyph compile -f pdf@ -- to compile the current document into HTML and then transform it into PDF using <a href="http://www.princexml.com/">Prince</a>.
41
44
  * @glyph compile readme.glyph@ -- to compile a _readme.glyph_ located in the current directory into a single HTML file.
45
+ * @glyph outline -l 2@ -- Display the document outline, up to second-level headers.
42
46
 
43
47
  </div>
44
48
 
45
49
  <div class="section">
46
50
  <h2 id="macros_nutshell">Glyph macros in a nutshell</h2>
47
-
48
51
  Format your documents using Textile or Markdown, and use Glyph Macros to do everything else:
49
52
 
50
53
  **Glyph Source:**
@@ -53,11 +56,20 @@ Format your documents using Textile or Markdown, and use Glyph Macros to do ever
53
56
  <div class="code">
54
57
  <pre>
55
58
  <code>
56
- section[header[Something about Glyph]
57
- You can use Glyph macros in conjunction
58
- with _Textile_ or _Markdown_ to
59
+ section[
60
+ @title[Something about Glyph]
61
+ txt[
62
+ You can use Glyph macros in conjunction
63
+ with _Textile_ or _Markdown_ to
59
64
  produce HTML files effortlessly.
60
- section[header[What about PDFs?|pdf]
65
+ ]
66
+ p[
67
+ Alternatively, you can just use em[Glyph itself]
68
+ to generate HTML tags.
69
+ ]
70
+ section[
71
+ @title[What about PDFs?]
72
+ @id[pdf]
61
73
  Once you have a single, well-formatted HTML
62
74
  file, converting it to PDF is
63
75
  extremely easy with a 3rd-party
@@ -76,15 +88,23 @@ renderer like =>[http://www.princexml.com|Prince].
76
88
  <code>
77
89
  <div class="section">
78
90
  <h2 id="h_10">Something about Glyph</h2>
79
- <p>You can use Glyph macros in conjunction with
80
- <em>Textile</em> or <em>Markdown</em> to
81
- produce HTML files effortlessly.</p>
91
+ <p>
92
+ You can use Glyph macros in conjunction with
93
+ <em>Textile</em> or <em>Markdown</em> to
94
+ produce HTML files effortlessly.
95
+ </p>
82
96
  <div class="section">
83
97
  <h3 id="pdf">What about PDFs?</h3>
84
- <p>Once you have a single, well-formatted HTML
85
- file, converting it to PDF is
86
- extremely easy with a 3rd-party renderer
87
- like <a href="http://www.princexml.com">Prince</a>.</p>
98
+ <p>
99
+ Once you have a single, well-formatted HTML
100
+ file, converting it to PDF is
101
+ extremely easy with a 3rd-party renderer
102
+ like <a href="http://www.princexml.com">Prince</a>.
103
+ </p>
104
+ <p>
105
+ Alternatively, you can just use <em>Glyph itself</em>
106
+ to generate HTML tags.
107
+ </p>
88
108
  </div>
89
109
  </div>
90
110
  </code>
@@ -95,14 +115,13 @@ renderer like =>[http://www.princexml.com|Prince].
95
115
 
96
116
  <div class="section">
97
117
  <h2 id="h_5">Resources</h2>
98
-
99
118
  * Home Page: <a href="http://www.h3rald.com/glyph/">http://www.h3rald.com/glyph/</a>
100
119
  * Repository: <a href="http://www.github.com/h3rald/glyph/">http://www.github.com/h3rald/glyph/</a>
101
120
  * Bug Tracking: <a href="http://www.github.com/h3rald/glyph/issues">http://www.github.com/h3rald/glyph/issues</a>
102
121
  * Development Wiki <a href="http://wiki.github.com/h3rald/glyph">http://wiki.github.com/h3rald/glyph</a>
103
122
  * RubyGem Download <a href="http://www.rubygems.org/gems/glyph">http://www.rubygems.org/gems/glyph</a>
104
- * Book (PDF): <a href="http://github.com/h3rald/glyph/raw/0.1.0/book/output/pdf/glyph.pdf">http://github.com/h3rald/glyph/raw/0.1.0/book/output/pdf/glyph.pdf</a>
123
+ * Book (PDF): <a href="http://github.com/h3rald/glyph/raw/0.2.0/book/output/pdf/glyph.pdf">http://github.com/h3rald/glyph/raw/0.2.0/book/output/pdf/glyph.pdf</a>
105
124
  * Reference Documentation: <a href="http://yardoc.org/docs/h3rald-glyph/">http://yardoc.org/docs/h3rald-glyph/</a>
106
125
  * User Group: <a href="http://groups.google.com/group/glyph-framework">http://groups.google.com/group/glyph-framework</a>
107
126
 
108
- </div>
127
+ </div>