mizuho 0.9.10 → 0.9.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (121) hide show
  1. data/README.markdown +18 -2
  2. data/asciidoc/BUGS +3 -6
  3. data/asciidoc/BUGS.txt +0 -3
  4. data/asciidoc/CHANGELOG +660 -397
  5. data/asciidoc/CHANGELOG.txt +237 -2
  6. data/asciidoc/INSTALL +14 -14
  7. data/asciidoc/MANIFEST +2 -0
  8. data/asciidoc/Makefile.in +9 -1
  9. data/asciidoc/README +2 -2
  10. data/asciidoc/a2x.py +101 -43
  11. data/asciidoc/asciidoc.conf +18 -11
  12. data/asciidoc/asciidoc.py +615 -260
  13. data/asciidoc/common.aap +2 -2
  14. data/asciidoc/configure +9 -9
  15. data/asciidoc/configure.ac +1 -1
  16. data/asciidoc/doc/a2x.1 +34 -4
  17. data/asciidoc/doc/a2x.1.txt +12 -0
  18. data/asciidoc/doc/article.pdf +0 -0
  19. data/asciidoc/doc/asciidoc.1 +73 -29
  20. data/asciidoc/doc/asciidoc.1.txt +56 -30
  21. data/asciidoc/doc/asciidoc.dict +23 -2
  22. data/asciidoc/doc/asciidoc.txt +468 -327
  23. data/asciidoc/doc/book.epub +0 -0
  24. data/asciidoc/doc/faq.txt +201 -25
  25. data/asciidoc/doc/latex-filter.pdf +0 -0
  26. data/asciidoc/doc/music-filter.pdf +0 -0
  27. data/asciidoc/doc/publishing-ebooks-with-asciidoc.txt +1 -1
  28. data/asciidoc/doc/source-highlight-filter.pdf +0 -0
  29. data/asciidoc/doc/source-highlight-filter.txt +48 -37
  30. data/asciidoc/docbook45.conf +4 -4
  31. data/asciidoc/examples/website/ASCIIMathML.js +938 -0
  32. data/asciidoc/examples/website/CHANGELOG.txt +3056 -0
  33. data/asciidoc/examples/website/INSTALL.txt +227 -0
  34. data/asciidoc/examples/website/LaTeXMathML.js +1223 -0
  35. data/asciidoc/examples/website/README-website.txt +29 -0
  36. data/asciidoc/examples/website/README.txt +35 -0
  37. data/asciidoc/examples/website/a2x.1.txt +358 -0
  38. data/asciidoc/examples/website/asciidoc-docbook-xsl.txt +65 -0
  39. data/asciidoc/examples/website/asciidoc-graphviz-sample.txt +170 -0
  40. data/asciidoc/examples/website/asciidoc.css +533 -0
  41. data/asciidoc/examples/website/asciidoc.js +189 -0
  42. data/asciidoc/examples/website/asciidocapi.txt +189 -0
  43. data/asciidoc/examples/website/asciimathml.txt +61 -0
  44. data/asciidoc/examples/website/build-website.sh +25 -0
  45. data/asciidoc/examples/website/customers.csv +18 -0
  46. data/asciidoc/examples/website/epub-notes.txt +210 -0
  47. data/asciidoc/examples/website/faq.txt +1298 -0
  48. data/asciidoc/examples/website/index.txt +502 -0
  49. data/asciidoc/examples/website/latex-backend.txt +192 -0
  50. data/asciidoc/examples/website/latex-bugs.txt +134 -0
  51. data/asciidoc/examples/website/latex-filter.txt +196 -0
  52. data/asciidoc/examples/website/latexmathml.txt +41 -0
  53. data/asciidoc/examples/website/layout1.conf +153 -0
  54. data/asciidoc/examples/website/layout1.css +65 -0
  55. data/asciidoc/examples/website/layout2.conf +153 -0
  56. data/asciidoc/examples/website/layout2.css +83 -0
  57. data/asciidoc/examples/website/main.aap +159 -0
  58. data/asciidoc/examples/website/manpage.txt +197 -0
  59. data/asciidoc/examples/website/music-filter.txt +148 -0
  60. data/asciidoc/examples/website/newlists.txt +40 -0
  61. data/asciidoc/examples/website/newtables.txt +743 -0
  62. data/asciidoc/examples/website/plugins.txt +91 -0
  63. data/asciidoc/examples/website/publishing-ebooks-with-asciidoc.txt +398 -0
  64. data/asciidoc/examples/website/slidy-example.txt +167 -0
  65. data/asciidoc/examples/website/slidy.txt +113 -0
  66. data/asciidoc/examples/website/source-highlight-filter.txt +239 -0
  67. data/asciidoc/examples/website/support.txt +5 -0
  68. data/asciidoc/examples/website/testasciidoc.txt +231 -0
  69. data/asciidoc/examples/website/userguide.txt +5991 -0
  70. data/asciidoc/examples/website/version83.txt +37 -0
  71. data/asciidoc/examples/website/xhtml11-quirks.css +43 -0
  72. data/asciidoc/filters/latex/latex2png.py +28 -12
  73. data/asciidoc/filters/music/music2png.py +22 -6
  74. data/asciidoc/filters/source/source-highlight-filter.conf +7 -5
  75. data/asciidoc/help.conf +147 -131
  76. data/asciidoc/html4.conf +1 -0
  77. data/asciidoc/html5.conf +37 -39
  78. data/asciidoc/javascripts/asciidoc.js +3 -3
  79. data/asciidoc/lang-de.conf +4 -0
  80. data/asciidoc/lang-es.conf +2 -0
  81. data/asciidoc/lang-fr.conf +1 -1
  82. data/asciidoc/lang-hu.conf +2 -0
  83. data/asciidoc/lang-it.conf +2 -0
  84. data/asciidoc/lang-nl.conf +5 -0
  85. data/asciidoc/lang-pt-BR.conf +2 -0
  86. data/asciidoc/lang-ru.conf +2 -3
  87. data/asciidoc/latex.conf +2 -2
  88. data/asciidoc/slidy.conf +4 -2
  89. data/asciidoc/stylesheets/asciidoc.css +29 -4
  90. data/asciidoc/stylesheets/docbook-xsl.css +12 -5
  91. data/asciidoc/stylesheets/toc2.css +1 -0
  92. data/asciidoc/stylesheets/xhtml11-quirks.css +1 -1
  93. data/asciidoc/tests/data/lang-de-man-test.txt +21 -0
  94. data/asciidoc/tests/data/lang-en-man-test.txt +21 -0
  95. data/asciidoc/tests/data/lang-es-man-test.txt +21 -0
  96. data/asciidoc/tests/data/lang-fr-man-test.txt +21 -0
  97. data/asciidoc/tests/data/lang-hu-man-test.txt +21 -0
  98. data/asciidoc/tests/data/lang-it-man-test.txt +21 -0
  99. data/asciidoc/tests/data/lang-it-test.txt +106 -0
  100. data/asciidoc/tests/data/lang-nl-man-test.txt +21 -0
  101. data/asciidoc/tests/data/lang-pt-BR-man-test.txt +21 -0
  102. data/asciidoc/tests/data/lang-ru-man-test.txt +21 -0
  103. data/asciidoc/tests/data/lang-uk-man-test.txt +21 -0
  104. data/asciidoc/tests/data/testcases.conf +10 -0
  105. data/asciidoc/tests/data/testcases.txt +40 -0
  106. data/asciidoc/tests/testasciidoc.conf +143 -17
  107. data/asciidoc/tests/testasciidoc.py +11 -2
  108. data/asciidoc/{stylesheets → themes/flask}/flask.css +0 -0
  109. data/asciidoc/{stylesheets → themes/volnitsky}/volnitsky.css +1 -1
  110. data/asciidoc/vim/ftdetect/asciidoc_filetype.vim +1 -1
  111. data/asciidoc/vim/syntax/asciidoc.vim +1 -1
  112. data/asciidoc/xhtml11-quirks.conf +2 -2
  113. data/asciidoc/xhtml11.conf +35 -37
  114. data/lib/mizuho.rb +1 -1
  115. data/lib/mizuho/generator.rb +3 -1
  116. data/source-highlight/darwin/source-highlight +0 -0
  117. data/templates/juvia.js +30 -5
  118. metadata +58 -9
  119. data/asciidoc/stylesheets/asciidoc-manpage.css +0 -18
  120. data/asciidoc/stylesheets/flask-manpage.css +0 -1
  121. data/asciidoc/stylesheets/volnitsky-manpage.css +0 -1
@@ -4,9 +4,244 @@ AsciiDoc ChangeLog
4
4
  :website: http://www.methods.co.nz/asciidoc/
5
5
 
6
6
 
7
- Version 8.6.5 (2011-05-08)
7
+ Version 8.6.7 (2012-03-17)
8
8
  --------------------------
9
- .Additions and changes
9
+ .Release highlights
10
+ No major enhancements but quite a few bug fixes which, among other
11
+ things, fixes Jython compatibility and improves Windows compatibility.
12
+
13
+ .All additions and changes
14
+ - Vim syntax highlighter: highlight entity refs in macro arguments.
15
+ - Added files with `.asciidoc` extension to Vim file type detection.
16
+ http://groups.google.com/group/asciidoc/browse_thread/thread/a9762e21ec0cc244/5d3a4ebf20e6847e[Patch]
17
+ submitted by Dag Wiers.
18
+ - Added 'replacement3' substitution to enable
19
+ http://groups.google.com/group/asciidoc/browse_thread/thread/843d7d3d671006fb/25628e14c829db3f[ODT
20
+ whitespace processing].
21
+ - Added 'unbreakable' option to XHTML and HTML 5 backends.
22
+ - Implemented toc::[] block macro and 'toc-placement' attribute for
23
+ HTML backends to allow the Table of Contents placement to be set
24
+ manually by the author.
25
+ - Added FAQs: 'How can I control page breaks when printing HTML
26
+ outputs?' and 'Is it possible to reposition the Table of Contents
27
+ in HTML outputs?'.
28
+ - Added `--backend` and `--backend-opts` options to the 'a2x' command
29
+ to allow 'a2x' to use backend plugin code extensions.
30
+ http://groups.google.com/group/asciidoc/browse_thread/thread/b8e93740b7cd0e1d/b5e0b83fe37ae31a[Patch]
31
+ submitted by Lex Trotman.
32
+ - Added
33
+ http://groups.google.com/group/asciidoc/browse_thread/thread/3d06b0105dfbb780/8c60eb7a62f522e4[args
34
+ block attribute] to source highlight blocks to allow arbitrary
35
+ parameters to be passed to the source highlighters.
36
+ - If the 'ascii-ids' attribute is defined then non-ascii characters in
37
+ auto-generated IDs
38
+ http://groups.google.com/group/asciidoc/browse_thread/thread/33e99b78e2472122[are
39
+ replaced] by their nearest ascii equivalents (to work around DocBook
40
+ processor limitations).
41
+ - Added global 'blockname' attribute which is dynamically updated to
42
+ identify the current block. See
43
+ http://groups.google.com/group/asciidoc/browse_thread/thread/8200e29815c40f72[discussion
44
+ list].
45
+ - 'xhtml11', 'html5' backends: Include book part TOC entries for
46
+ multi-part books. Patch submitted by Loïc Paillotin.
47
+ - Removed code filter example from the AsciiDoc User Guide so that
48
+ backends implemented as external plugins can compile the manual. See
49
+ http://groups.google.com/group/asciidoc/browse_thread/thread/849e5ea91f43adf2[discussion
50
+ list].
51
+ - If the delimited block 'skip' option is set then do not consume
52
+ block title and attributes. This makes it possible for the comment
53
+ delimited blocks to use an attribute list (previously the comment
54
+ delimited block was hardwired to skip preceding attributes and
55
+ titles). See
56
+ http://groups.google.com/group/asciidoc/browse_thread/thread/e92a75abcc382701[discussion
57
+ list].
58
+ - Added `backend-confdir` intrinsic attribute.
59
+
60
+ .Bug fixes
61
+ - *FIXED*: slidy backend: broken 'stylesheet' attribute.
62
+ http://groups.google.com/group/asciidoc/browse_thread/thread/58d0843ae4345afd[Patch]
63
+ submitted by Micheal Hackett.
64
+ - *FIXED*: Restored
65
+ http://groups.google.com/group/asciidoc/browse_thread/thread/b0e69e393b6f9f20/47a2c7586f9e40c6?lnk=gst&q=themes+tarball#47a2c7586f9e40c6[missing
66
+ themes] to zip file distribution archive.
67
+ - *FIXED*: Grammatical error in error messages.
68
+ http://groups.google.com/group/asciidoc/browse_thread/thread/b9d705c6b6b39f59/1e120483dafca109[Patch]
69
+ submitted by Dag Wieers.
70
+ - *FIXED*: Use configured normal substitution in preference to the
71
+ default one.
72
+ - *FIXED*: The 'eval' block macro would execute multiple times if it
73
+ evaluated to 'None'.
74
+ - *FIXED*: Duplicated entries in TOC of large document.
75
+ http://groups.google.com/group/asciidoc/browse_thread/thread/103445ab9d95cb0c[Patch]
76
+ submitted by Sebastien Helleu.
77
+ - *FIXED*: Python 2.4 backward
78
+ http://code.google.com/p/asciidoc/issues/detail?id=9[incompatibility].
79
+ - *FIXED*: 8.6.6 regression broke Jython compatibility. See
80
+ http://groups.google.com/group/asciidoc/browse_thread/thread/4608b77ec289f6c4[discussion
81
+ list].
82
+ - *FIXED*: Leaky file handles in a2x and music and latex filters which
83
+ created incompatibility problems for Jython.
84
+ - *FIXED*: All Python filters are executed with the same Python
85
+ interpreter that executes the asciidoc parent (previously filters
86
+ were hardwired to execute the 'python' interpreter). This prevents
87
+ http://groups.google.com/group/asciidoc/browse_thread/thread/14e8fcb289a135b/3af3b4e57b827c78?lnk=gst&q=archlinux#3af3b4e57b827c78[Python
88
+ mix-ups].
89
+ - *FIXED*: Microsoft Windows shelled command-line truncation that
90
+ caused shelled commands to fail e.g. the 'data-uri' attribute
91
+ failure.
92
+
93
+
94
+ Version 8.6.6 (2011-09-04)
95
+ --------------------------
96
+ .Release highlights
97
+ - The AsciiDoc plugin architecture has been enhanced, unified and
98
+ extended:
99
+ * Plugin commands have been added to the asciidoc(1) `--backend`
100
+ option.
101
+ * An asciidoc(1) `--theme` option has been implemented to specify a
102
+ theme and to manage theme plugins.
103
+ * A plugin 'build' command (for creating plugins) added.
104
+ * 'build', 'install', 'list' and 'remove' plugin commands are all
105
+ recognized by asciidoc(1) `--backend`, `--filter` and `--theme`
106
+ options.
107
+ - A security update by Kenny MacDermid removes the use of `eval()` on
108
+ untrusted input (to disallow code malicious execution).
109
+
110
+ .All additions and changes
111
+ - 'xhtml11', 'html5': Made verse and quote block text darker to print
112
+ legibly in Google Chrome browser.
113
+ - Added plugin 'build' command for plugin file creation.
114
+ - Merged `--help plugins` back to `--help manpage` so it matches the
115
+ asciidoc(1) manpage.
116
+ - The `--filter` command-line option can specify the name of filters
117
+ that will be unconditionally loaded.
118
+ - If a filter directory contains a file named `__noautoload__` then
119
+ the filter is not automatically loaded (you can used the `--filter`
120
+ command-line option to override this behavior).
121
+ - tests: Add Italian language tests. Patch submitted by Simon
122
+ Ruderich. See:
123
+ http://groups.google.com/group/asciidoc/browse_thread/thread/5e2e6f4dd740d51a
124
+ - tests: Add tests for localized man pages. Patch submitted by Simon
125
+ Ruderich. See:
126
+ http://groups.google.com/group/asciidoc/browse_thread/thread/5e2e6f4dd740d51a
127
+ - If the section name is prefixed with a '+' character then the
128
+ section contents is appended to the contents of an already existing
129
+ same-named section (the default behavior is to replace the the
130
+ section).
131
+ - If a configuration file section named 'docinfo' is loaded then it
132
+ will be included in the document header. Typically the 'docinfo'
133
+ section name will be prefixed with a '+' character so that it is
134
+ appended to (rather than replace) other 'docinfo' sections.
135
+ - Added `{sp}` intrinsic attribute for single space character. See
136
+ http://groups.google.com/group/asciidoc/browse_thread/thread/a839aa01db0765d2
137
+ - Fixed TOC and footnotes generator. Patch submitted by Will. See
138
+ http://groups.google.com/group/asciidoc/browse_thread/thread/734ac5afed736987
139
+ - The `asciidoc-confdir` attribute is set to the asciidoc executable
140
+ directory if it contains global configuration files i.e. a local
141
+ asciidoc installation.
142
+ - asciidoc now throws an error instead of just a warning of the
143
+ backend configuration file is not found.
144
+ - latex filter: write MD5 file after successful PNG file generation.
145
+ Always delete temp files irrespective of outcome.
146
+ - Added truecolor option to LaTeX filter. Patch submitted by Michel
147
+ Krämer. See:
148
+ http://groups.google.com/group/asciidoc/browse_thread/thread/6436788a10561851
149
+ - Unit test for table column specifiers with merged cells. Patch
150
+ submitted by Simon Ruderich. See:
151
+ http://groups.google.com/group/asciidoc/browse_thread/thread/c9238380a1f2507a
152
+ - Added verbose message for `ifeval::[]` macro evaluation.
153
+ - Added test case for `ifeval::[]` evaluation.
154
+ - Security update to remove the use of `eval()` on untrusted input (to
155
+ disallow code malicious execution). Patch submitted by Kenny
156
+ MacDermid.
157
+ - Changed web site layout from table to CSS based. See
158
+ http://groups.google.com/group/asciidoc/browse_thread/thread/ec8e8481eb0e27b0/d1c035092b5bb7a4?lnk=gst&q=caption+option#d1c035092b5bb7a4
159
+ - a2x: Pass `--format` option value to asciidoc as 'a2x-format'
160
+ attribute. Patch submitted by Lex Trotman
161
+ (http://groups.google.com/group/asciidoc/browse_thread/thread/3e177b84bc133ca9/659796dfadad30ea?lnk=gst&q=a2x+format#659796dfadad30ea).
162
+ - Added two FAQs submitted by Lex Trotman. See:
163
+ http://groups.google.com/group/asciidoc/browse_thread/thread/16d3fb9672a408e7
164
+ - html5,xhtml11: Implemented themes directory structure.
165
+ - html5,xhtml11: Implemented asciidoc `--theme` management option
166
+ (install, list, build and remove commands).
167
+ - html5,xhtml11: A theme can now optionally include a JavaScript file
168
+ `<theme>.js`
169
+ - html5,xhtml11: If the 'data-uri' attribute is defined then icons
170
+ from the theme icons directory (if they exist) will be embedded in
171
+ the generated document.
172
+ - Added optional 'warnings' argument to include macros.
173
+ - The asciidoc `--verbose` option now prints file inclusion messages.
174
+ - xhtml11, html5: Remove necessity for separate manpage CSS files.
175
+ - Added 'css-signature' attribute to tests.
176
+ - Add 'css-signature' attribute to set a CSS signature for the
177
+ document. Patch submitted by Peg Russell, see:
178
+ http://groups.google.com/group/asciidoc/browse_thread/thread/bacbf8aeb8ad6a3a
179
+ - White background for toc2 TOC viewport so that horizontally scrolled
180
+ content does not obscure the the TOC. Patch submitted by Lionel
181
+ Orry, see: http://code.google.com/p/asciidoc/issues/detail?id=8
182
+
183
+ .Bug fixes
184
+ - *FIXED*: Plugin install command: Delete backend directory is install
185
+ fails.
186
+ - *FIXED*: Plugin install command: Fixed bug extracting binary files
187
+ on Windows (reported by Jean-Michel Inglebert).
188
+ - *FIXED*: tests: Skip blank sections in testasciidoc.conf test
189
+ configuration file instead of throwing an exception (reported by
190
+ Jean-Michel Inglebert).
191
+ - *FIXED*: If a plugin Zip file does not contain file permissions
192
+ (probably because it was created under Windows) then install it
193
+ using the default permissions.
194
+ - *FIXED*: Fixed missing quote in preceding LaTeX filter patch. Fix
195
+ submitted by Simon Ruderich. See:
196
+ http://groups.google.com/group/asciidoc/browse_thread/thread/6436788a10561851
197
+ - *FIXED*: Some path attributes were processed as escaped Python
198
+ strings which could result in corrupted path names with backslash
199
+ separated Windows path names. Reported by Will. See:
200
+ http://groups.google.com/group/asciidoc/browse_thread/thread/e8f3938bcb4c8bb4/44d13113a35738ef
201
+ - *FIXED*: Vertically spanned table cells resulted in incorrect column
202
+ styles being applied to some cells. Reported by Will:
203
+ http://groups.google.com/group/asciidoc/browse_thread/thread/c9238380a1f2507a/9afc4559d51e1dbd
204
+ - *FIXED*: LaTeX backend: fixed bad escapes. Patch submitted by Mark
205
+ McCurry:
206
+ http://groups.google.com/group/asciidoc/browse_thread/thread/8c111f1046b33691/158a944cf4d5ff0d?lnk=gst&q=latex+escapes#158a944cf4d5ff0d
207
+ - *FIXED*: When using slidy backend, display of characters with
208
+ accents is wrong because of 'meta http-equiv' line missing. Reported
209
+ by Fabrice Flore-Thebault. See:
210
+ http://groups.google.com/group/asciidoc/browse_thread/thread/eaf25f21d1da180a
211
+
212
+
213
+ Version 8.6.5 (2011-05-20)
214
+ --------------------------
215
+ .Release highlights
216
+ - The addition of an 'html5' backend to generate HTML 5 output. Apart
217
+ from the inclusion of 'audio' and 'video' block macros the 'html5'
218
+ backend is functionally identical to the 'xhtml11' backend.
219
+
220
+ - A new 'flask' theme for 'xhtml11' and 'html5' backends inspired by
221
+ the http://flask.pocoo.org/docs/[Flask website] styling (see 'toc2'
222
+ example in the next item below).
223
+
224
+ - The new 'toc2' attribute generates a table of contents in
225
+ the left hand margin ('xhtml11' and 'html5' backends).
226
+ link:article-html5-toc2.html[This example] was generated using
227
+ the following command:
228
+
229
+ asciidoc -b html5 -a icons -a toc2 -a theme=flask article.txt
230
+
231
+ - `a2x(1)` now has a flexible mechanism for copying arbitrary
232
+ resource files to HTML based outputs -- this is very handy for
233
+ generating EPUB files with embedded fonts and other resources.
234
+
235
+ * The `a2x(1)` `--resource` option can be used to inject any file
236
+ into EPUB output documents e.g. CSS resources such as fonts and
237
+ background images.
238
+ * Explicitly specified resources are added to the EPUB OPF manifest
239
+ automatically.
240
+ * You can explicitly specify file extension MIME types.
241
+ * The enhanced resource processing works around a couple of DocBook
242
+ XSL bugs (see link:epub-notes.html[EPUB Notes]).
243
+
244
+ .All additions and changes
10
245
  - A new 'flask' theme for 'xhtml11' and 'html5' backends. A shameless
11
246
  knock-off of the http://flask.pocoo.org/docs/[Flask website]
12
247
  styling.
data/asciidoc/INSTALL CHANGED
@@ -1,6 +1,6 @@
1
1
  AsciiDoc Installation
2
2
 
3
- version 8.6.5, 20 May 2011
3
+ version 8.6.7, 17 March 2012
4
4
 
5
5
  Note
6
6
  The current version of AsciiDoc requires Python 2.4 or newer to run. If
@@ -24,9 +24,9 @@
24
24
  * Make sure you have [6]Mercurial installed, you can check with:
25
25
  $ hg --version
26
26
  * Go to the directory you want to install AsciiDoc into and download
27
- the repository. This example gets the 8.6.5 tagged release:
27
+ the repository. This example gets the 8.6.7 tagged release:
28
28
  $ cd ~/bin
29
- $ hg clone -r 8.6.5 https://asciidoc.googlecode.com/hg/ asciidoc-8.6.5
29
+ $ hg clone -r 8.6.7 https://asciidoc.googlecode.com/hg/ asciidoc-8.6.7
30
30
 
31
31
  You now have two choices: you can run asciidoc locally from your
32
32
  repository or you can use autoconf(1) and make(1) to perform a
@@ -36,8 +36,8 @@
36
36
 
37
37
  Create a symlink to the AsciiDoc script in a search PATH directory so
38
38
  it’s easy to execute asciidoc from the command-line, for example:
39
- $ ln -s ~/bin/asciidoc-8.6.5/asciidoc.py ~/bin/asciidoc
40
- $ ln -s ~/bin/asciidoc-8.6.5/a2x.py ~/bin/a2x
39
+ $ ln -s ~/bin/asciidoc-8.6.7/asciidoc.py ~/bin/asciidoc
40
+ $ ln -s ~/bin/asciidoc-8.6.7/a2x.py ~/bin/a2x
41
41
 
42
42
  Use the Mercurial pull command to update your local AsciiDoc
43
43
  repository.
@@ -74,8 +74,8 @@
74
74
 
75
75
  The autoconf(1) generated configure script creates a make file that is
76
76
  tailored for your system. To install:
77
- $ tar -xzf asciidoc-8.6.5.tar.gz
78
- $ cd asciidoc-8.6.5
77
+ $ tar -xzf asciidoc-8.6.7.tar.gz
78
+ $ cd asciidoc-8.6.7
79
79
  $ ./configure
80
80
  $ sudo make install
81
81
 
@@ -96,9 +96,9 @@
96
96
  AsciiDoc is developed and tested on Linux but there seem to be quite a
97
97
  few people using it on Windows. To install AsciiDoc on Windows unzip
98
98
  the distribution Zip file contents:
99
- $ unzip asciidoc-8.6.5.zip
99
+ $ unzip asciidoc-8.6.7.zip
100
100
 
101
- This will create the folder asciidoc-8.6.5 containing the asciidoc.py
101
+ This will create the folder asciidoc-8.6.7 containing the asciidoc.py
102
102
  and a2x.py executables along with configuration files and
103
103
  documentation.
104
104
 
@@ -202,23 +202,23 @@
202
202
  See also [26]Packager Notes in the AsciiDoc User Guide.
203
203
  __________________________________________________________________
204
204
 
205
- Version 8.6.5
205
+ Version 8.6.7
206
206
  Last updated 2010-11-15 08:44:54 NZDT
207
207
 
208
208
  References
209
209
 
210
210
  1. http://www.python.org/
211
- 2. file://localhost/tmp/lynxXXXXrHyhys/README.html
211
+ 2. file://localhost/tmp/lynxXXXXJGiksz/README.html
212
212
  3. http://www.selenic.com/mercurial/
213
213
  4. http://code.google.com/
214
214
  5. http://code.google.com/p/asciidoc/source/browse/
215
215
  6. http://www.selenic.com/mercurial/
216
216
  7. http://sourceforge.net/projects/asciidoc/
217
- 8. file://localhost/tmp/lynxXXXXrHyhys/L3934-4626TMP.html#X3
217
+ 8. file://localhost/tmp/lynxXXXXJGiksz/L9199-2434TMP.html#X3
218
218
  9. http://blog.rainwebs.net/2010/02/25/how-to-create-handsome-pdf-documents-without-frustration/
219
219
  10. http://www.cygwin.com/
220
220
  11. http://dblatex.sourceforge.net/
221
- 12. file://localhost/tmp/lynxXXXXrHyhys/testasciidoc.html
221
+ 12. file://localhost/tmp/lynxXXXXJGiksz/testasciidoc.html
222
222
  13. http://www.a-a-p.org/
223
223
  14. http://packages.debian.org/asciidoc
224
224
  15. mailto:stone@debian.org
@@ -232,4 +232,4 @@ References
232
232
  23. http://svn.exactcode.de/t2/trunk/package/textproc/asciidoc/
233
233
  24. http://dag.wieers.com/rpm/packages/asciidoc/
234
234
  25. http://opencsw.org/packages/asciidoc
235
- 26. file://localhost/tmp/lynxXXXXrHyhys/userguide.html#X38
235
+ 26. file://localhost/tmp/lynxXXXXJGiksz/userguide.html#X38
data/asciidoc/MANIFEST CHANGED
@@ -84,5 +84,7 @@ tests/testasciidoc.conf
84
84
  tests/asciidocapi.py
85
85
  tests/data/*.conf
86
86
  tests/data/*.txt
87
+ themes/flask/*.css
88
+ themes/volnitsky/*.css
87
89
  vim/syntax/asciidoc.vim
88
90
  vim/ftdetect/asciidoc_filetype.vim
data/asciidoc/Makefile.in CHANGED
@@ -60,6 +60,14 @@ latexfilterdir = $(filtersdir)/latex
60
60
  latexfilterconf = filters/latex/latex-filter.conf
61
61
  latexfilterconfdir = $(filtersdir)/latex
62
62
 
63
+ themesdir = $(ASCIIDOCCONF)/themes
64
+
65
+ flasktheme = themes/flask/flask.css
66
+ flaskthemedir = $(themesdir)/flask
67
+
68
+ volnitskytheme = themes/volnitsky/volnitsky.css
69
+ volnitskythemedir = $(themesdir)/volnitsky
70
+
63
71
  docbook = $(wildcard docbook-xsl/*.xsl)
64
72
  docbookdir = $(ASCIIDOCCONF)/docbook-xsl
65
73
 
@@ -80,7 +88,7 @@ iconsdir = $(ASCIIDOCCONF)/images/icons
80
88
 
81
89
  doc = $(wildcard README*) $(wildcard BUGS*) $(wildcard INSTALL*) $(wildcard CHANGELOG*)
82
90
 
83
- DATATARGETS = manp conf docbook dblatex css js callouts icons codefilterconf musicfilterconf sourcefilterconf graphvizfilterconf latexfilterconf
91
+ DATATARGETS = manp conf docbook dblatex css js callouts icons codefilterconf musicfilterconf sourcefilterconf graphvizfilterconf latexfilterconf flasktheme volnitskytheme
84
92
  PROGTARGETS = prog codefilter musicfilter graphvizfilter latexfilter
85
93
  TARGETS = $(DATATARGETS) $(PROGTARGETS) doc
86
94
 
data/asciidoc/README CHANGED
@@ -1,6 +1,6 @@
1
1
  AsciiDoc README File
2
2
 
3
- version 8.6.5, 20 May 2011
3
+ version 8.6.7, 17 March 2012
4
4
  __________________________________________________________________
5
5
 
6
6
  1. Prerequisites
@@ -36,7 +36,7 @@
36
36
  (GPLv2).
37
37
  __________________________________________________________________
38
38
 
39
- Version 8.6.5
39
+ Version 8.6.7
40
40
  Last updated 2011-05-04 18:47:58 NZST
41
41
 
42
42
  References
data/asciidoc/a2x.py CHANGED
@@ -23,7 +23,7 @@ import xml.dom.minidom
23
23
  import mimetypes
24
24
 
25
25
  PROG = os.path.basename(os.path.splitext(__file__)[0])
26
- VERSION = '8.6.5'
26
+ VERSION = '8.6.7'
27
27
 
28
28
  # AsciiDoc global configuration file directory.
29
29
  # NOTE: CONF_DIR is "fixed up" by Makefile -- don't rename or change syntax.
@@ -53,6 +53,7 @@ ASCIIDOC_OPTS = ''
53
53
  DBLATEX_OPTS = ''
54
54
  FOP_OPTS = ''
55
55
  XSLTPROC_OPTS = ''
56
+ BACKEND_OPTS = ''
56
57
 
57
58
  ######################################################################
58
59
  # End of configuration file parameters.
@@ -143,6 +144,20 @@ def find_executable(file_name):
143
144
  result = _find_executable(file_name)
144
145
  return result
145
146
 
147
+ def write_file(filename, data, mode='w'):
148
+ f = open(filename, mode)
149
+ try:
150
+ f.write(data)
151
+ finally:
152
+ f.close()
153
+
154
+ def read_file(filename, mode='r'):
155
+ f = open(filename, mode)
156
+ try:
157
+ return f.read()
158
+ finally:
159
+ f.close()
160
+
146
161
  def shell_cd(path):
147
162
  verbose('chdir %s' % path)
148
163
  if not OPTIONS.dry_run:
@@ -176,7 +191,8 @@ def shell_rmtree(path):
176
191
 
177
192
  def shell(cmd, raise_error=True):
178
193
  '''
179
- Execute command cmd in shell and return resulting subprocess.Popen object.
194
+ Execute command cmd in shell and return tuple
195
+ (stdoutdata, stderrdata, returncode).
180
196
  If raise_error is True then a non-zero return terminates the application.
181
197
  '''
182
198
  if os.name == 'nt':
@@ -190,25 +206,26 @@ def shell(cmd, raise_error=True):
190
206
  mo = re.match(r'^\s*(?P<arg0>[^ ]+)', cmd)
191
207
  if mo.group('arg0').endswith('.py'):
192
208
  cmd = 'python ' + cmd
193
- # Remove redundant quoting -- this is not just costmetic, quoting seems to
194
- # dramatically decrease the allowed command length in Windows XP.
195
- cmd = re.sub(r'"([^ ]+?)"', r'\1', cmd)
209
+ # Remove redundant quoting -- this is not just cosmetic,
210
+ # quoting seems to dramatically decrease the allowed command
211
+ # length in Windows XP.
212
+ cmd = re.sub(r'"([^ ]+?)"', r'\1', cmd)
196
213
  verbose('executing: %s' % cmd)
197
214
  if OPTIONS.dry_run:
198
215
  return
199
- if OPTIONS.verbose:
200
- stdout = stderr = None
201
- else:
202
- stdout = stderr = subprocess.PIPE
216
+ stdout = stderr = subprocess.PIPE
203
217
  try:
204
218
  popen = subprocess.Popen(cmd, stdout=stdout, stderr=stderr,
205
219
  shell=True, env=ENV)
206
220
  except OSError, e:
207
221
  die('failed: %s: %s' % (cmd, e))
208
- popen.wait()
222
+ stdoutdata, stderrdata = popen.communicate()
223
+ if OPTIONS.verbose:
224
+ print stdoutdata
225
+ print stderrdata
209
226
  if popen.returncode != 0 and raise_error:
210
227
  die('%s returned non-zero exit status %d' % (cmd, popen.returncode))
211
- return popen
228
+ return (stdoutdata, stderrdata, popen.returncode)
212
229
 
213
230
  def find_resources(files, tagname, attrname, filter=None):
214
231
  '''
@@ -234,19 +251,20 @@ def find_resources(files, tagname, attrname, filter=None):
234
251
  if isinstance(files, str):
235
252
  files = [files]
236
253
  result = []
237
- for f in files:
238
- verbose('finding resources in: %s' % f)
254
+ for filename in files:
255
+ verbose('finding resources in: %s' % filename)
239
256
  if OPTIONS.dry_run:
240
257
  continue
241
258
  parser = FindResources()
242
259
  # HTMLParser has problems with non-ASCII strings.
243
260
  # See http://bugs.python.org/issue3932
244
- mo = re.search(r'^<\?xml.* encoding="(.*?)"', open(f).readline())
261
+ contents = read_file(filename)
262
+ mo = re.search(r'\A<\?xml.* encoding="(.*?)"', contents)
245
263
  if mo:
246
264
  encoding = mo.group(1)
247
- parser.feed(open(f).read().decode(encoding))
265
+ parser.feed(contents.decode(encoding))
248
266
  else:
249
- parser.feed(open(f).read())
267
+ parser.feed(contents)
250
268
  parser.close()
251
269
  result = list(set(result)) # Drop duplicate values.
252
270
  result.sort()
@@ -257,12 +275,12 @@ def copy_files(files, src_dir, dst_dir):
257
275
  '''
258
276
  Copy list of relative file names from src_dir to dst_dir.
259
277
  '''
260
- for f in files:
261
- f = os.path.normpath(f)
262
- if os.path.isabs(f):
278
+ for filename in files:
279
+ filename = os.path.normpath(filename)
280
+ if os.path.isabs(filename):
263
281
  continue
264
- src = os.path.join(src_dir, f)
265
- dst = os.path.join(dst_dir, f)
282
+ src = os.path.join(src_dir, filename)
283
+ dst = os.path.join(dst_dir, filename)
266
284
  if not os.path.exists(dst):
267
285
  if not os.path.isfile(src):
268
286
  warning('missing file: %s' % src)
@@ -321,10 +339,14 @@ def get_source_options(asciidoc_file):
321
339
  result = []
322
340
  if os.path.isfile(asciidoc_file):
323
341
  options = ''
324
- for line in open(asciidoc_file):
325
- mo = re.search(r'^//\s*a2x:', line)
326
- if mo:
327
- options += ' ' + line[mo.end():].strip()
342
+ f = open(asciidoc_file)
343
+ try:
344
+ for line in f:
345
+ mo = re.search(r'^//\s*a2x:', line)
346
+ if mo:
347
+ options += ' ' + line[mo.end():].strip()
348
+ finally:
349
+ f.close()
328
350
  parse_options()
329
351
  return result
330
352
 
@@ -348,8 +370,12 @@ class A2X(AttrDict):
348
370
  self.dblatex_opts += ' ' + DBLATEX_OPTS
349
371
  self.fop_opts += ' ' + FOP_OPTS
350
372
  self.xsltproc_opts += ' ' + XSLTPROC_OPTS
373
+ self.backend_opts += ' ' + BACKEND_OPTS
351
374
  # Execute to_* functions.
352
- self.__getattribute__('to_'+self.format)()
375
+ if self.backend:
376
+ self.to_backend()
377
+ else:
378
+ self.__getattribute__('to_'+self.format)()
353
379
  if not (self.keep_artifacts or self.format == 'docbook' or self.skip_asciidoc):
354
380
  shell_rm(self.dst_path('.xml'))
355
381
 
@@ -378,6 +404,23 @@ class A2X(AttrDict):
378
404
  home_dir = os.environ.get('HOME')
379
405
  if home_dir is not None:
380
406
  conf_files.append(os.path.join(home_dir, '.asciidoc', CONF_FILE))
407
+ # If asciidoc is not local to a2x then search the PATH.
408
+ if not self.asciidoc:
409
+ self.asciidoc = find_executable(ASCIIDOC)
410
+ if not self.asciidoc:
411
+ die('unable to find asciidoc: %s' % ASCIIDOC)
412
+ # From backend plugin directory.
413
+ if self.backend is not None:
414
+ stdout = shell(self.asciidoc + ' --backend list')[0]
415
+ backends = [(i, os.path.split(i)[1]) for i in stdout.splitlines()]
416
+ backend_dir = [i[0] for i in backends if i[1] == self.backend]
417
+ if len(backend_dir) == 0:
418
+ die('missing %s backend' % self.backend)
419
+ if len(backend_dir) > 1:
420
+ die('more than one %s backend' % self.backend)
421
+ verbose('found %s backend directory: %s' %
422
+ (self.backend, backend_dir[0]))
423
+ conf_files.append(os.path.join(backend_dir[0], 'a2x-backend.py'))
381
424
  # From --conf-file option.
382
425
  if self.conf_file is not None:
383
426
  if not os.path.isfile(self.conf_file):
@@ -391,13 +434,8 @@ class A2X(AttrDict):
391
434
  # Load ordered files.
392
435
  for f in conf_files:
393
436
  if os.path.isfile(f):
394
- verbose('loading conf file: %s' % f)
437
+ verbose('loading configuration file: %s' % f)
395
438
  execfile(f, globals())
396
- # If asciidoc is not local to a2x then search the PATH.
397
- if not self.asciidoc:
398
- self.asciidoc = find_executable(ASCIIDOC)
399
- if not self.asciidoc:
400
- die('unable to find asciidoc: %s' % ASCIIDOC)
401
439
 
402
440
  def process_options(self):
403
441
  '''
@@ -417,12 +455,16 @@ class A2X(AttrDict):
417
455
  if self.resource_manifest:
418
456
  if not os.path.isfile(self.resource_manifest):
419
457
  die('missing --resource-manifest: %s' % self.resource_manifest)
420
- for r in open(self.resource_manifest):
421
- self.resources.append(r.strip())
458
+ f = open(self.resource_manifest)
459
+ try:
460
+ for r in f:
461
+ self.resources.append(r.strip())
462
+ finally:
463
+ f.close()
422
464
  for r in self.resources:
423
465
  r = os.path.expanduser(r)
424
466
  r = os.path.expandvars(r)
425
- if r.endswith(('/','\\')):
467
+ if r.endswith('/') or r.endswith('\\'):
426
468
  if os.path.isdir(r):
427
469
  self.resource_dirs.append(r)
428
470
  else:
@@ -580,6 +622,15 @@ class A2X(AttrDict):
580
622
  shell_makedirs(dstdir)
581
623
  shell_copy(src, dst)
582
624
 
625
+ def to_backend(self):
626
+ '''
627
+ Convert AsciiDoc source file to a backend output file using the global
628
+ 'to_<backend name>' function (loaded from backend plugin a2x-backend.py
629
+ file).
630
+ Executes the global function in an A2X class instance context.
631
+ '''
632
+ eval('to_%s(self)' % self.backend)
633
+
583
634
  def to_docbook(self):
584
635
  '''
585
636
  Use asciidoc to convert asciidoc_file to DocBook.
@@ -590,8 +641,8 @@ class A2X(AttrDict):
590
641
  if not os.path.isfile(docbook_file):
591
642
  die('missing docbook file: %s' % docbook_file)
592
643
  return
593
- shell('"%s" --backend docbook %s --out-file "%s" "%s"' %
594
- (self.asciidoc, self.asciidoc_opts, docbook_file, self.asciidoc_file))
644
+ shell('"%s" --backend docbook -a "a2x-format=%s" %s --out-file "%s" "%s"' %
645
+ (self.asciidoc, self.format, self.asciidoc_opts, docbook_file, self.asciidoc_file))
595
646
  if not self.no_xmllint and XMLLINT:
596
647
  shell('"%s" --nonet --noout --valid "%s"' % (XMLLINT, docbook_file))
597
648
 
@@ -683,7 +734,7 @@ class A2X(AttrDict):
683
734
  f = os.path.normpath(f)
684
735
  if f not in ['content.opf']:
685
736
  resource_files.append(f)
686
- opf = xml.dom.minidom.parseString(open(opf_file).read())
737
+ opf = xml.dom.minidom.parseString(read_file(opf_file))
687
738
  manifest_files = []
688
739
  manifest = opf.getElementsByTagName('manifest')[0]
689
740
  for el in manifest.getElementsByTagName('item'):
@@ -704,7 +755,7 @@ class A2X(AttrDict):
704
755
  item.setAttribute('media-type', mimetype)
705
756
  manifest.appendChild(item)
706
757
  if count > 0:
707
- open(opf_file, 'w').write(opf.toxml())
758
+ write_file(opf_file, opf.toxml())
708
759
 
709
760
  def to_epub(self):
710
761
  self.to_docbook()
@@ -736,7 +787,7 @@ class A2X(AttrDict):
736
787
  try:
737
788
  # Create and add uncompressed mimetype file.
738
789
  verbose('archiving: mimetype')
739
- open('mimetype','w').write('application/epub+zip')
790
+ write_file('mimetype', 'application/epub+zip')
740
791
  zip.write('mimetype', compress_type=zipfile.ZIP_STORED)
741
792
  # Compress all remaining files.
742
793
  for (p,dirs,files) in os.walk('.'):
@@ -762,9 +813,9 @@ class A2X(AttrDict):
762
813
  text_file = self.dst_path('.text')
763
814
  html_file = self.dst_path('.text.html')
764
815
  if self.lynx:
765
- shell('"%s" %s --conf-file "%s" -b html4 -o "%s" "%s"' %
816
+ shell('"%s" %s --conf-file "%s" -b html4 -a "a2x-format=%s" -o "%s" "%s"' %
766
817
  (self.asciidoc, self.asciidoc_opts, self.asciidoc_conf_file('text.conf'),
767
- html_file, self.asciidoc_file))
818
+ self.format, html_file, self.asciidoc_file))
768
819
  shell('"%s" -dump "%s" > "%s"' %
769
820
  (LYNX, html_file, text_file))
770
821
  else:
@@ -810,6 +861,9 @@ if __name__ == '__main__':
810
861
  action='store', dest='doctype', metavar='DOCTYPE',
811
862
  choices=('article','manpage','book'),
812
863
  help='article, manpage, book')
864
+ parser.add_option('-b','--backend',
865
+ action='store', dest='backend', metavar='BACKEND',
866
+ help='name of backend plugin')
813
867
  parser.add_option('--epubcheck',
814
868
  action='store_true', dest='epubcheck', default=False,
815
869
  help='check EPUB output with epubcheck')
@@ -864,6 +918,9 @@ if __name__ == '__main__':
864
918
  parser.add_option('--dblatex-opts',
865
919
  action='append', dest='dblatex_opts', default=[],
866
920
  metavar='DBLATEX_OPTS', help='dblatex options')
921
+ parser.add_option('--backend-opts',
922
+ action='append', dest='backend_opts', default=[],
923
+ metavar='BACKEND_OPTS', help='backend plugin options')
867
924
  parser.add_option('--fop',
868
925
  action='store_true', dest='fop', default=False,
869
926
  help='use FOP to generate PDF files')
@@ -882,7 +939,7 @@ if __name__ == '__main__':
882
939
  if len(sys.argv) == 1:
883
940
  parser.parse_args(['--help'])
884
941
  source_options = get_source_options(sys.argv[-1])
885
- argv = source_options + sys.argv[1:]
942
+ argv = source_options + sys.argv[1:]
886
943
  opts, args = parser.parse_args(argv)
887
944
  if len(args) != 1:
888
945
  parser.error('incorrect number of arguments')
@@ -890,6 +947,7 @@ if __name__ == '__main__':
890
947
  opts.dblatex_opts = ' '.join(opts.dblatex_opts)
891
948
  opts.fop_opts = ' '.join(opts.fop_opts)
892
949
  opts.xsltproc_opts = ' '.join(opts.xsltproc_opts)
950
+ opts.backend_opts = ' '.join(opts.backend_opts)
893
951
  opts = eval(str(opts)) # Convert optparse.Values to dict.
894
952
  a2x = A2X(opts)
895
953
  OPTIONS = a2x # verbose and dry_run used by utility functions.