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/text/license.glyph
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
Copyright
|
2
|
-
|
1
|
+
p[Copyright © 2010 strong[Fabio Cevasco], =>[http://www.h3rald.com]]
|
3
2
|
codeblock[
|
4
3
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
4
|
of this software and associated documentation files (the "Software"), to deal
|
@@ -1,6 +1,3 @@
|
|
1
|
-
section[
|
2
|
-
@title[Block Macros]
|
3
|
-
|
4
1
|
ref_macro[
|
5
2
|
@n[box]
|
6
3
|
@desc[Creates a titled box (@<div>@ tag).]
|
@@ -65,6 +62,14 @@ img[
|
|
65
62
|
]
|
66
63
|
]
|
67
64
|
|
65
|
+
ref_macro[
|
66
|
+
@n[navigation]
|
67
|
+
@desc[Displays links to the document's TOC and the previous/next topic (used only in =>[#layouts|layouts]). ]
|
68
|
+
@params[
|
69
|
+
-p[0|The ID of the current topic.]
|
70
|
+
]
|
71
|
+
]
|
72
|
+
|
68
73
|
ref_macro[
|
69
74
|
@n[note]
|
70
75
|
@desc[Creates a note @div@ containing the value.]
|
@@ -96,4 +101,3 @@ img[
|
|
96
101
|
@desc[Renders the title of the document (based on the $>[document.title]) within a @<h1>@ tag.]
|
97
102
|
@example[=title[]=]
|
98
103
|
]
|
99
|
-
]
|
@@ -1,11 +1,7 @@
|
|
1
|
-
section[
|
2
|
-
@title[Filter Macros]
|
3
|
-
@id[f_macros]
|
4
|
-
|
5
1
|
ref_macro[
|
6
2
|
@n[markdown]
|
7
3
|
@desc[
|
8
|
-
Uses a Markdown converter (BlueCloth, RDiscount, Maruku or Kramdown) to transform the value into HTML if the
|
4
|
+
Uses a Markdown converter (BlueCloth, RDiscount, Maruku or Kramdown) to transform the value into HTML if the =>[#cfg_output|code[output.*.filter_target]] setting is set to @html@.
|
9
5
|
|
10
6
|
&[called_on_files] with a @.markdown@ or a @.md@ extension.
|
11
7
|
]
|
@@ -17,7 +13,7 @@ Uses a Markdown converter (BlueCloth, RDiscount, Maruku or Kramdown) to transfor
|
|
17
13
|
ref_macro[
|
18
14
|
@n[textile]
|
19
15
|
@desc[
|
20
|
-
Uses the RedCloth gem to transform the value into HTML or LaTeX, depending on the value of the
|
16
|
+
Uses the RedCloth gem to transform the value into HTML or LaTeX, depending on the value of the =>[#cfg_output|code[output.*.filter_target]].
|
21
17
|
|
22
18
|
&[called_on_files] with a @.textile@ or a @.txt@ extension.
|
23
19
|
]
|
@@ -37,4 +33,3 @@ highlight[ruby\|
|
|
37
33
|
]
|
38
34
|
=]
|
39
35
|
]
|
40
|
-
]
|
@@ -1,6 +1,3 @@
|
|
1
|
-
section[
|
2
|
-
@title[Inline Macros]
|
3
|
-
|
4
1
|
ref_macro[
|
5
2
|
@n[anchor]
|
6
3
|
@desc[Creates a named anchor (or bookmark).]
|
@@ -47,4 +44,3 @@ section[
|
|
47
44
|
@desc[Saves the value as a TODO item, which can be printed using the #>[todo] and included in the document if the $>[document.draft] is set to @true@.]
|
48
45
|
@example[=todo[Remember to do this.]=]
|
49
46
|
]
|
50
|
-
]
|
@@ -16,7 +16,7 @@ section[
|
|
16
16
|
]
|
17
17
|
]
|
18
18
|
section[
|
19
|
-
@title[
|
19
|
+
@title[add]
|
20
20
|
@id[c_add]
|
21
21
|
p[Creates a new text file in the code[text/] folder.]
|
22
22
|
example[glyph add introduction.textile]
|
@@ -25,7 +25,7 @@ section[
|
|
25
25
|
]
|
26
26
|
]
|
27
27
|
section[
|
28
|
-
@title[
|
28
|
+
@title[compile]
|
29
29
|
@id[c_compile]
|
30
30
|
p[Compiles a Glyph document into an output file. If no options are specified, the code[document.glyph] file is used as source to produce a standalone HTML file.]
|
31
31
|
example[glyph compile -f pdf]
|
@@ -49,7 +49,7 @@ If specified, enable =>[#auto_regeneration|auto regeneration] (requires the =>[h
|
|
49
49
|
]
|
50
50
|
]
|
51
51
|
section[
|
52
|
-
@title[
|
52
|
+
@title[config]
|
53
53
|
@id[c_config]
|
54
54
|
Gets or sets a configuration setting in the project or global configuration file (\.fmi[configuration files|#cfg]).
|
55
55
|
examples[
|
@@ -68,7 +68,7 @@ If specified, the global configuration file is processed instead of the project
|
|
68
68
|
]
|
69
69
|
]
|
70
70
|
section[
|
71
|
-
@title[
|
71
|
+
@title[help]
|
72
72
|
@id[c_help]
|
73
73
|
Prints information about all Glyph commands or about one specific command.
|
74
74
|
examples[
|
@@ -80,13 +80,13 @@ glyph help compile
|
|
80
80
|
]
|
81
81
|
]
|
82
82
|
section[
|
83
|
-
@title[
|
83
|
+
@title[init]
|
84
84
|
@id[c_init]
|
85
85
|
Creates a new Glyph project in the current directory (if empty).
|
86
86
|
example[glyph init]
|
87
87
|
]
|
88
88
|
section[
|
89
|
-
@title[
|
89
|
+
@title[outline]
|
90
90
|
@id[c_outline]
|
91
91
|
Display an outline of the current document.
|
92
92
|
options[
|
@@ -110,7 +110,29 @@ glyph outline -f
|
|
110
110
|
]
|
111
111
|
]
|
112
112
|
section[
|
113
|
-
@title[
|
113
|
+
@title[stats]
|
114
|
+
@id[c_stats]
|
115
|
+
rw:[stats_option|-o[{{0}}|If specified, general statistics about {{0}} are displayed (see =>[#stats_{{0}}]).]]
|
116
|
+
rw:[stats_long_option|long_option[{{0}}|Display detailed statistics about the specified {{0}}.]]
|
117
|
+
p[Displays project statistics (\.fmi[this command|#stats]).]
|
118
|
+
examples[
|
119
|
+
glyph stats -m
|
120
|
+
glyph stats --link=h3rald.com
|
121
|
+
]
|
122
|
+
options[
|
123
|
+
stats_option[bookmarks]
|
124
|
+
stats_long_option[bookmark]
|
125
|
+
-o[files|If specified, general statistics about project files are displayed.]
|
126
|
+
stats_option[links]
|
127
|
+
long_option[link|Display detailed statistics about all links whose target matches the specified regular expression.]
|
128
|
+
stats_option[macros]
|
129
|
+
stats_long_option[macro]
|
130
|
+
stats_option[snippets]
|
131
|
+
stats_long_option[snippet]
|
132
|
+
]
|
133
|
+
]
|
134
|
+
section[
|
135
|
+
@title[todo]
|
114
136
|
@id[c_todo]
|
115
137
|
Prints all the todo items saved using the %>[todo].
|
116
138
|
example[glyph todo]
|
@@ -0,0 +1,49 @@
|
|
1
|
+
stats_for[
|
2
|
+
@title[all bookmarks]
|
3
|
+
@object[all bookmarks]
|
4
|
+
@command[--bookmarks]
|
5
|
+
@example[
|
6
|
+
===== Bookmarks
|
7
|
+
-- Total Bookmarks: 241
|
8
|
+
-- Total Referenced Bookmarks: 89
|
9
|
+
-- Total Unreferenced Bookmarks: 155
|
10
|
+
-- Bookmarks:
|
11
|
+
attribute_intro auto_regeneration c_add c_compile c_config
|
12
|
+
c_help c_init c_outline c_todo cfg
|
13
|
+
cfg_document cfg_filters cfg_ref cmd_ref compile
|
14
|
+
\[...\]
|
15
|
+
-- Referenced Bookmarks:
|
16
|
+
- attribute_intro (1)
|
17
|
+
- auto_regeneration (2)
|
18
|
+
- c_add (2)
|
19
|
+
- c_compile (10)
|
20
|
+
- c_config (6)
|
21
|
+
- c_init (1)
|
22
|
+
- c_outline (1)
|
23
|
+
\[...\]
|
24
|
+
-- Unreferenced Bookmarks:
|
25
|
+
c_help cmd_ref expanded_values extending h_1
|
26
|
+
h_10 h_102 h_105 h_107 h_109
|
27
|
+
h_111 h_112 h_114 h_115 h_117
|
28
|
+
\[...\]
|
29
|
+
]
|
30
|
+
@remarks[
|
31
|
+
* All the automatically-generated bookmarks (like headers, starting with @h_@) are included as well.
|
32
|
+
]
|
33
|
+
]
|
34
|
+
stats_for[
|
35
|
+
@title[a single bookmark]
|
36
|
+
@object[a single bookmark (e.g. code[yardoc])]
|
37
|
+
@command[--bookmark=c_config]
|
38
|
+
@example[
|
39
|
+
===== Bookmark 'c_config' (header)
|
40
|
+
-- Defined in: text/ref_commands.glyph
|
41
|
+
-- Referenced in:
|
42
|
+
- text/changelog.glyph (2)
|
43
|
+
- text/getting_started/configuration.glyph (1)
|
44
|
+
- text/troubleshooting/errors_command.glyph (3)
|
45
|
+
]
|
46
|
+
@remarks[
|
47
|
+
* Do not prepend the bookmark ID with @#@.
|
48
|
+
]
|
49
|
+
]
|
@@ -0,0 +1,90 @@
|
|
1
|
+
stats_for[
|
2
|
+
@title[all links]
|
3
|
+
@object[all links]
|
4
|
+
@command[--links]
|
5
|
+
@example[
|
6
|
+
===== Links
|
7
|
+
-- Total Internal Links: 89
|
8
|
+
-- Internal Links
|
9
|
+
- #attribute_intro
|
10
|
+
- #auto_regeneration
|
11
|
+
- #c_add
|
12
|
+
- #c_compile
|
13
|
+
- #c_config
|
14
|
+
- #c_init
|
15
|
+
- #c_outline
|
16
|
+
- #c_stats
|
17
|
+
- #c_todo
|
18
|
+
- #cfg
|
19
|
+
- #cfg_document
|
20
|
+
- #cfg_filters
|
21
|
+
\[...\]
|
22
|
+
-- Total External Links: 95
|
23
|
+
-- External Links
|
24
|
+
- &\[yardoc\]/Glyph
|
25
|
+
- &\[yardoc\]/Glyph/Document
|
26
|
+
- &\[yardoc\]/Glyph/Interpreter
|
27
|
+
- &\[yardoc\]/Glyph/Macro
|
28
|
+
- &\[yardoc\]/Glyph/Macro/Validators
|
29
|
+
- &\[yardoc\]/Glyph/Macro:update_source
|
30
|
+
- &\[yardoc\]/Glyph/MacroNode
|
31
|
+
- &\[yardoc\]/Glyph/Parser
|
32
|
+
- &\[yardoc\]/Glyph/SyntaxNode
|
33
|
+
- &\[yardoc\]/Macro
|
34
|
+
- http://code.google.com/p/wkhtmltopdf/
|
35
|
+
- http://coderay.rubychan.de/
|
36
|
+
- http://coderay.rubychan.de/doc/classes/CodeRay/Encoders/HTML.html
|
37
|
+
\[...\]
|
38
|
+
]
|
39
|
+
@remarks[
|
40
|
+
* The only criteria used to determine if a link is internal is whether it starts with a @#@ or not.
|
41
|
+
]
|
42
|
+
]
|
43
|
+
stats_for[
|
44
|
+
@title[links matching a regular expression]
|
45
|
+
@object[links matching a regular expression (e.g. code[/c_/])]
|
46
|
+
@command[--link=c_]
|
47
|
+
@example[
|
48
|
+
===== Links matching /c_/
|
49
|
+
-- Total Links: 8
|
50
|
+
-- Link Targets:
|
51
|
+
- #c_add
|
52
|
+
- #c_compile
|
53
|
+
- #c_config
|
54
|
+
- #c_init
|
55
|
+
- #c_outline
|
56
|
+
- #c_stats
|
57
|
+
- #c_todo
|
58
|
+
- #esc_quot
|
59
|
+
-- Details:
|
60
|
+
- #c_add (2)
|
61
|
+
- text/troubleshooting/errors_command.glyph (1)
|
62
|
+
- text/troubleshooting/errors_generic.glyph (1)
|
63
|
+
- #c_compile (10)
|
64
|
+
- text/changelog.glyph (1)
|
65
|
+
- text/compiling/compiling.glyph (2)
|
66
|
+
- text/compiling/lite_mode.glyph (1)
|
67
|
+
- text/compiling/programmatic_usage.glyph (2)
|
68
|
+
- text/getting_started/create_project.glyph (1)
|
69
|
+
- text/ref_config.glyph (1)
|
70
|
+
- text/troubleshooting/errors_command.glyph (2)
|
71
|
+
- #c_config (6)
|
72
|
+
- text/changelog.glyph (2)
|
73
|
+
- text/getting_started/configuration.glyph (1)
|
74
|
+
- text/troubleshooting/errors_command.glyph (3)
|
75
|
+
- #c_init (1)
|
76
|
+
- text/troubleshooting/errors_generic.glyph (1)
|
77
|
+
- #c_outline (1)
|
78
|
+
- text/changelog.glyph (1)
|
79
|
+
- #c_stats (1)
|
80
|
+
- text/stats/stats.glyph (1)
|
81
|
+
- #c_todo (1)
|
82
|
+
- text/macros/macros_inline.glyph (1)
|
83
|
+
- #esc_quot (2)
|
84
|
+
- text/extending/macro_def.glyph (1)
|
85
|
+
- text/text_editing/macro_intro.glyph (1)
|
86
|
+
]
|
87
|
+
@remarks[
|
88
|
+
* No distinction between external and internal targets is made.
|
89
|
+
]
|
90
|
+
]
|
@@ -0,0 +1,73 @@
|
|
1
|
+
stats_for[
|
2
|
+
@title[all macros]
|
3
|
+
@object[all macros]
|
4
|
+
@command[--macros]
|
5
|
+
@example[
|
6
|
+
===== Macros
|
7
|
+
-- Total Macro Instances: 2497
|
8
|
+
-- Total Macro Definitions: 65
|
9
|
+
-- Total Macro Aliases: 57
|
10
|
+
-- Total Used Macro Definitions: 56
|
11
|
+
-- Macro Definitions:
|
12
|
+
#> $> %> alias: aliases
|
13
|
+
anchor and article author block_example
|
14
|
+
book box class codeblock comment
|
15
|
+
condition config config: config_table default
|
16
|
+
document draftcomment eq error_table escape
|
17
|
+
example examples features figure fmi
|
18
|
+
head highlight image include issue
|
19
|
+
link macro: markdown match navigation
|
20
|
+
not note option or parameters
|
21
|
+
pubdate ref_config ref_error ref_macro release
|
22
|
+
revision rewrite: ruby section snippet
|
23
|
+
snippet: stats_for style subtitle textile
|
24
|
+
title toc todo values \|xml\|
|
25
|
+
|
26
|
+
-- Used Macro Definitions:
|
27
|
+
#> $> %> aliases anchor
|
28
|
+
and author block_example book box
|
29
|
+
class codeblock comment condition config
|
30
|
+
config_table default document eq error_table
|
31
|
+
escape example examples features figure
|
32
|
+
fmi head highlight image include
|
33
|
+
issue link note option or
|
34
|
+
parameters pubdate ref_config ref_error ref_macro
|
35
|
+
release revision rewrite: ruby section
|
36
|
+
snippet snippet: stats_for style subtitle
|
37
|
+
textile title toc todo values
|
38
|
+
\|xml\|
|
39
|
+
]
|
40
|
+
@remarks[
|
41
|
+
* Only macro _definitions_ (not their _aliases_) are displayed, both default and user-defined.
|
42
|
+
* The @\|xml\|@ macro is a special macro used if the $>[options.xml_fallback] is enabled.
|
43
|
+
* There's no distinction between macros defined by the user and macros defined by Glyph itself.
|
44
|
+
]
|
45
|
+
]
|
46
|
+
stats_for[
|
47
|
+
@title[a single macro]
|
48
|
+
@object[a single macro (e.g. code[note])]
|
49
|
+
@command[--macro=note]
|
50
|
+
@example[
|
51
|
+
===== Macro 'note'
|
52
|
+
-- Total Instances: 18
|
53
|
+
-- Occurrences:
|
54
|
+
- text/compiling/compiling.glyph (2)
|
55
|
+
- text/compiling/programmatic_usage.glyph (1)
|
56
|
+
- text/extending/params_attrs.glyph (1)
|
57
|
+
- text/getting_started/configuration.glyph (1)
|
58
|
+
- text/stats/macros.glyph (2)
|
59
|
+
- text/text_editing/attribute_intro.glyph (1)
|
60
|
+
- text/text_editing/esc_quot.glyph (1)
|
61
|
+
- text/text_editing/images.glyph (1)
|
62
|
+
- text/text_editing/inclusions.glyph (3)
|
63
|
+
- text/text_editing/links.glyph (1)
|
64
|
+
- text/text_editing/raw_html.glyph (1)
|
65
|
+
- text/text_editing/section_aliases.glyph (1)
|
66
|
+
- text/text_editing/xml_fallback.glyph (2)
|
67
|
+
]
|
68
|
+
@remarks[
|
69
|
+
* All the instances of the specified macro definition _and all its aliases_ are collected, regardless whether a definition or an alias is specified.
|
70
|
+
* If you use custom macros, make sure they call the =>[&[yardoc]/Glyph/Macro:update_source|Macro#update_source] appropriately method if necessary.
|
71
|
+
* If macros are used within =>[#rewriting|rewritten] macros, they'll be also listed in each file where the rewritten macro is used.
|
72
|
+
]
|
73
|
+
]
|
@@ -0,0 +1,50 @@
|
|
1
|
+
stats_for[
|
2
|
+
@title[all snippets]
|
3
|
+
@object[all snippets]
|
4
|
+
@command[--snippets]
|
5
|
+
@example[
|
6
|
+
===== Snippets
|
7
|
+
-- Total Snippets: 21
|
8
|
+
-- Total Used Snippets: 21
|
9
|
+
-- Total Unused Snippets: 0
|
10
|
+
-- Snippets:
|
11
|
+
bin_params called_on_files coderay filter_by_ext gcode
|
12
|
+
glang htmlcode img_attrs img_file macros
|
13
|
+
markups only_after_declaration only_defined_through opt prince
|
14
|
+
referenced_with_path sq_esc unsafe uv wkhtml
|
15
|
+
yardoc
|
16
|
+
-- Used Snippets:
|
17
|
+
bin_params called_on_files coderay filter_by_ext gcode
|
18
|
+
glang htmlcode img_attrs img_file macros
|
19
|
+
markups only_after_declaration only_defined_through opt prince
|
20
|
+
referenced_with_path sq_esc unsafe uv wkhtml
|
21
|
+
yardoc
|
22
|
+
]
|
23
|
+
@remarks[
|
24
|
+
* Information on snippet usage and definitions is available only when displaying statistics for a single snippet.
|
25
|
+
]
|
26
|
+
]
|
27
|
+
stats_for[
|
28
|
+
@title[a single snippet]
|
29
|
+
@object[a single snippet (e.g. code[yardoc])]
|
30
|
+
@command[--snippet=yardoc]
|
31
|
+
@example[
|
32
|
+
===== Snippet 'yardoc'
|
33
|
+
-- Definition:
|
34
|
+
-------------------
|
35
|
+
http://yardoc.org/docs/h3rald-glyph
|
36
|
+
-------------------
|
37
|
+
-- Total Used Instances: 18
|
38
|
+
-- Usage Details:
|
39
|
+
- text/extending/bookmarks_headers.glyph (1)
|
40
|
+
- text/extending/further_reading.glyph (5)
|
41
|
+
- text/extending/internals.glyph (5)
|
42
|
+
- text/extending/macro_def.glyph (3)
|
43
|
+
- text/extending/validators.glyph (1)
|
44
|
+
- text/macros/macros_core.glyph (2)
|
45
|
+
- text/stats/macros.glyph (1)
|
46
|
+
]
|
47
|
+
@remarks[
|
48
|
+
* Nested snippets appear as within the file containing the top-level snippet.
|
49
|
+
]
|
50
|
+
]
|