glyph 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +7 -0
- data/AUTHORS.textile +8 -7
- data/CHANGELOG.textile +89 -8
- data/LICENSE.textile +1 -2
- data/README.textile +89 -61
- data/Rakefile +12 -10
- data/VERSION +1 -1
- data/benchmark.rb +1 -1
- data/book/config.yml +18 -4
- data/book/document.glyph +269 -45
- data/book/images/glyph/commands_tasks.png +0 -0
- data/book/images/{document_generation.png → glyph/document_generation.png} +0 -0
- data/book/images/glyph/glyph.eps +123 -0
- data/book/images/glyph/glyph.png +0 -0
- data/book/images/glyph/glyph.svg +29 -0
- data/book/lib/commands/commands.rb +11 -0
- data/book/lib/layouts/bookindex.glyph +127 -0
- data/book/lib/layouts/bookpage.glyph +129 -0
- data/book/lib/layouts/project.glyph +26 -0
- data/book/lib/macros/reference.rb +27 -7
- data/book/lib/tasks/tasks.rake +52 -0
- data/book/snippets.yml +1 -1
- data/book/text/{acknowledgement.glyph → acknowledgements.glyph} +4 -2
- data/book/text/changelog.glyph +29 -3
- data/book/text/compiling/compiling.glyph +44 -20
- data/book/text/compiling/lite_mode.glyph +0 -4
- data/book/text/compiling/programmatic_usage.glyph +1 -5
- data/book/text/config/document.glyph +35 -0
- data/book/text/config/filters.glyph +28 -0
- data/book/text/config/options.glyph +25 -0
- data/book/text/config/output.glyph +83 -0
- data/book/text/extending/bookmarks_headers.glyph +0 -5
- data/book/text/extending/command.glyph +56 -0
- data/book/text/extending/commands_tasks.glyph +39 -0
- data/book/text/extending/further_reading.glyph +0 -3
- data/book/text/extending/internals.glyph +3 -5
- data/book/text/extending/interpreting.glyph +0 -4
- data/book/text/extending/layouts.glyph +68 -0
- data/book/text/extending/macro_def.glyph +0 -5
- data/book/text/extending/output_format.glyph +78 -0
- data/book/text/extending/params_attrs.glyph +0 -3
- data/book/text/extending/placeholders.glyph +0 -4
- data/book/text/extending/task.glyph +46 -0
- data/book/text/extending/validators.glyph +5 -6
- data/book/text/getting_started/configuration.glyph +1 -5
- data/book/text/getting_started/create_project.glyph +1 -5
- data/book/text/getting_started/structure.glyph +0 -4
- data/book/text/introduction.glyph +100 -75
- data/book/text/license.glyph +1 -2
- data/book/text/macros/macros_block.glyph +8 -4
- data/book/text/macros/macros_core.glyph +0 -3
- data/book/text/macros/macros_filters.glyph +2 -7
- data/book/text/macros/macros_inline.glyph +0 -4
- data/book/text/macros/macros_structure.glyph +0 -4
- data/book/text/ref_commands.glyph +29 -7
- data/book/text/stats/bookmarks.glyph +49 -0
- data/book/text/stats/links.glyph +90 -0
- data/book/text/stats/macros.glyph +73 -0
- data/book/text/stats/snippets.glyph +50 -0
- data/book/text/stats/stats.glyph +79 -0
- data/book/text/text_editing/attribute_intro.glyph +22 -0
- data/book/text/text_editing/code.glyph +0 -5
- data/book/text/text_editing/conditionals.glyph +0 -4
- data/book/text/text_editing/esc_quot.glyph +64 -0
- data/book/text/text_editing/evaluation.glyph +0 -3
- data/book/text/text_editing/glyph_files.glyph +0 -3
- data/book/text/text_editing/images.glyph +0 -5
- data/book/text/text_editing/inclusions.glyph +0 -4
- data/book/text/text_editing/links.glyph +2 -7
- data/book/text/text_editing/macro_intro.glyph +1 -98
- data/book/text/text_editing/raw_html.glyph +0 -87
- data/book/text/text_editing/section_aliases.glyph +28 -0
- data/book/text/text_editing/sections.glyph +1 -32
- data/book/text/text_editing/stylesheets.glyph +3 -5
- data/book/text/text_editing/topics.glyph +33 -0
- data/book/text/text_editing/xml_fallback.glyph +73 -0
- data/book/text/troubleshooting/errors_command.glyph +0 -3
- data/book/text/troubleshooting/errors_generic.glyph +21 -6
- data/book/text/troubleshooting/errors_macro.glyph +11 -8
- data/book/text/troubleshooting/errors_parser.glyph +0 -3
- data/config.yml +60 -25
- data/glyph.gemspec +90 -36
- data/layouts/web/index.glyph +16 -0
- data/layouts/web/topic.glyph +15 -0
- data/layouts/web5/index.glyph +16 -0
- data/layouts/web5/topic.glyph +17 -0
- data/lib/glyph.rb +36 -49
- data/lib/glyph/analyzer.rb +253 -0
- data/lib/glyph/bookmark.rb +92 -0
- data/lib/glyph/commands.rb +9 -221
- data/lib/glyph/commands/add.rb +8 -0
- data/lib/glyph/commands/compile.rb +93 -0
- data/lib/glyph/commands/config.rb +38 -0
- data/lib/glyph/commands/init.rb +6 -0
- data/lib/glyph/commands/outline.rb +45 -0
- data/lib/glyph/commands/stats.rb +48 -0
- data/lib/glyph/commands/todo.rb +29 -0
- data/lib/glyph/config.rb +2 -0
- data/lib/glyph/document.rb +61 -30
- data/lib/glyph/interpreter.rb +2 -2
- data/lib/glyph/macro.rb +14 -5
- data/lib/glyph/macro_helpers.rb +280 -0
- data/lib/glyph/macro_validators.rb +37 -2
- data/lib/glyph/reporter.rb +182 -0
- data/lib/glyph/syntax_node.rb +37 -10
- data/lib/glyph/system_extensions.rb +8 -45
- data/lib/glyph/utils.rb +148 -0
- data/macros/core.rb +10 -15
- data/macros/filters.rb +4 -5
- data/macros/html/block.rb +46 -30
- data/macros/html/inline.rb +9 -35
- data/macros/html/structure.rb +59 -72
- data/macros/html5/block.rb +69 -0
- data/macros/html5/inline.rb +24 -0
- data/macros/html5/structure.rb +139 -0
- data/macros/xml.rb +1 -1
- data/spec/files/custom_command.rb +6 -0
- data/spec/files/custom_tasks.rake +6 -0
- data/spec/files/document_for_stats.glyph +12 -0
- data/spec/files/references.glyph +4 -0
- data/spec/files/web1.glyph +11 -0
- data/spec/files/web2.glyph +10 -0
- data/spec/files/web_doc.glyph +23 -0
- data/spec/lib/analyzer_spec.rb +137 -0
- data/spec/lib/bookmark_spec.rb +64 -0
- data/spec/lib/commands_spec.rb +30 -5
- data/spec/lib/document_spec.rb +49 -9
- data/spec/lib/glyph_spec.rb +21 -1
- data/spec/lib/macro_spec.rb +6 -6
- data/spec/lib/macro_validators_spec.rb +24 -0
- data/spec/lib/reporter_spec.rb +132 -0
- data/spec/macros/core_spec.rb +2 -3
- data/spec/macros/filters_spec.rb +2 -2
- data/spec/macros/html5_spec.rb +101 -0
- data/spec/macros/macros_spec.rb +16 -6
- data/spec/macros/web5_spec.rb +32 -0
- data/spec/macros/web_spec.rb +59 -0
- data/spec/macros/xml_spec.rb +1 -1
- data/spec/spec_helper.rb +24 -4
- data/spec/tasks/generate_spec.rb +54 -0
- data/spec/tasks/load_spec.rb +29 -3
- data/spec/tasks/project_spec.rb +21 -3
- data/styles/default.css +40 -4
- data/styles/pagination.css +59 -41
- data/tasks/generate.rake +110 -31
- data/tasks/load.rake +39 -7
- data/tasks/project.rake +9 -7
- metadata +115 -34
- data/book/images/glyph.png +0 -0
- data/book/images/glyph.svg +0 -351
- data/book/output/html/glyph.html +0 -4482
- data/book/output/html/images/document_generation.png +0 -0
- data/book/output/html/images/glyph.png +0 -0
- data/book/output/html/images/glyph.svg +0 -351
- data/book/output/pdf/glyph.pdf +4 -10254
- data/book/script/authors +0 -1
- data/book/script/changelog +0 -1
- data/book/script/license +0 -1
- data/book/script/readme +0 -1
- data/book/text/ref_config.glyph +0 -100
- data/book/text/ref_macros.glyph +0 -6
- data/book/text/troubleshooting/errors_intro.glyph +0 -3
data/book/script/authors
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
glyph compile text/acknowledgement.glyph ../AUTHORS.textile
|
data/book/script/changelog
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
glyph compile text/changelog.glyph ../CHANGELOG.textile
|
data/book/script/license
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
glyph compile text/license.glyph ../LICENSE.textile
|
data/book/script/readme
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
glyph compile text/introduction.glyph ../README.textile
|
data/book/text/ref_config.glyph
DELETED
@@ -1,100 +0,0 @@
|
|
1
|
-
section[
|
2
|
-
@title[document.*]
|
3
|
-
@id[cfg_document]
|
4
|
-
The following configuration settings are related to the current Glyph document. Therefore, you should update them right after creating a project.
|
5
|
-
|
6
|
-
config_table[
|
7
|
-
ref_config[document.author|
|
8
|
-
The author of the document.
|
9
|
-
]
|
10
|
-
ref_config[document.draft|
|
11
|
-
If set to @true@, the document is considered a draft, so =>[#m_draftcomment|draft comments] and =>[#m_todo|todo items] will be displayed.
|
12
|
-
]
|
13
|
-
ref_config[document.filename|
|
14
|
-
The name of the output file.
|
15
|
-
]
|
16
|
-
ref_config[document.output|
|
17
|
-
The format of the output file. It can be set to any value stored in the $>[document.output_targets].
|
18
|
-
]
|
19
|
-
ref_config[document.output_targets|
|
20
|
-
An @Array@ containing all the possible output formats. This setting should not be changed by the user.
|
21
|
-
]
|
22
|
-
ref_config[document.revision|
|
23
|
-
The document's revision.
|
24
|
-
]
|
25
|
-
ref_config[document.source|
|
26
|
-
The main source file to compile. It can be also be overridden by calling the #>[compile] with the @-s@ option.
|
27
|
-
]
|
28
|
-
|
29
|
-
ref_config[document.subtitle|
|
30
|
-
The subtitle of the document, displayed using the %>[subtitle].
|
31
|
-
]
|
32
|
-
ref_config[document.title|
|
33
|
-
The title of the document, displayed using the %>[title].
|
34
|
-
]
|
35
|
-
]
|
36
|
-
]
|
37
|
-
|
38
|
-
section[
|
39
|
-
@title[filters.*]
|
40
|
-
@id[cfg_filters]
|
41
|
-
config_table[
|
42
|
-
ref_config[filters.by_file_extension|
|
43
|
-
If set to @true@, a filter macro is applied to included files, based on their extensions (\.fmi[including files|#incl]).
|
44
|
-
]
|
45
|
-
ref_config[filters.markdown.converter|
|
46
|
-
The name of the markdown converter to use with the %>[markdown]. It can be set to one of the following values:
|
47
|
-
* BlueCloth
|
48
|
-
* RDiscount
|
49
|
-
* Maruku
|
50
|
-
* Kramdown
|
51
|
-
|
52
|
-
If not set, Glyph tests for the presence of each gem in the same order, until one is found.
|
53
|
-
]
|
54
|
-
ref_config[filters.coderay.*|
|
55
|
-
Some &[coderay]-specific =>[http://coderay.rubychan.de/doc/classes/CodeRay/Encoders/HTML.html|options].
|
56
|
-
]
|
57
|
-
ref_config[filters.highlighter|
|
58
|
-
The current highlighter to use. It can be set to @coderay@ or @ultraviolet@
|
59
|
-
]
|
60
|
-
ref_config[filters.redcloth.restrictions|
|
61
|
-
An @Array@ containing restrictions applied to RedCloth, used by the %>[textile] (see =>[http://redcloth.rubyforge.org/classes/RedCloth/TextileDoc.html|RedCloth Documentation] for more information).
|
62
|
-
]
|
63
|
-
ref_config[filters.target|
|
64
|
-
The output target for filters. It can be set to @html@ (for RedCloth and MarkDown) or @latex@ (RedCloth-only).
|
65
|
-
]
|
66
|
-
ref_config[filters.ultraviolet.line_numbers|
|
67
|
-
Whether the &[uv] highlighter should display line numbers or not.
|
68
|
-
]
|
69
|
-
ref_config[filters.ultraviolet.theme|
|
70
|
-
The theme used by the &[uv] highlighter.
|
71
|
-
]
|
72
|
-
]
|
73
|
-
]
|
74
|
-
|
75
|
-
section[
|
76
|
-
@title[language.*]
|
77
|
-
config_table[
|
78
|
-
ref_config[language.set|
|
79
|
-
Determines which macro set will be loaded. It can be set to:
|
80
|
-
* glyph – Loads core, filter, xml macros plus all macros necessary for the $>[document.output].
|
81
|
-
* xml – Loads core and xml macros.
|
82
|
-
* core – Loads core macros only.
|
83
|
-
]
|
84
|
-
ref_config[language.options.xml_blacklist|
|
85
|
-
The XML tags listed here cannot be generated using Glyph code.
|
86
|
-
]
|
87
|
-
ref_config[language.options.xml_fallback|
|
88
|
-
If set to true, any unknown macro name will considered an XML element (see =>[#other_elements]).
|
89
|
-
]
|
90
|
-
]
|
91
|
-
]
|
92
|
-
|
93
|
-
section[
|
94
|
-
@title[tools.*]
|
95
|
-
config_table[
|
96
|
-
ref_config[tools.pdf_generator|
|
97
|
-
The external program used to generate PDF files. It can only be set to @prince@.
|
98
|
-
]
|
99
|
-
]
|
100
|
-
]
|
@@ -1,3 +0,0 @@
|
|
1
|
-
This chapter lists the most common error messages that can be returned when running a Glyph command. It does not aim to be an exhaustive list, especially if you =>[#extending|extended] Glyph by creating your own macros or you're embedding Ruby code using the %>[ruby].
|
2
|
-
|
3
|
-
tip[As a general rule, more diagnostic information is provided if Glyph is run in =>[#debug_switch|debug mode].]
|