FooBarWidget-mizuho 0.9.3 → 0.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. data/asciidoc/BUGS +3 -3
  2. data/asciidoc/CHANGELOG +112 -63
  3. data/asciidoc/CHANGELOG.txt +50 -0
  4. data/asciidoc/INSTALL +6 -6
  5. data/asciidoc/Makefile.in +21 -5
  6. data/asciidoc/README +3 -3
  7. data/asciidoc/asciidoc.conf +9 -12
  8. data/asciidoc/asciidoc.py +204 -151
  9. data/asciidoc/common.aap +2 -2
  10. data/asciidoc/doc/a2x.1 +4 -3
  11. data/asciidoc/doc/a2x.1.txt +1 -1
  12. data/asciidoc/doc/article.css-embedded.html +13 -12
  13. data/asciidoc/doc/article.html +46 -644
  14. data/asciidoc/doc/article.pdf +0 -0
  15. data/asciidoc/doc/asciidoc.1 +2 -2
  16. data/asciidoc/doc/asciidoc.1.css-embedded.html +14 -13
  17. data/asciidoc/doc/asciidoc.1.css.html +3 -3
  18. data/asciidoc/doc/asciidoc.1.html +3 -3
  19. data/asciidoc/doc/asciidoc.css-embedded.html +238 -225
  20. data/asciidoc/doc/asciidoc.css.html +227 -215
  21. data/asciidoc/doc/asciidoc.dict +10 -1
  22. data/asciidoc/doc/asciidoc.html +181 -164
  23. data/asciidoc/doc/asciidoc.txt +167 -148
  24. data/asciidoc/doc/asciimathml.txt +5 -4
  25. data/asciidoc/doc/book.css-embedded.html +13 -12
  26. data/asciidoc/doc/faq.txt +60 -3
  27. data/asciidoc/doc/music-filter.html +94 -41
  28. data/asciidoc/doc/music-filter.pdf +0 -0
  29. data/asciidoc/doc/source-highlight-filter.html +125 -465
  30. data/asciidoc/doc/source-highlight-filter.pdf +0 -0
  31. data/asciidoc/docbook.conf +8 -2
  32. data/asciidoc/examples/website/CHANGELOG.html +129 -4
  33. data/asciidoc/examples/website/INSTALL.html +6 -6
  34. data/asciidoc/examples/website/README-website.html +3 -3
  35. data/asciidoc/examples/website/README.html +3 -3
  36. data/asciidoc/examples/website/a2x.1.html +4 -4
  37. data/asciidoc/examples/website/asciidoc-docbook-xsl.html +3 -3
  38. data/asciidoc/examples/website/asciidoc-graphviz-sample.txt +1 -0
  39. data/asciidoc/examples/website/downloads.html +7 -7
  40. data/asciidoc/examples/website/faq.html +95 -40
  41. data/asciidoc/examples/website/index.html +34 -13
  42. data/asciidoc/examples/website/index.txt +25 -9
  43. data/asciidoc/examples/website/latex-backend.html +4 -4
  44. data/asciidoc/examples/website/manpage.html +3 -3
  45. data/asciidoc/examples/website/music-filter.html +3 -3
  46. data/asciidoc/examples/website/sample1.png +0 -0
  47. data/asciidoc/examples/website/sample3.png +0 -0
  48. data/asciidoc/examples/website/sample4.png +0 -0
  49. data/asciidoc/examples/website/source-highlight-filter.html +5 -5
  50. data/asciidoc/examples/website/support.html +3 -3
  51. data/asciidoc/examples/website/userguide.html +227 -215
  52. data/asciidoc/examples/website/version9.html +3 -3
  53. data/asciidoc/filters/{code-filter-readme.txt → code/code-filter-readme.txt} +0 -0
  54. data/asciidoc/filters/{code-filter-test.txt → code/code-filter-test.txt} +0 -0
  55. data/asciidoc/filters/{code-filter.conf → code/code-filter.conf} +1 -1
  56. data/asciidoc/filters/{code-filter.py → code/code-filter.py} +0 -0
  57. data/asciidoc/filters/graphviz/asciidoc-graphviz-sample.txt +130 -0
  58. data/asciidoc/filters/graphviz/graphviz-filter.conf +39 -0
  59. data/asciidoc/filters/graphviz/graphviz2png.py +154 -0
  60. data/asciidoc/filters/{music-filter-test.txt → music/music-filter-test.txt} +0 -0
  61. data/asciidoc/filters/{music-filter.conf → music/music-filter.conf} +0 -0
  62. data/asciidoc/filters/{music2png.py → music/music2png.py} +0 -0
  63. data/asciidoc/filters/{source-highlight-filter-test.txt → source/source-highlight-filter-test.txt} +0 -0
  64. data/asciidoc/filters/{source-highlight-filter.conf → source/source-highlight-filter.conf} +2 -1
  65. data/asciidoc/html4.conf +5 -2
  66. data/asciidoc/stylesheets/xhtml11-quirks.css +0 -8
  67. data/asciidoc/stylesheets/xhtml11.css +11 -2
  68. data/asciidoc/vim/syntax/asciidoc.vim +1 -1
  69. data/asciidoc/xhtml11.conf +5 -2
  70. data/lib/mizuho/parser.rb +5 -1
  71. data/mizuho.gemspec +5 -16
  72. data/test/parser_spec.rb +49 -0
  73. metadata +22 -10
@@ -3,7 +3,7 @@
3
3
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
4
4
  <head>
5
5
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6
- <meta name="generator" content="AsciiDoc 8.3.1" />
6
+ <meta name="generator" content="AsciiDoc 8.3.3" />
7
7
  <link rel="stylesheet" href="./xhtml11.css" type="text/css" />
8
8
  <link rel="stylesheet" href="./xhtml11-quirks.css" type="text/css" />
9
9
  <link rel="stylesheet" href="./layout1.css" type="text/css" />
@@ -114,8 +114,8 @@ prevent damages to your global Python environment.</td>
114
114
  </div>
115
115
  <div id="footer">
116
116
  <div id="footer-text">
117
- Version 8.3.1<br />
118
- Last updated 2008-12-13 10:00:00 NZDT
117
+ Version 8.3.3<br />
118
+ Last updated 2009-01-02 11:19:06 NZDT
119
119
  </div>
120
120
  <div id="footer-badges">
121
121
  <a href="http://validator.w3.org/check?uri=referer">
@@ -4,5 +4,5 @@
4
4
  # Documented in code-filter-readme.txt
5
5
  #
6
6
 
7
- [blockdef-filter]
7
+ [blockdef-listing]
8
8
  code-style=template="listingblock",presubs=(),postsubs=("callouts",),posattrs=("style","language"),filter="code-filter.py -b {basebackend} -l {language}"
@@ -0,0 +1,130 @@
1
+ = Graphviz filter for AsciiDoc =
2
+
3
+ Author: Gouichi Iisaka
4
+
5
+ Version: 1.0
6
+
7
+ == Introduction ==
8
+
9
+ Graph visualization is a way of representing structural information
10
+ as diagrams of abstract graphs and networks.
11
+
12
+ AsciiDoc can external shell commands used to process Paragraph and
13
+ DelimitedBlock content by Filter.
14
+
15
+
16
+ == Simple Example ==
17
+
18
+ --------------------------------------------------------------------
19
+ ["graphviz", "sample1.png"]
20
+ ---------------------------------------------------------------------
21
+ digraph G { rankdir=LR; Graphviz->AsciiDoc->HTML}
22
+ ---------------------------------------------------------------------
23
+ --------------------------------------------------------------------
24
+
25
+ ["graphviz", "sample1.png"]
26
+ ---------------------------------------------------------------------
27
+ digraph G { rankdir=LR; Graphviz->AsciiDoc->HTML}
28
+ ---------------------------------------------------------------------
29
+
30
+ ---------------------------------------------------------------------
31
+ ["graphviz", "sample2.png"]
32
+ ---------------------------------------------------------------------
33
+ digraph automata_0 {
34
+ size ="8.5, 11";
35
+ node [shape = circle];
36
+ 0 [ style = filled, color=lightgrey ];
37
+ 2 [ shape = doublecircle ];
38
+ 0 -> 2 [ label = "a " ];
39
+ 0 -> 1 [ label = "other " ];
40
+ 1 -> 2 [ label = "a " ];
41
+ 1 -> 1 [ label = "other " ];
42
+ 2 -> 2 [ label = "a " ];
43
+ 2 -> 1 [ label = "other " ];
44
+ "Machine: a" [ shape = plaintext ];
45
+ }
46
+ ---------------------------------------------------------------------
47
+ ---------------------------------------------------------------------
48
+
49
+ ["graphviz", "sample3.png"]
50
+ ---------------------------------------------------------------------
51
+ digraph automata_0 {
52
+ size ="8.5, 11";
53
+ node [shape = circle];
54
+ 0 [ style = filled, color=lightgrey ];
55
+ 2 [ shape = doublecircle ];
56
+ 0 -> 2 [ label = "a " ];
57
+ 0 -> 1 [ label = "other " ];
58
+ 1 -> 2 [ label = "a " ];
59
+ 1 -> 1 [ label = "other " ];
60
+ 2 -> 2 [ label = "a " ];
61
+ 2 -> 1 [ label = "other " ];
62
+ "Machine: a" [ shape = plaintext ];
63
+ }
64
+ ---------------------------------------------------------------------
65
+
66
+
67
+ --------------------------------------------------------------------
68
+ ["graphviz", "sample4.png", "dot"]
69
+ ---------------------------------------------------------------------
70
+ digraph finite_state_machine {
71
+ rankdir=LR;
72
+ size="8,5"
73
+ node [shape = doublecircle]; LR_0 LR_3 LR_4 LR_8;
74
+ node [shape = circle];
75
+ LR_0 -> LR_2 [ label = "SS(B)" ];
76
+ LR_0 -> LR_1 [ label = "SS(S)" ];
77
+ LR_1 -> LR_3 [ label = "S($end)" ];
78
+ LR_2 -> LR_6 [ label = "SS(b)" ];
79
+ LR_2 -> LR_5 [ label = "SS(a)" ];
80
+ LR_2 -> LR_4 [ label = "S(A)" ];
81
+ LR_5 -> LR_7 [ label = "S(b)" ];
82
+ LR_5 -> LR_5 [ label = "S(a)" ];
83
+ LR_6 -> LR_6 [ label = "S(b)" ];
84
+ LR_6 -> LR_5 [ label = "S(a)" ];
85
+ LR_7 -> LR_8 [ label = "S(b)" ];
86
+ LR_7 -> LR_5 [ label = "S(a)" ];
87
+ LR_8 -> LR_6 [ label = "S(b)" ];
88
+ LR_8 -> LR_5 [ label = "S(a)" ];
89
+ }
90
+ ---------------------------------------------------------------------
91
+ --------------------------------------------------------------------
92
+
93
+ .Example for `dot':
94
+ ["graphviz", "sample4.png", "dot"]
95
+ ---------------------------------------------------------------------
96
+ digraph finite_state_machine {
97
+ rankdir=LR;
98
+ size="8,5"
99
+ node [shape = doublecircle]; LR_0 LR_3 LR_4 LR_8;
100
+ node [shape = circle];
101
+ LR_0 -> LR_2 [ label = "SS(B)" ];
102
+ LR_0 -> LR_1 [ label = "SS(S)" ];
103
+ LR_1 -> LR_3 [ label = "S($end)" ];
104
+ LR_2 -> LR_6 [ label = "SS(b)" ];
105
+ LR_2 -> LR_5 [ label = "SS(a)" ];
106
+ LR_2 -> LR_4 [ label = "S(A)" ];
107
+ LR_5 -> LR_7 [ label = "S(b)" ];
108
+ LR_5 -> LR_5 [ label = "S(a)" ];
109
+ LR_6 -> LR_6 [ label = "S(b)" ];
110
+ LR_6 -> LR_5 [ label = "S(a)" ];
111
+ LR_7 -> LR_8 [ label = "S(b)" ];
112
+ LR_7 -> LR_5 [ label = "S(a)" ];
113
+ LR_8 -> LR_6 [ label = "S(b)" ];
114
+ LR_8 -> LR_5 [ label = "S(a)" ];
115
+ }
116
+ ---------------------------------------------------------------------
117
+
118
+
119
+ == Layout ==
120
+
121
+ layout for graphviz as follows.
122
+
123
+ * dot:: filter for drawing directed graphs
124
+ * neato:: filter for drawing undirected graphs
125
+ * twopi:: filter for radial layouts of graphs
126
+ * circo:: filter for circular layout of graphs
127
+ * fdp:: filter for drawing undirected graphs
128
+
129
+ default is `dot'.
130
+
@@ -0,0 +1,39 @@
1
+ #
2
+ # AsciiDoc Graphviz filter configuration file.
3
+ #
4
+ # Version: 1.0
5
+ # Gouici Iisaka <iisaka51 at gmail dot com>
6
+
7
+ [blockdef-listing]
8
+ graphviz-style=template="graphviz-block",subs=(),posattrs=("style","target","layout"),filter='graphviz2png.py {verbose?-v} -o "{outdir}/{target}" -L {layout=dot} -'
9
+
10
+ ifdef::basebackend-html[]
11
+ [graphviz-block]
12
+ <div class="graphvizblock">
13
+ <a id="{id}"></a>
14
+ <div class="title">{title}</div>
15
+ <div class="content">
16
+ <a href="{link}">
17
+ <img style="border-width: 0;" src="{target}" alt="{target}"{width? width="{width}"}{height? height="{height}"} />
18
+ {link#}</a>
19
+ </div></div>
20
+ endif::basebackend-html[]
21
+
22
+ ifdef::basebackend-docbook[]
23
+ [graphviz-block]
24
+ template::[image-blockmacro]
25
+ endif::basebackend-docbook[]
26
+
27
+
28
+ #
29
+ # DEPRECATED: Pre 8.2.7 filter definition.
30
+ #
31
+ [blockdef-graphviz]
32
+ delimiter=^graphviz~{4,}$
33
+ template=graphviz-block
34
+ presubs=none
35
+ filter=graphviz2png.py {verbose?-v} -o "{outdir}/{target} -L {layout=dot}" -
36
+ posattrs=target,format
37
+ #
38
+ # DEPRECATED: End
39
+ #
@@ -0,0 +1,154 @@
1
+ #!/usr/bin/env python
2
+ import os, sys
3
+ from optparse import *
4
+
5
+ __AUTHOR__ = "Gouichi Iisaka <iisaka51@gmail.com>"
6
+ __VERSION__ = '1.1'
7
+
8
+ class EApp(Exception):
9
+ '''Application specific exception.'''
10
+ pass
11
+
12
+ class Struct:
13
+ '''variable contenor as C `struct'.'''
14
+ pass
15
+
16
+ class Application():
17
+ '''
18
+ NAME
19
+ graphviz2png - Converts textual graphviz notation to PNG file
20
+
21
+ SYNOPSIS
22
+ graphviz2png [options] INFILE
23
+
24
+ DESCRIPTION
25
+ This filter reads Graphviz notation text from the input file
26
+ INFILE (or stdin if INFILE is -), converts it to a PNG image file.
27
+
28
+
29
+ OPTIONS
30
+ -o OUTFILE
31
+ The file name of the output file. If not specified the output file is
32
+ named like INFILE but with a .png file name extension.
33
+
34
+ -v
35
+ Verbosely print processing information to stderr.
36
+
37
+ --help, -h
38
+ Print this documentation.
39
+
40
+ --version
41
+ Print program version number.
42
+
43
+ SEE ALSO
44
+ graphviz(1)
45
+
46
+ AUTHOR
47
+ Written by Gouichi Iisaka, <iisaka51@gmail.com>
48
+
49
+ THANKS
50
+ Stuart Rackham, <srackham@gmail.com>
51
+ This script was inspired by his music2png.py and AsciiDoc
52
+
53
+ LICENSE
54
+ Copyright (C) 2008 Gouichi Iisaka.
55
+ Free use of this software is granted under the terms of
56
+ the GNU General Public License (GPL).
57
+ '''
58
+
59
+ def __init__(self, argv=None):
60
+ if not argv:
61
+ argv = sys.argv
62
+ self.attrs = Struct()
63
+ self.usage_msg = '%prog [options] inputfile\n'
64
+ self.usage_msg += 'Version: %s\n' % __VERSION__
65
+ self.usage_msg += 'Copyright(c) 2008: %s' % __AUTHOR__
66
+
67
+ self.option_list = [
68
+ Option("-o", "--outfile", action="store",
69
+ dest="outfile",
70
+ help="Output file"),
71
+ Option("-L", "--layout", action="store",
72
+ dest="layout", default="dot",
73
+ help="Output file"),
74
+ Option("--debug", action="store_true",
75
+ dest="do_debug",
76
+ help=SUPPRESS_HELP),
77
+ Option("-v", "--verbose", action="store_true",
78
+ dest="do_verbose", default=False,
79
+ help="verbose output"),
80
+ Option("-V", "--version", action="store_true",
81
+ dest="do_version",
82
+ help="Print version"),
83
+ ]
84
+
85
+ self.parser = OptionParser(option_list=self.option_list)
86
+ self.parser.set_usage(self.usage_msg)
87
+ (self.options, self.args) = self.parser.parse_args()
88
+
89
+ if self.options.do_version:
90
+ self.parser.print_usage()
91
+ sys.exit(1)
92
+
93
+ if len(self.args) != 1:
94
+ self.parser.print_help()
95
+ sys.exit(1)
96
+
97
+ self.options.infile = self.args[0]
98
+
99
+ def systemcmd(self, cmd):
100
+ if self.options.do_verbose:
101
+ msg = 'Execute: %s' % cmd
102
+ sys.stderr.write(msg + os.linesep)
103
+ else:
104
+ cmd += ' 2>/dev/null'
105
+ if os.system(cmd):
106
+ raise EApp, 'failed command: %s' % cmd
107
+
108
+ def graphviz2png(self, infile, outfile):
109
+ '''Convert Graphviz notation in file infile to
110
+ PNG file named outfile.'''
111
+
112
+ outfile = os.path.abspath(outfile)
113
+ outdir = os.path.dirname(outfile)
114
+
115
+ if not os.path.isdir(outdir):
116
+ raise EApp, 'directory does not exist: %s' % outdir
117
+
118
+ basefile = os.path.splitext(outfile)[0]
119
+ saved_cwd = os.getcwd()
120
+ os.chdir(outdir)
121
+ try:
122
+ cmd = '%s -Tpng "%s" > "%s"' % (
123
+ self.options.layout, infile, outfile)
124
+ self.systemcmd(cmd)
125
+ os.unlink(infile)
126
+ finally:
127
+ os.chdir(saved_cwd)
128
+
129
+ def run(self):
130
+ if self.options.infile == '-':
131
+ if self.options.outfile is None:
132
+ sys.stderr.write('OUTFILE must be specified')
133
+ sys.exit(1)
134
+ infile = os.path.splitext(self.options.outfile)[0] + '.txt'
135
+ lines = sys.stdin.readlines()
136
+ open(infile, 'w').writelines(lines)
137
+
138
+ if not os.path.isfile(infile):
139
+ raise EApp, 'input file does not exist: %s' % infile
140
+
141
+ if self.options.outfile is None:
142
+ outfile = os.path.splitext(infile)[0] + '.png'
143
+ else:
144
+ outfile = self.options.outfile
145
+
146
+ self.graphviz2png(infile, outfile)
147
+
148
+ # To suppress asciidoc 'no output from filter' warnings.
149
+ if self.options.infile == '-':
150
+ sys.stdout.write(' ')
151
+
152
+ if __name__ == "__main__":
153
+ app = Application()
154
+ app.run()
@@ -88,15 +88,16 @@ endif::backend-docbook[]
88
88
  delimiter=(^source~{4,}$)|(^\^{4,}$)
89
89
  template=source-highlight-block
90
90
  presubs=none
91
- postsubs=callouts
92
91
  posattrs=language,src_numbered,src_tab
93
92
 
94
93
  ifndef::backend-docbook[]
94
+ postsubs=callouts
95
95
  # GNU Source Highlight filter.
96
96
  filter=source-highlight -f {backend-xhtml11?xhtml}{backend-html4?html}{backend-docbook?docbook} -s {language} {src_numbered?--line-number} {src_tab?--tab={src_tab}}
97
97
  endif::backend-docbook[]
98
98
 
99
99
  ifdef::backend-docbook[]
100
+ postsubs=specialcharacters,callouts
100
101
  # In the case of DocBook just pass the listing through and let the DocBook
101
102
  # toolchain handle it.
102
103
  filter=
data/asciidoc/html4.conf CHANGED
@@ -74,12 +74,12 @@ item=<li>|</li>
74
74
  text=<p>|</p>
75
75
 
76
76
  [listtags-numbered]
77
- list={id?<a name="{id}"></a>}{title?<p><b>{title}</b></p>}<ol>|</ol>
77
+ list={id?<a name="{id}"></a>}{title?<p><b>{title}</b></p>}<ol type="{style@arabic:1}{style@loweralpha:a}{style@upperalpha:A}{style@lowerroman:i}{style@upperroman:I}">|</ol>
78
78
  item=<li>|</li>
79
79
  text=<p>|</p>
80
80
 
81
81
  [listtags-numbered2]
82
- list={id?<a name="{id}"></a>}<ol type="a">|</ol>
82
+ list={id?<a name="{id}"></a>}{title?<p><b>{title}</b></p>}<ol type="{style@arabic:1}{style@loweralpha:a}{style@upperalpha:A}{style@lowerroman:i}{style@upperroman:I}">|</ol>
83
83
  item=<li>|</li>
84
84
  text=<p>|</p>
85
85
 
@@ -226,6 +226,9 @@ template::[verseblock]
226
226
  |
227
227
  </td></tr></table>
228
228
 
229
+ [abstractblock]
230
+ template::[quoteblock]
231
+
229
232
  [quoteblock]
230
233
  <a name="{id}"></a>
231
234
  <blockquote>
@@ -39,11 +39,3 @@ div.exampleblock-content {
39
39
 
40
40
  /* IE6 sets dynamically generated links as visited. */
41
41
  div#toc a:visited { color: blue; }
42
-
43
- /* Because IE6 child selector is broken. */
44
- div.olist2 ol {
45
- list-style-type: lower-alpha;
46
- }
47
- div.olist2 div.olist ol {
48
- list-style-type: decimal;
49
- }
@@ -220,12 +220,21 @@ dd > *:first-child {
220
220
  ul, ol {
221
221
  list-style-position: outside;
222
222
  }
223
- div.olist > ol {
223
+ ol.arabic {
224
224
  list-style-type: decimal;
225
225
  }
226
- div.olist2 > ol {
226
+ ol.loweralpha {
227
227
  list-style-type: lower-alpha;
228
228
  }
229
+ ol.upperalpha {
230
+ list-style-type: upper-alpha;
231
+ }
232
+ ol.lowerroman {
233
+ list-style-type: lower-roman;
234
+ }
235
+ ol.upperroman {
236
+ list-style-type: upper-roman;
237
+ }
229
238
 
230
239
  div.compact ul, div.compact ol,
231
240
  div.compact p, div.compact p,