mizuho 0.9.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (295) hide show
  1. data/LICENSE.txt +20 -0
  2. data/README.markdown +61 -0
  3. data/Rakefile +41 -0
  4. data/asciidoc/BUGS +39 -0
  5. data/asciidoc/BUGS.txt +32 -0
  6. data/asciidoc/CHANGELOG +1796 -0
  7. data/asciidoc/CHANGELOG.txt +1810 -0
  8. data/asciidoc/COPYING +339 -0
  9. data/asciidoc/COPYRIGHT +18 -0
  10. data/asciidoc/INSTALL +76 -0
  11. data/asciidoc/INSTALL.txt +71 -0
  12. data/asciidoc/Makefile.in +161 -0
  13. data/asciidoc/README +46 -0
  14. data/asciidoc/README.txt +36 -0
  15. data/asciidoc/a2x +674 -0
  16. data/asciidoc/asciidoc.conf +455 -0
  17. data/asciidoc/asciidoc.py +4998 -0
  18. data/asciidoc/common.aap +9 -0
  19. data/asciidoc/configure +2840 -0
  20. data/asciidoc/configure.ac +11 -0
  21. data/asciidoc/dblatex/asciidoc-dblatex.sty +20 -0
  22. data/asciidoc/dblatex/asciidoc-dblatex.xsl +32 -0
  23. data/asciidoc/dblatex/dblatex-readme.txt +39 -0
  24. data/asciidoc/doc/a2x.1 +257 -0
  25. data/asciidoc/doc/a2x.1.txt +204 -0
  26. data/asciidoc/doc/article.css-embedded.html +602 -0
  27. data/asciidoc/doc/article.html +46 -0
  28. data/asciidoc/doc/article.pdf +0 -0
  29. data/asciidoc/doc/article.txt +122 -0
  30. data/asciidoc/doc/asciidoc-revhistory.xml +27 -0
  31. data/asciidoc/doc/asciidoc.1 +155 -0
  32. data/asciidoc/doc/asciidoc.1.css-embedded.html +598 -0
  33. data/asciidoc/doc/asciidoc.1.css.html +212 -0
  34. data/asciidoc/doc/asciidoc.1.html +190 -0
  35. data/asciidoc/doc/asciidoc.1.txt +118 -0
  36. data/asciidoc/doc/asciidoc.conf +8 -0
  37. data/asciidoc/doc/asciidoc.css-embedded.html +7853 -0
  38. data/asciidoc/doc/asciidoc.css.html +7416 -0
  39. data/asciidoc/doc/asciidoc.dict +733 -0
  40. data/asciidoc/doc/asciidoc.html +3339 -0
  41. data/asciidoc/doc/asciidoc.txt +4979 -0
  42. data/asciidoc/doc/asciimathml.txt +64 -0
  43. data/asciidoc/doc/book-multi.css-embedded.html +575 -0
  44. data/asciidoc/doc/book-multi.html +55 -0
  45. data/asciidoc/doc/book-multi.txt +155 -0
  46. data/asciidoc/doc/book.css-embedded.html +607 -0
  47. data/asciidoc/doc/book.html +43 -0
  48. data/asciidoc/doc/book.txt +131 -0
  49. data/asciidoc/doc/customers.csv +18 -0
  50. data/asciidoc/doc/docbook-xsl.css +272 -0
  51. data/asciidoc/doc/faq.txt +547 -0
  52. data/asciidoc/doc/latex-backend.html +117 -0
  53. data/asciidoc/doc/latex-backend.txt +191 -0
  54. data/asciidoc/doc/latexmath.txt +244 -0
  55. data/asciidoc/doc/latexmathml.txt +41 -0
  56. data/asciidoc/doc/main.aap +297 -0
  57. data/asciidoc/doc/music-filter.html +566 -0
  58. data/asciidoc/doc/music-filter.pdf +0 -0
  59. data/asciidoc/doc/music-filter.txt +158 -0
  60. data/asciidoc/doc/source-highlight-filter.html +214 -0
  61. data/asciidoc/doc/source-highlight-filter.pdf +0 -0
  62. data/asciidoc/doc/source-highlight-filter.txt +203 -0
  63. data/asciidoc/docbook-xsl/asciidoc-docbook-xsl.txt +43 -0
  64. data/asciidoc/docbook-xsl/chunked.xsl +19 -0
  65. data/asciidoc/docbook-xsl/common.xsl +67 -0
  66. data/asciidoc/docbook-xsl/fo.xsl +149 -0
  67. data/asciidoc/docbook-xsl/htmlhelp.xsl +17 -0
  68. data/asciidoc/docbook-xsl/manpage.xsl +31 -0
  69. data/asciidoc/docbook-xsl/text.xsl +50 -0
  70. data/asciidoc/docbook-xsl/xhtml.xsl +14 -0
  71. data/asciidoc/docbook.conf +721 -0
  72. data/asciidoc/examples/website/ASCIIMathML.js +938 -0
  73. data/asciidoc/examples/website/CHANGELOG.html +4389 -0
  74. data/asciidoc/examples/website/CHANGELOG.txt +1810 -0
  75. data/asciidoc/examples/website/INSTALL.html +161 -0
  76. data/asciidoc/examples/website/INSTALL.txt +71 -0
  77. data/asciidoc/examples/website/LaTeXMathML.js +1223 -0
  78. data/asciidoc/examples/website/README-website.html +118 -0
  79. data/asciidoc/examples/website/README-website.txt +29 -0
  80. data/asciidoc/examples/website/README.html +125 -0
  81. data/asciidoc/examples/website/README.txt +36 -0
  82. data/asciidoc/examples/website/a2x.1.html +419 -0
  83. data/asciidoc/examples/website/a2x.1.txt +204 -0
  84. data/asciidoc/examples/website/asciidoc-docbook-xsl.html +130 -0
  85. data/asciidoc/examples/website/asciidoc-docbook-xsl.txt +43 -0
  86. data/asciidoc/examples/website/asciidoc-graphviz-sample.txt +130 -0
  87. data/asciidoc/examples/website/asciimathml.txt +64 -0
  88. data/asciidoc/examples/website/build-website.sh +25 -0
  89. data/asciidoc/examples/website/customers.csv +18 -0
  90. data/asciidoc/examples/website/downloads.html +257 -0
  91. data/asciidoc/examples/website/downloads.txt +121 -0
  92. data/asciidoc/examples/website/faq.html +673 -0
  93. data/asciidoc/examples/website/faq.txt +547 -0
  94. data/asciidoc/examples/website/index.html +419 -0
  95. data/asciidoc/examples/website/index.txt +245 -0
  96. data/asciidoc/examples/website/latex-backend.html +535 -0
  97. data/asciidoc/examples/website/latex-backend.txt +191 -0
  98. data/asciidoc/examples/website/latexmathml.txt +41 -0
  99. data/asciidoc/examples/website/layout1.conf +161 -0
  100. data/asciidoc/examples/website/layout1.css +65 -0
  101. data/asciidoc/examples/website/layout2.conf +158 -0
  102. data/asciidoc/examples/website/layout2.css +93 -0
  103. data/asciidoc/examples/website/manpage.html +266 -0
  104. data/asciidoc/examples/website/manpage.txt +118 -0
  105. data/asciidoc/examples/website/music-filter.html +242 -0
  106. data/asciidoc/examples/website/music-filter.txt +158 -0
  107. data/asciidoc/examples/website/music1.abc +12 -0
  108. data/asciidoc/examples/website/music1.png +0 -0
  109. data/asciidoc/examples/website/music2.ly +9 -0
  110. data/asciidoc/examples/website/music2.png +0 -0
  111. data/asciidoc/examples/website/newlists.txt +40 -0
  112. data/asciidoc/examples/website/newtables.txt +397 -0
  113. data/asciidoc/examples/website/sample1.png +0 -0
  114. data/asciidoc/examples/website/sample3.png +0 -0
  115. data/asciidoc/examples/website/sample4.png +0 -0
  116. data/asciidoc/examples/website/source-highlight-filter.html +286 -0
  117. data/asciidoc/examples/website/source-highlight-filter.txt +203 -0
  118. data/asciidoc/examples/website/support.html +78 -0
  119. data/asciidoc/examples/website/support.txt +5 -0
  120. data/asciidoc/examples/website/toc.js +69 -0
  121. data/asciidoc/examples/website/userguide.html +7460 -0
  122. data/asciidoc/examples/website/userguide.txt +4979 -0
  123. data/asciidoc/examples/website/version83.txt +37 -0
  124. data/asciidoc/examples/website/version9.html +143 -0
  125. data/asciidoc/examples/website/version9.txt +48 -0
  126. data/asciidoc/examples/website/xhtml11-manpage.css +18 -0
  127. data/asciidoc/examples/website/xhtml11-quirks.css +41 -0
  128. data/asciidoc/examples/website/xhtml11.css +328 -0
  129. data/asciidoc/filters/code/code-filter-readme.txt +37 -0
  130. data/asciidoc/filters/code/code-filter-test.txt +15 -0
  131. data/asciidoc/filters/code/code-filter.conf +8 -0
  132. data/asciidoc/filters/code/code-filter.py +239 -0
  133. data/asciidoc/filters/graphviz/asciidoc-graphviz-sample.txt +130 -0
  134. data/asciidoc/filters/graphviz/graphviz-filter.conf +39 -0
  135. data/asciidoc/filters/graphviz/graphviz2png.py +154 -0
  136. data/asciidoc/filters/music/music-filter-test.txt +40 -0
  137. data/asciidoc/filters/music/music-filter.conf +40 -0
  138. data/asciidoc/filters/music/music2png.py +189 -0
  139. data/asciidoc/filters/source/source-highlight-filter-test.txt +19 -0
  140. data/asciidoc/filters/source/source-highlight-filter.conf +108 -0
  141. data/asciidoc/help.conf +213 -0
  142. data/asciidoc/html4.conf +460 -0
  143. data/asciidoc/images/highlighter.png +0 -0
  144. data/asciidoc/images/icons/README +5 -0
  145. data/asciidoc/images/icons/callouts/1.png +0 -0
  146. data/asciidoc/images/icons/callouts/10.png +0 -0
  147. data/asciidoc/images/icons/callouts/11.png +0 -0
  148. data/asciidoc/images/icons/callouts/12.png +0 -0
  149. data/asciidoc/images/icons/callouts/13.png +0 -0
  150. data/asciidoc/images/icons/callouts/14.png +0 -0
  151. data/asciidoc/images/icons/callouts/15.png +0 -0
  152. data/asciidoc/images/icons/callouts/2.png +0 -0
  153. data/asciidoc/images/icons/callouts/3.png +0 -0
  154. data/asciidoc/images/icons/callouts/4.png +0 -0
  155. data/asciidoc/images/icons/callouts/5.png +0 -0
  156. data/asciidoc/images/icons/callouts/6.png +0 -0
  157. data/asciidoc/images/icons/callouts/7.png +0 -0
  158. data/asciidoc/images/icons/callouts/8.png +0 -0
  159. data/asciidoc/images/icons/callouts/9.png +0 -0
  160. data/asciidoc/images/icons/caution.png +0 -0
  161. data/asciidoc/images/icons/example.png +0 -0
  162. data/asciidoc/images/icons/home.png +0 -0
  163. data/asciidoc/images/icons/important.png +0 -0
  164. data/asciidoc/images/icons/next.png +0 -0
  165. data/asciidoc/images/icons/note.png +0 -0
  166. data/asciidoc/images/icons/prev.png +0 -0
  167. data/asciidoc/images/icons/tip.png +0 -0
  168. data/asciidoc/images/icons/up.png +0 -0
  169. data/asciidoc/images/icons/warning.png +0 -0
  170. data/asciidoc/images/smallnew.png +0 -0
  171. data/asciidoc/images/tiger.png +0 -0
  172. data/asciidoc/install-sh +201 -0
  173. data/asciidoc/javascripts/ASCIIMathML.js +938 -0
  174. data/asciidoc/javascripts/LaTeXMathML.js +1223 -0
  175. data/asciidoc/javascripts/toc.js +69 -0
  176. data/asciidoc/lang-es.conf +15 -0
  177. data/asciidoc/latex.conf +663 -0
  178. data/asciidoc/stylesheets/docbook-xsl.css +272 -0
  179. data/asciidoc/stylesheets/xhtml11-manpage.css +18 -0
  180. data/asciidoc/stylesheets/xhtml11-quirks.css +41 -0
  181. data/asciidoc/stylesheets/xhtml11.css +328 -0
  182. data/asciidoc/text.conf +16 -0
  183. data/asciidoc/vim/ftdetect/asciidoc_filetype.vim +53 -0
  184. data/asciidoc/vim/syntax/asciidoc.vim +165 -0
  185. data/asciidoc/wordpress.conf +48 -0
  186. data/asciidoc/xhtml11-quirks.conf +57 -0
  187. data/asciidoc/xhtml11.conf +645 -0
  188. data/bin/mizuho +47 -0
  189. data/bin/mizuho-asciidoc +4 -0
  190. data/lib/mizuho.rb +10 -0
  191. data/lib/mizuho/chapter.rb +54 -0
  192. data/lib/mizuho/generator.rb +134 -0
  193. data/lib/mizuho/heading.rb +46 -0
  194. data/lib/mizuho/parser.rb +103 -0
  195. data/lib/mizuho/source_highlight.rb +2 -0
  196. data/lib/mizuho/template.rb +50 -0
  197. data/source-highlight/ada.lang +38 -0
  198. data/source-highlight/bib.lang +6 -0
  199. data/source-highlight/bison.lang +3 -0
  200. data/source-highlight/c.lang +41 -0
  201. data/source-highlight/c_comment.lang +27 -0
  202. data/source-highlight/c_string.lang +9 -0
  203. data/source-highlight/caml.lang +16 -0
  204. data/source-highlight/changelog.lang +8 -0
  205. data/source-highlight/clike_vardeclaration.lang +4 -0
  206. data/source-highlight/cpp.lang +15 -0
  207. data/source-highlight/csharp.lang +36 -0
  208. data/source-highlight/css.lang +14 -0
  209. data/source-highlight/css_common.outlang +26 -0
  210. data/source-highlight/darwin/source-highlight +0 -0
  211. data/source-highlight/default.css +51 -0
  212. data/source-highlight/default.lang +8 -0
  213. data/source-highlight/default.style +57 -0
  214. data/source-highlight/desktop.lang +7 -0
  215. data/source-highlight/diff.lang +32 -0
  216. data/source-highlight/docbook.outlang +36 -0
  217. data/source-highlight/esc.outlang +46 -0
  218. data/source-highlight/esc.style +35 -0
  219. data/source-highlight/extreme_comment.lang +5 -0
  220. data/source-highlight/extreme_comment2.lang +5 -0
  221. data/source-highlight/extreme_comment3.lang +15 -0
  222. data/source-highlight/fixed-fortran.lang +5 -0
  223. data/source-highlight/flex.lang +37 -0
  224. data/source-highlight/fortran.lang +57 -0
  225. data/source-highlight/function.lang +2 -0
  226. data/source-highlight/glsl.lang +86 -0
  227. data/source-highlight/haxe.lang +7 -0
  228. data/source-highlight/html.lang +7 -0
  229. data/source-highlight/html.outlang +25 -0
  230. data/source-highlight/html_common.outlang +35 -0
  231. data/source-highlight/html_notfixed.outlang +22 -0
  232. data/source-highlight/html_ref.outlang +6 -0
  233. data/source-highlight/htmlcss.outlang +28 -0
  234. data/source-highlight/htmltable.outlang +14 -0
  235. data/source-highlight/htmltablelinenum.outlang +26 -0
  236. data/source-highlight/java.lang +26 -0
  237. data/source-highlight/javadoc.outlang +24 -0
  238. data/source-highlight/javascript.lang +27 -0
  239. data/source-highlight/key_string.lang +4 -0
  240. data/source-highlight/lang.map +108 -0
  241. data/source-highlight/langdef.lang +21 -0
  242. data/source-highlight/latex.lang +52 -0
  243. data/source-highlight/latex.outlang +59 -0
  244. data/source-highlight/latexcolor.outlang +44 -0
  245. data/source-highlight/ldap.lang +10 -0
  246. data/source-highlight/log.lang +53 -0
  247. data/source-highlight/logtalk.lang +85 -0
  248. data/source-highlight/lsm.lang +7 -0
  249. data/source-highlight/lua.lang +27 -0
  250. data/source-highlight/m4.lang +27 -0
  251. data/source-highlight/makefile.lang +42 -0
  252. data/source-highlight/nohilite.lang +2 -0
  253. data/source-highlight/number.lang +3 -0
  254. data/source-highlight/outlang.lang +16 -0
  255. data/source-highlight/outlang.map +12 -0
  256. data/source-highlight/pascal.lang +20 -0
  257. data/source-highlight/perl.lang +134 -0
  258. data/source-highlight/php.lang +25 -0
  259. data/source-highlight/postscript.lang +42 -0
  260. data/source-highlight/prolog.lang +37 -0
  261. data/source-highlight/properties.lang +7 -0
  262. data/source-highlight/python.lang +26 -0
  263. data/source-highlight/ruby.lang +32 -0
  264. data/source-highlight/scala.lang +31 -0
  265. data/source-highlight/script_comment.lang +3 -0
  266. data/source-highlight/sh.lang +38 -0
  267. data/source-highlight/slang.lang +25 -0
  268. data/source-highlight/sml.lang +5 -0
  269. data/source-highlight/source-highlight +24 -0
  270. data/source-highlight/spec.lang +12 -0
  271. data/source-highlight/sql.lang +46 -0
  272. data/source-highlight/style.defaults +15 -0
  273. data/source-highlight/style.lang +16 -0
  274. data/source-highlight/style2.style +10 -0
  275. data/source-highlight/style3.style +10 -0
  276. data/source-highlight/symbols.lang +2 -0
  277. data/source-highlight/tcl.lang +35 -0
  278. data/source-highlight/texinfo.outlang +34 -0
  279. data/source-highlight/texinfo.style +20 -0
  280. data/source-highlight/url.lang +3 -0
  281. data/source-highlight/xhtml.outlang +25 -0
  282. data/source-highlight/xhtml_common.outlang +8 -0
  283. data/source-highlight/xhtml_notfixed.outlang +16 -0
  284. data/source-highlight/xhtmlcss.outlang +19 -0
  285. data/source-highlight/xhtmltable.outlang +7 -0
  286. data/source-highlight/xml.lang +17 -0
  287. data/source-highlight/xorg.lang +10 -0
  288. data/templates/asciidoc.css +358 -0
  289. data/templates/asciidoc.html.erb +86 -0
  290. data/templates/manualsonrails.css +165 -0
  291. data/templates/manualsonrails.html.erb +97 -0
  292. data/test/generator_spec.rb +60 -0
  293. data/test/parser_spec.rb +239 -0
  294. data/test/spec_helper.rb +51 -0
  295. metadata +358 -0
@@ -0,0 +1,118 @@
1
+ ASCIIDOC(1)
2
+ ===========
3
+ Stuart Rackham <srackham@gmail.com>
4
+
5
+
6
+ NAME
7
+ ----
8
+ asciidoc - converts an AsciiDoc text file to DocBook, HTML or LinuxDoc
9
+
10
+
11
+ SYNOPSIS
12
+ --------
13
+ *asciidoc* ['OPTIONS'] 'FILE'
14
+
15
+
16
+ DESCRIPTION
17
+ -----------
18
+ The asciidoc(1) command translates the AsciiDoc text file 'FILE' to a
19
+ DocBook, HTML or LinuxDoc file. If 'FILE' is '-' then the standard
20
+ input is used.
21
+
22
+
23
+ OPTIONS
24
+ -------
25
+ *-a, --attribute*='ATTRIBUTE'::
26
+ Define or delete document attribute. 'ATTRIBUTE' is formatted like
27
+ 'NAME=VALUE'. Command-line attributes take precedence over
28
+ document and configuration file attributes. Alternate acceptable
29
+ forms are 'NAME' (the 'VALUE' defaults to an empty string);
30
+ 'NAME!' (delete the 'NAME' attribute); 'NAME@' (do not override
31
+ document or configuration file attributes). Values containing
32
+ spaces should be enclosed in double-quote characters. This option
33
+ may be specified more than once.
34
+
35
+ *-b, --backend*='BACKEND'::
36
+ Backend output file format: 'docbook', 'xhtml11' or 'html4'.
37
+ Defaults to 'xhtml11'.
38
+
39
+ *-f, --conf-file*='CONF_FILE'::
40
+ Use configuration file 'CONF_FILE'.Configuration files processed
41
+ in command-line order (after implicit configuration files). This
42
+ option may be specified more than once.
43
+
44
+ *-d, --doctype*='DOCTYPE'::
45
+ Document type: 'article', 'manpage' or 'book'. The 'book' document
46
+ type is only supported by the 'docbook' backend. Default document
47
+ type is 'article'.
48
+
49
+ *-c, --dump-conf*::
50
+ Dump configuration to stdout.
51
+
52
+ *-h, --help*[='TOPIC']::
53
+ Print help TOPIC. *--help*='topics' will print a list of help
54
+ topics, *--help*='syntax' summarizes AsciiDoc syntax,
55
+ *--help*='manpage' prints the AsciiDoc manpage.
56
+
57
+ *-e, --no-conf*::
58
+ Exclude implicitly loaded configuration files except for those
59
+ named like the input file ('infile.conf' and
60
+ 'infile-backend.conf').
61
+
62
+ *-s, --no-header-footer*::
63
+ Suppress document header and footer output.
64
+
65
+ *-o, --out-file*='OUT_FILE'::
66
+ Write output to file 'OUT_FILE'. Defaults to the base name of
67
+ input file with 'backend' extension. If the input is stdin then
68
+ the outfile defaults to stdout. If 'OUT_FILE' is '-' then the
69
+ standard output is used.
70
+
71
+ *-n, --section-numbers*::
72
+ Auto-number HTML article section titles. Synonym for *-a
73
+ numbered*.
74
+
75
+ *--unsafe*::
76
+ Disable safe mode. Safe mode is enabled by default, disabling
77
+ it is potentially dangerous.
78
+
79
+ *-v, --verbose*::
80
+ Verbosely print processing information and configuration file
81
+ checks to stderr.
82
+
83
+ *--version*::
84
+ Print program version number.
85
+
86
+
87
+ EXIT STATUS
88
+ -----------
89
+ *0*::
90
+ Success
91
+
92
+ *1*::
93
+ Failure (syntax or usage error; configuration error; document
94
+ processing failure; unexpected error).
95
+
96
+
97
+ BUGS
98
+ ----
99
+ See the AsciiDoc distribution BUGS file.
100
+
101
+
102
+ AUTHOR
103
+ ------
104
+ Written by Stuart Rackham, <srackham@gmail.com>
105
+
106
+
107
+ RESOURCES
108
+ ---------
109
+ SourceForge: <http://sourceforge.net/projects/asciidoc/>
110
+
111
+ Main web site: <http://www.methods.co.nz/asciidoc/>
112
+
113
+
114
+ COPYING
115
+ -------
116
+ Copyright \(C) 2002-2008 Stuart Rackham. Free use of this software is
117
+ granted under the terms of the GNU General Public License (GPL).
118
+
@@ -0,0 +1,242 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
2
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6
+ <meta name="generator" content="AsciiDoc 8.3.3" />
7
+ <link rel="stylesheet" href="./xhtml11.css" type="text/css" />
8
+ <link rel="stylesheet" href="./xhtml11-quirks.css" type="text/css" />
9
+ <link rel="stylesheet" href="./layout1.css" type="text/css" />
10
+ <title>Music Filter</title>
11
+ </head>
12
+ <body>
13
+ <div id="layout-banner">
14
+ <div id="layout-title">AsciiDoc</div>
15
+ <div id="layout-description">Text based document generation</div>
16
+ </div>
17
+ <table>
18
+ <tr valign="top">
19
+ <td id="layout-menu">
20
+ <div>&#187;<a href="index.html">Home</a></div>
21
+ <div>&#187;<a href="manpage.html">Man&nbsp;Page</a></div>
22
+ <div>&#187;<a href="userguide.html">User&nbsp;Guide</a></div>
23
+ <div>&#187;<a href="http://powerman.name/doc/asciidoc">Cheatsheet</a></div>
24
+ <div>&#187;<a href="a2x.1.html">a2x</a></div>
25
+ <div>&#187;<a href="README.html">README</a></div>
26
+ <div>&#187;<a href="CHANGELOG.html">ChangeLog</a></div>
27
+ <div>&#187;<a href="INSTALL.html">Installation</a></div>
28
+ <div>&#187;<a href="downloads.html">Downloads</a></div>
29
+ <div>&#187;<a href="faq.html">FAQ</a></div>
30
+ <div>&#187;<a href="support.html">Support</a></div>
31
+ <div id="page-source">&#187;<a href="music-filter.txt">Page&nbsp;Source</a></div>
32
+ </td>
33
+ <td>
34
+ <div id="layout-content">
35
+ <div id="header">
36
+ <h1>Music Filter</h1>
37
+ </div>
38
+ <div id="preamble">
39
+ <div class="sectionbody">
40
+ <div class="paragraph"><p>The <em>AsciiDoc</em> distribution includes a Music Block filter that
41
+ translates music in <a href="http://lilypond.org/">LilyPond</a> or
42
+ <a href="http://abcnotation.org.uk/">ABC</a> notation to standard classical
43
+ notation in the form of a trimmed PNG image which is automatically
44
+ inserted into the <em>AsciiDoc</em> output document (see the <a href="#X1">examples below</a>).</p></div>
45
+ <div class="paragraph"><p>Actually the filter (<tt>./filters/music2png.py</tt>) can be used outside
46
+ <em>AsciiDoc</em> to convert LilyPond or ABC music files to PNG images.
47
+ Execute the following command to see how to use it:</p></div>
48
+ <div class="literalblock">
49
+ <div class="content">
50
+ <pre><tt>$ ./filters/music2png.py --help</tt></pre>
51
+ </div></div>
52
+ <div class="paragraph"><p>The Music Filter can be used as a model for filters that convert a
53
+ block of text into a file that is linked or embedded into the <em>AsciiDoc</em>
54
+ output document.</p></div>
55
+ <div class="exampleblock" id="X1">
56
+ <div class="title">Example 1: Music Block containing ABC notation</div>
57
+ <div class="exampleblock-content">
58
+ <div class="paragraph"><p>This Music Block:</p></div>
59
+ <div class="listingblock">
60
+ <div class="content">
61
+ <pre><tt> ["music","music1.png",scaledwidth="100%"]
62
+ ---------------------------------------------------------------------
63
+ T:The Butterfly
64
+ R:slip jig
65
+ C:Tommy Potts
66
+ H:Fiddle player Tommy Potts made this tune from two older slip jigs,
67
+ H:one of which is called "Skin the Peelers" in Roche's collection.
68
+ H:This version by Peter Cooper.
69
+ D:Bothy Band: 1975.
70
+ M:9/8
71
+ K:Em
72
+ vB2(E G2)(E F3)|B2(E G2)(E F)ED|vB2(E G2)(E F3)|(B2d) d2(uB A)FD:|
73
+ |:(vB2c) (e2f) g3|(uB2d) (g2e) (dBA)|(B2c) (e2f) g2(ua|b2a) (g2e) (dBA):|
74
+ |:~B3 (B2A) G2A|~B3 BA(uB d)BA|~B3 (B2A) G2(A|B2d) (g2e) (dBA):|
75
+ ---------------------------------------------------------------------</tt></pre>
76
+ </div></div>
77
+ <div class="paragraph"><p>Renders:</p></div>
78
+ <div class="musicblock">
79
+ <div class="content">
80
+ <img style="border-width: 0;" src="music1.png" alt="music1.png" />
81
+ </div></div>
82
+ </div></div>
83
+ <div class="exampleblock" id="X2">
84
+ <div class="title">Example 2: Music Block containing LilyPond notation</div>
85
+ <div class="exampleblock-content">
86
+ <div class="paragraph"><p>This example contains LilyPond musical markup, it uses the <em>link</em>
87
+ attribute so you can click on the music image to display the source
88
+ notation. The <tt>music2.ly</tt> source file is automatically created and
89
+ retained by the <tt>music2png.py</tt> filter when the <tt>-m</tt> option is used.</p></div>
90
+ <div class="listingblock">
91
+ <div class="content">
92
+ <pre><tt> ["music", "music2.png", "ly", link="music2.ly"]
93
+ ---------------------------------------------------------------------
94
+ \version "2.10.0"
95
+ \paper {
96
+ ragged-right = ##t
97
+ }
98
+ {
99
+ \time 3/4
100
+ \clef bass
101
+ c2 e4 g2. f4 e d c2 r4
102
+ }
103
+ ---------------------------------------------------------------------</tt></pre>
104
+ </div></div>
105
+ <div class="paragraph"><p>Renders:</p></div>
106
+ <div class="musicblock">
107
+ <div class="content">
108
+ <a href="music2.ly">
109
+ <img style="border-width: 0;" src="music2.png" alt="music2.png" />
110
+ </a>
111
+ </div></div>
112
+ </div></div>
113
+ <div class="admonitionblock">
114
+ <table><tr>
115
+ <td class="icon">
116
+ <img src="./images/icons/note.png" alt="Note" />
117
+ </td>
118
+ <td class="content">If you get an error processing the above example it may be that
119
+ it is not compatible with your version of LilyPond. Use the LilyPond
120
+ <tt>convert-ly(1)</tt> utility to update the source to the version that you
121
+ are using.</td>
122
+ </tr></table>
123
+ </div>
124
+ </div>
125
+ </div>
126
+ <h2 id="_using_the_filter">Using the Filter</h2>
127
+ <div class="sectionbody">
128
+ <div class="paragraph"><p>Insert a delimited Music Block containing valid ABC notation into your
129
+ <em>AsciiDoc</em> document:</p></div>
130
+ <div class="ulist"><ul>
131
+ <li>
132
+ <p>
133
+ The Music Block delimiter is the word <tt>music</tt> followed by four or
134
+ more tilde characters.
135
+ </p>
136
+ </li>
137
+ <li>
138
+ <p>
139
+ The Music Block attribute list must contain a file name for the PNG
140
+ output image file followed by the input format (either <em>abc</em> for ABC
141
+ or <em>ly</em> for LilyPond). If the format is omitted ABC notation is
142
+ assumed.
143
+ </p>
144
+ </li>
145
+ <li>
146
+ <p>
147
+ The filter invokes <tt>music2png</tt> with the <tt>-m</tt> option so that music
148
+ images will only be regenerated if the block content has changed.
149
+ </p>
150
+ </li>
151
+ <li>
152
+ <p>
153
+ The optional named block attributes <em>link</em>, <em>width</em> and <em>height</em> are
154
+ also available (see <a href="userguide.html#X55">Image macro attributes</a>
155
+ in the <em>AsciiDoc</em> User Guide).
156
+ </p>
157
+ </li>
158
+ </ul></div>
159
+ </div>
160
+ <h2 id="_limitations">Limitations</h2>
161
+ <div class="sectionbody">
162
+ <div class="ulist"><ul>
163
+ <li>
164
+ <p>
165
+ The <tt><tt>asciidoc(1)</tt></tt> output file cannot be <tt>-</tt> (stdout), you must
166
+ output to a named file.
167
+ </p>
168
+ </li>
169
+ <li>
170
+ <p>
171
+ If the music image file is linked to the output document then the
172
+ image file name in the Music Block attribute list should be a
173
+ relative path name relative to the <em>AsciiDoc</em> output file.
174
+ </p>
175
+ </li>
176
+ </ul></div>
177
+ </div>
178
+ <h2 id="_installation">Installation</h2>
179
+ <div class="sectionbody">
180
+ <div class="paragraph"><p>In addition to <em>AsciiDoc</em> you will need to have installed:</p></div>
181
+ <div class="ulist"><ul>
182
+ <li>
183
+ <p>
184
+ <a href="http://lilypond.org/web/">LilyPond</a> (most Linux distributions include
185
+ this package).
186
+ </p>
187
+ </li>
188
+ <li>
189
+ <p>
190
+ <a href="http://www.imagemagick.org">ImageMagick</a> (most Linux distributions
191
+ include this package).
192
+ </p>
193
+ </li>
194
+ </ul></div>
195
+ <div class="paragraph"><p>Test the music filter it by converting the test file to HTML with <em>AsciiDoc</em>:</p></div>
196
+ <div class="literalblock">
197
+ <div class="content">
198
+ <pre><tt>$ asciidoc -v ./filters/music-filter-test.txt
199
+ $ firefox ./filters/music-filter-test.html &amp;</tt></pre>
200
+ </div></div>
201
+ <div class="paragraph"><p>The filter was developed and tested on Xubuntu Linux using LilyPond
202
+ 2.10.5 and ImageMagick 6.2.4.</p></div>
203
+ <div class="admonitionblock">
204
+ <table><tr>
205
+ <td class="icon">
206
+ <img src="./images/icons/note.png" alt="Note" />
207
+ </td>
208
+ <td class="content">The filter does not work with LilyPond 2.2.6 because it did not
209
+ generate the requested output file name correctly (2.6.3 does not have
210
+ a problem).</td>
211
+ </tr></table>
212
+ </div>
213
+ </div>
214
+ <div id="footer">
215
+ <div id="footer-text">
216
+ Version 8.3.3<br />
217
+ Last updated 2009-01-02 11:18:53 NZDT
218
+ </div>
219
+ <div id="footer-badges">
220
+ <a href="http://validator.w3.org/check?uri=referer">
221
+ <img style="border:none; width:88px; height:31px;"
222
+ src="http://www.w3.org/Icons/valid-xhtml11"
223
+ alt="Valid XHTML 1.1!" />
224
+ </a>
225
+ <a href="http://jigsaw.w3.org/css-validator/check/referer">
226
+ <img style="border:none; width:88px; height:31px;"
227
+ src="http://jigsaw.w3.org/css-validator/images/vcss"
228
+ alt="Valid CSS!" />
229
+ </a>
230
+ <a href="http://www.mozilla.org/products/firefox/">
231
+ <img style="border:none; width:110px; height:32px;"
232
+ src="http://www.spreadfirefox.com/community/images/affiliates/Buttons/110x32/safer.gif"
233
+ alt="Get Firefox!" />
234
+ </a>
235
+ </div>
236
+ </div>
237
+ </div>
238
+ </td>
239
+ </tr>
240
+ </table>
241
+ </body>
242
+ </html>
@@ -0,0 +1,158 @@
1
+ Music Filter
2
+ ============
3
+
4
+ The AsciiDoc distribution includes a Music Block filter that
5
+ translates music in http://lilypond.org/[LilyPond] or
6
+ http://abcnotation.org.uk/[ABC] notation to standard classical
7
+ notation in the form of a trimmed PNG image which is automatically
8
+ inserted into the AsciiDoc output document (see the <<X1,examples
9
+ below>>).
10
+
11
+ Actually the filter (`./filters/music2png.py`) can be used outside
12
+ AsciiDoc to convert LilyPond or ABC music files to PNG images.
13
+ Execute the following command to see how to use it:
14
+
15
+ $ ./filters/music2png.py --help
16
+
17
+ The Music Filter can be used as a model for filters that convert a
18
+ block of text into a file that is linked or embedded into the AsciiDoc
19
+ output document.
20
+
21
+ [[X1]]
22
+ [caption="Example 1: "]
23
+ .Music Block containing ABC notation
24
+ =====================================================================
25
+
26
+ This Music Block:
27
+
28
+ ---------------------------------------------------------------------
29
+ ["music","music1.png",scaledwidth="100%"]
30
+ ---------------------------------------------------------------------
31
+ T:The Butterfly
32
+ R:slip jig
33
+ C:Tommy Potts
34
+ H:Fiddle player Tommy Potts made this tune from two older slip jigs,
35
+ H:one of which is called "Skin the Peelers" in Roche's collection.
36
+ H:This version by Peter Cooper.
37
+ D:Bothy Band: 1975.
38
+ M:9/8
39
+ K:Em
40
+ vB2(E G2)(E F3)|B2(E G2)(E F)ED|vB2(E G2)(E F3)|(B2d) d2(uB A)FD:|
41
+ |:(vB2c) (e2f) g3|(uB2d) (g2e) (dBA)|(B2c) (e2f) g2(ua|b2a) (g2e) (dBA):|
42
+ |:~B3 (B2A) G2A|~B3 BA(uB d)BA|~B3 (B2A) G2(A|B2d) (g2e) (dBA):|
43
+ ---------------------------------------------------------------------
44
+ ---------------------------------------------------------------------
45
+
46
+ Renders:
47
+
48
+ ["music","music1.png",scaledwidth="100%"]
49
+ ---------------------------------------------------------------------
50
+ T:The Butterfly
51
+ R:slip jig
52
+ C:Tommy Potts
53
+ H:Fiddle player Tommy Potts made this tune from two older slip jigs,
54
+ H:one of which is called "Skin the Peelers" in Roche's collection.
55
+ H:This version by Peter Cooper.
56
+ D:Bothy Band: 1975.
57
+ M:9/8
58
+ K:Em
59
+ vB2(E G2)(E F3)|B2(E G2)(E F)ED|vB2(E G2)(E F3)|(B2d) d2(uB A)FD:|
60
+ |:(vB2c) (e2f) g3|(uB2d) (g2e) (dBA)|(B2c) (e2f) g2(ua|b2a) (g2e) (dBA):|
61
+ |:~B3 (B2A) G2A|~B3 BA(uB d)BA|~B3 (B2A) G2(A|B2d) (g2e) (dBA):|
62
+ ---------------------------------------------------------------------
63
+ =====================================================================
64
+
65
+
66
+ [[X2]]
67
+ [caption="Example 2: "]
68
+ .Music Block containing LilyPond notation
69
+ =====================================================================
70
+ This example contains LilyPond musical markup, it uses the 'link'
71
+ attribute so you can click on the music image to display the source
72
+ notation. The `music2.ly` source file is automatically created and
73
+ retained by the `music2png.py` filter when the `-m` option is used.
74
+
75
+ ---------------------------------------------------------------------
76
+ ["music", "music2.png", "ly", link="music2.ly"]
77
+ ---------------------------------------------------------------------
78
+ \version "2.10.0"
79
+ \paper {
80
+ ragged-right = ##t
81
+ }
82
+ {
83
+ \time 3/4
84
+ \clef bass
85
+ c2 e4 g2. f4 e d c2 r4
86
+ }
87
+ ---------------------------------------------------------------------
88
+ ---------------------------------------------------------------------
89
+
90
+ Renders:
91
+
92
+ ["music", "music2.png", "ly", link="music2.ly"]
93
+ ---------------------------------------------------------------------
94
+ \version "2.10.0"
95
+ \paper {
96
+ ragged-right = ##t
97
+ }
98
+ {
99
+ \time 3/4
100
+ \clef bass
101
+ c2 e4 g2. f4 e d c2 r4
102
+ }
103
+ ---------------------------------------------------------------------
104
+ =====================================================================
105
+
106
+ NOTE: If you get an error processing the above example it may be that
107
+ it is not compatible with your version of LilyPond. Use the LilyPond
108
+ `convert-ly(1)` utility to update the source to the version that you
109
+ are using.
110
+
111
+
112
+ Using the Filter
113
+ ----------------
114
+ Insert a delimited Music Block containing valid ABC notation into your
115
+ AsciiDoc document:
116
+
117
+ - The Music Block delimiter is the word `music` followed by four or
118
+ more tilde characters.
119
+ - The Music Block attribute list must contain a file name for the PNG
120
+ output image file followed by the input format (either 'abc' for ABC
121
+ or 'ly' for LilyPond). If the format is omitted ABC notation is
122
+ assumed.
123
+ - The filter invokes `music2png` with the `-m` option so that music
124
+ images will only be regenerated if the block content has changed.
125
+ - The optional named block attributes 'link', 'width' and 'height' are
126
+ also available (see link:userguide.html#X55[Image macro attributes]
127
+ in the AsciiDoc User Guide).
128
+
129
+
130
+ Limitations
131
+ -----------
132
+ - The `asciidoc(1)` output file cannot be `-` (stdout), you must
133
+ output to a named file.
134
+ - If the music image file is linked to the output document then the
135
+ image file name in the Music Block attribute list should be a
136
+ relative path name relative to the AsciiDoc output file.
137
+
138
+
139
+ Installation
140
+ ------------
141
+ In addition to AsciiDoc you will need to have installed:
142
+
143
+ - http://lilypond.org/web/[LilyPond] (most Linux distributions include
144
+ this package).
145
+ - http://www.imagemagick.org[ImageMagick] (most Linux distributions
146
+ include this package).
147
+
148
+ Test the music filter it by converting the test file to HTML with AsciiDoc:
149
+
150
+ $ asciidoc -v ./filters/music-filter-test.txt
151
+ $ firefox ./filters/music-filter-test.html &
152
+
153
+ The filter was developed and tested on Xubuntu Linux using LilyPond
154
+ 2.10.5 and ImageMagick 6.2.4.
155
+
156
+ NOTE: The filter does not work with LilyPond 2.2.6 because it did not
157
+ generate the requested output file name correctly (2.6.3 does not have
158
+ a problem).