1
|
--- 9e52f8578d891beaef25730a92a6e723596ddbd07bfe0d2a56486fcf63a0b983_asciidoc-8.6.10.tar.gz
|
2
|
+++ asciidoc-8.6.10.tar.gz
|
3
|
│ --- 9e52f8578d891beaef25730a92a6e723596ddbd07bfe0d2a56486fcf63a0b983_asciidoc-8.6.10.tar
|
4
|
├── +++ asciidoc-8.6.10.tar
|
5
|
│ ├── file list
|
6
|
│ │ @@ -1,251 +1,251 @@
|
7
|
│ │ -drwxrwxr-x 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/
|
8
|
│ │ --rw-rw-r-- 0 root (0) root (0) 174 2017-09-29 01:10:02.000000 asciidoc-8.6.10/.gitignore
|
9
|
│ │ --rw-rw-r-- 0 root (0) root (0) 529 2017-09-29 01:10:02.000000 asciidoc-8.6.10/.travis.yml
|
10
|
│ │ --rw-rw-r-- 0 root (0) root (0) 620 2017-09-29 01:10:02.000000 asciidoc-8.6.10/BUGS.txt
|
11
|
│ │ --rw-rw-r-- 0 root (0) root (0) 153592 2017-09-29 01:10:02.000000 asciidoc-8.6.10/CHANGELOG.txt
|
12
|
│ │ --rw-rw-r-- 0 root (0) root (0) 17982 2017-09-29 01:10:02.000000 asciidoc-8.6.10/COPYING
|
13
|
│ │ --rw-rw-r-- 0 root (0) root (0) 745 2017-09-29 01:10:02.000000 asciidoc-8.6.10/COPYRIGHT
|
14
|
│ │ --rw-rw-r-- 0 root (0) root (0) 7585 2017-09-29 01:10:02.000000 asciidoc-8.6.10/INSTALL.txt
|
15
|
│ │ --rw-rw-r-- 0 root (0) root (0) 1744 2017-09-29 01:10:02.000000 asciidoc-8.6.10/MANIFEST
|
16
|
│ │ --rw-rw-r-- 0 root (0) root (0) 4546 2017-09-29 01:10:02.000000 asciidoc-8.6.10/Makefile.in
|
17
|
│ │ --rw-rw-r-- 0 root (0) root (0) 1502 2017-09-29 01:10:02.000000 asciidoc-8.6.10/README.asciidoc
|
18
|
│ │ --rwxrwxr-x 0 root (0) root (0) 37150 2017-09-29 01:10:02.000000 asciidoc-8.6.10/a2x.py
|
19
|
│ │ --rw-rw-r-- 0 root (0) root (0) 17757 2017-09-29 01:10:02.000000 asciidoc-8.6.10/asciidoc.conf
|
20
|
│ │ --rwxrwxr-x 0 root (0) root (0) 254321 2017-09-29 01:10:02.000000 asciidoc-8.6.10/asciidoc.py
|
21
|
│ │ --rw-rw-r-- 0 root (0) root (0) 8498 2017-09-29 01:10:02.000000 asciidoc-8.6.10/asciidocapi.py
|
22
|
│ │ --rw-rw-r-- 0 root (0) root (0) 127 2017-09-29 01:10:02.000000 asciidoc-8.6.10/common.aap
|
23
|
│ │ --rw-rw-r-- 0 root (0) root (0) 108 2017-09-29 01:10:02.000000 asciidoc-8.6.10/configure.ac
|
24
|
│ │ -drwxrwxr-x 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/dblatex/
|
25
|
│ │ --rw-rw-r-- 0 root (0) root (0) 696 2017-09-29 01:10:02.000000 asciidoc-8.6.10/dblatex/asciidoc-dblatex.sty
|
26
|
│ │ --rw-rw-r-- 0 root (0) root (0) 2335 2017-09-29 01:10:02.000000 asciidoc-8.6.10/dblatex/asciidoc-dblatex.xsl
|
27
|
│ │ --rw-rw-r-- 0 root (0) root (0) 1360 2017-09-29 01:10:02.000000 asciidoc-8.6.10/dblatex/dblatex-readme.txt
|
28
|
│ │ -drwxrwxr-x 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/doc/
|
29
|
│ │ --rw-rw-r-- 0 root (0) root (0) 12611 2017-09-29 01:10:02.000000 asciidoc-8.6.10/doc/a2x.1.txt
|
30
|
│ │ --rw-rw-r-- 0 root (0) root (0) 2422 2017-09-29 01:10:02.000000 asciidoc-8.6.10/doc/article-docinfo.xml
|
31
|
│ │ --rw-rw-r-- 0 root (0) root (0) 3593 2017-09-29 01:10:02.000000 asciidoc-8.6.10/doc/article.txt
|
32
|
│ │ --rw-rw-r-- 0 root (0) root (0) 7080 2017-09-29 01:10:02.000000 asciidoc-8.6.10/doc/asciidoc.1.txt
|
33
|
│ │ --rw-rw-r-- 0 root (0) root (0) 171 2017-09-29 01:10:02.000000 asciidoc-8.6.10/doc/asciidoc.conf
|
34
|
│ │ --rw-rw-r-- 0 root (0) root (0) 9211 2017-09-29 01:10:02.000000 asciidoc-8.6.10/doc/asciidoc.dict
|
35
|
│ │ --rw-rw-r-- 0 root (0) root (0) 225247 2017-09-29 01:10:02.000000 asciidoc-8.6.10/doc/asciidoc.txt
|
36
|
│ │ --rw-rw-r-- 0 root (0) root (0) 6371 2017-09-29 01:10:02.000000 asciidoc-8.6.10/doc/asciidocapi.txt
|
37
|
│ │ --rw-rw-r-- 0 root (0) root (0) 2384 2017-09-29 01:10:02.000000 asciidoc-8.6.10/doc/asciimathml.txt
|
38
|
│ │ --rw-rw-r-- 0 root (0) root (0) 4628 2017-09-29 01:10:02.000000 asciidoc-8.6.10/doc/book-multi.txt
|
39
|
│ │ --rw-rw-r-- 0 root (0) root (0) 3708 2017-09-29 01:10:02.000000 asciidoc-8.6.10/doc/book.txt
|
40
|
│ │ --rw-rw-r-- 0 root (0) root (0) 819 2017-09-29 01:10:02.000000 asciidoc-8.6.10/doc/customers.csv
|
41
|
│ │ --rw-rw-r-- 0 root (0) root (0) 7173 2017-09-29 01:10:02.000000 asciidoc-8.6.10/doc/epub-notes.txt
|
42
|
│ │ --rw-rw-r-- 0 root (0) root (0) 47516 2017-09-29 01:10:02.000000 asciidoc-8.6.10/doc/faq.txt
|
43
|
│ │ -lrwxrwxrwx 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/doc/images -> ../images
|
44
|
│ │ --rw-rw-r-- 0 root (0) root (0) 11540 2017-09-29 01:10:02.000000 asciidoc-8.6.10/doc/latex-backend.txt
|
45
|
│ │ --rw-rw-r-- 0 root (0) root (0) 4256 2017-09-29 01:10:02.000000 asciidoc-8.6.10/doc/latex-bugs.txt
|
46
|
│ │ --rw-rw-r-- 0 root (0) root (0) 7726 2017-09-29 01:10:02.000000 asciidoc-8.6.10/doc/latex-filter.txt
|
47
|
│ │ --rw-rw-r-- 0 root (0) root (0) 3744 2017-09-29 01:10:02.000000 asciidoc-8.6.10/doc/latexmath.txt
|
48
|
│ │ --rw-rw-r-- 0 root (0) root (0) 1341 2017-09-29 01:10:02.000000 asciidoc-8.6.10/doc/latexmathml.txt
|
49
|
│ │ --rw-rw-r-- 0 root (0) root (0) 8647 2017-09-29 01:10:02.000000 asciidoc-8.6.10/doc/main.aap
|
50
|
│ │ --rw-rw-r-- 0 root (0) root (0) 5129 2017-09-29 01:10:02.000000 asciidoc-8.6.10/doc/music-filter.txt
|
51
|
│ │ --rw-rw-r-- 0 root (0) root (0) 13748 2017-09-29 01:10:02.000000 asciidoc-8.6.10/doc/publishing-ebooks-with-asciidoc.txt
|
52
|
│ │ --rw-rw-r-- 0 root (0) root (0) 4006 2017-09-29 01:10:02.000000 asciidoc-8.6.10/doc/slidy-example.txt
|
53
|
│ │ --rw-rw-r-- 0 root (0) root (0) 4083 2017-09-29 01:10:02.000000 asciidoc-8.6.10/doc/slidy.txt
|
54
|
│ │ --rw-rw-r-- 0 root (0) root (0) 7825 2017-09-29 01:10:02.000000 asciidoc-8.6.10/doc/source-highlight-filter.txt
|
55
|
│ │ --rw-rw-r-- 0 root (0) root (0) 8131 2017-09-29 01:10:02.000000 asciidoc-8.6.10/doc/testasciidoc.txt
|
56
|
│ │ -drwxrwxr-x 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/docbook-xsl/
|
57
|
│ │ --rw-rw-r-- 0 root (0) root (0) 2440 2017-09-29 01:10:02.000000 asciidoc-8.6.10/docbook-xsl/asciidoc-docbook-xsl.txt
|
58
|
│ │ --rw-rw-r-- 0 root (0) root (0) 851 2017-09-29 01:10:02.000000 asciidoc-8.6.10/docbook-xsl/chunked.xsl
|
59
|
│ │ --rw-rw-r-- 0 root (0) root (0) 3716 2017-09-29 01:10:02.000000 asciidoc-8.6.10/docbook-xsl/common.xsl
|
60
|
│ │ --rw-rw-r-- 0 root (0) root (0) 1077 2017-09-29 01:10:02.000000 asciidoc-8.6.10/docbook-xsl/epub.xsl
|
61
|
│ │ --rw-rw-r-- 0 root (0) root (0) 5568 2017-09-29 01:10:02.000000 asciidoc-8.6.10/docbook-xsl/fo.xsl
|
62
|
│ │ --rw-rw-r-- 0 root (0) root (0) 998 2017-09-29 01:10:02.000000 asciidoc-8.6.10/docbook-xsl/htmlhelp.xsl
|
63
|
│ │ --rw-rw-r-- 0 root (0) root (0) 1100 2017-09-29 01:10:02.000000 asciidoc-8.6.10/docbook-xsl/manpage.xsl
|
64
|
│ │ --rw-rw-r-- 0 root (0) root (0) 1738 2017-09-29 01:10:02.000000 asciidoc-8.6.10/docbook-xsl/text.xsl
|
65
|
│ │ --rw-rw-r-- 0 root (0) root (0) 647 2017-09-29 01:10:02.000000 asciidoc-8.6.10/docbook-xsl/xhtml.xsl
|
66
|
│ │ --rw-rw-r-- 0 root (0) root (0) 23553 2017-09-29 01:10:02.000000 asciidoc-8.6.10/docbook45.conf
|
67
|
│ │ -drwxrwxr-x 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/examples/
|
68
|
│ │ -drwxrwxr-x 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/examples/website/
|
69
|
│ │ -lrwxrwxrwx 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/examples/website/ASCIIMathML.js -> ../../javascripts/ASCIIMathML.js
|
70
|
│ │ -lrwxrwxrwx 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/examples/website/CHANGELOG.txt -> ../../CHANGELOG.txt
|
71
|
│ │ -lrwxrwxrwx 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/examples/website/INSTALL.txt -> ../../INSTALL.txt
|
72
|
│ │ -lrwxrwxrwx 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/examples/website/LaTeXMathML.js -> ../../javascripts/LaTeXMathML.js
|
73
|
│ │ --rw-rw-r-- 0 root (0) root (0) 1035 2017-09-29 01:10:02.000000 asciidoc-8.6.10/examples/website/README-website.txt
|
74
|
│ │ -lrwxrwxrwx 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/examples/website/README.txt -> ../../README.asciidoc
|
75
|
│ │ -lrwxrwxrwx 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/examples/website/a2x.1.txt -> ../../doc/a2x.1.txt
|
76
|
│ │ -lrwxrwxrwx 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/examples/website/asciidoc-docbook-xsl.txt -> ../../docbook-xsl/asciidoc-docbook-xsl.txt
|
77
|
│ │ -lrwxrwxrwx 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/examples/website/asciidoc-graphviz-sample.txt -> ../../filters/graphviz/asciidoc-graphviz-sample.txt
|
78
|
│ │ --rw-rw-r-- 0 root (0) root (0) 1887 2017-09-29 01:10:02.000000 asciidoc-8.6.10/examples/website/asciidoc-website.dict
|
79
|
│ │ -lrwxrwxrwx 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/examples/website/asciidoc.css -> ../../stylesheets/asciidoc.css
|
80
|
│ │ -lrwxrwxrwx 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/examples/website/asciidoc.js -> ../../javascripts/asciidoc.js
|
81
|
│ │ -lrwxrwxrwx 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/examples/website/asciidocapi.txt -> ../../doc/asciidocapi.txt
|
82
|
│ │ -lrwxrwxrwx 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/examples/website/asciimathml.txt -> ../../doc/asciimathml.txt
|
83
|
│ │ --rwxrwxr-x 0 root (0) root (0) 838 2017-09-29 01:10:02.000000 asciidoc-8.6.10/examples/website/build-website.sh
|
84
|
│ │ --rw-rw-r-- 0 root (0) root (0) 819 2017-09-29 01:10:02.000000 asciidoc-8.6.10/examples/website/customers.csv
|
85
|
│ │ -lrwxrwxrwx 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/examples/website/epub-notes.txt -> ../../doc/epub-notes.txt
|
86
|
│ │ -lrwxrwxrwx 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/examples/website/faq.txt -> ../../doc/faq.txt
|
87
|
│ │ --rw-rw-r-- 0 root (0) root (0) 1150 2017-09-29 01:10:02.000000 asciidoc-8.6.10/examples/website/favicon.ico
|
88
|
│ │ -lrwxrwxrwx 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/examples/website/images -> ../../images
|
89
|
│ │ --rw-rw-r-- 0 root (0) root (0) 22897 2017-09-29 01:10:02.000000 asciidoc-8.6.10/examples/website/index.txt
|
90
|
│ │ -lrwxrwxrwx 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/examples/website/latex-backend.txt -> ../../doc/latex-backend.txt
|
91
|
│ │ -lrwxrwxrwx 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/examples/website/latex-bugs.txt -> ../../doc/latex-bugs.txt
|
92
|
│ │ -lrwxrwxrwx 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/examples/website/latex-filter.txt -> ../../doc/latex-filter.txt
|
93
|
│ │ -lrwxrwxrwx 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/examples/website/latexmathml.txt -> ../../doc/latexmathml.txt
|
94
|
│ │ --rw-rw-r-- 0 root (0) root (0) 5292 2017-09-29 01:10:02.000000 asciidoc-8.6.10/examples/website/layout1.conf
|
95
|
│ │ --rw-rw-r-- 0 root (0) root (0) 1135 2017-09-29 01:10:02.000000 asciidoc-8.6.10/examples/website/layout1.css
|
96
|
│ │ --rw-rw-r-- 0 root (0) root (0) 5373 2017-09-29 01:10:02.000000 asciidoc-8.6.10/examples/website/layout2.conf
|
97
|
│ │ --rw-rw-r-- 0 root (0) root (0) 1443 2017-09-29 01:10:02.000000 asciidoc-8.6.10/examples/website/layout2.css
|
98
|
│ │ --rw-rw-r-- 0 root (0) root (0) 4508 2017-09-29 01:10:02.000000 asciidoc-8.6.10/examples/website/main.aap
|
99
|
│ │ -lrwxrwxrwx 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/examples/website/manpage.txt -> ../../doc/asciidoc.1.txt
|
100
|
│ │ -lrwxrwxrwx 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/examples/website/music-filter.txt -> ../../doc/music-filter.txt
|
101
|
│ │ --rw-rw-r-- 0 root (0) root (0) 1662 2017-09-29 01:10:02.000000 asciidoc-8.6.10/examples/website/newlists.txt
|
102
|
│ │ --rw-rw-r-- 0 root (0) root (0) 19480 2017-09-29 01:10:02.000000 asciidoc-8.6.10/examples/website/newtables.txt
|
103
|
│ │ --rw-rw-r-- 0 root (0) root (0) 2760 2017-09-29 01:10:02.000000 asciidoc-8.6.10/examples/website/plugins.txt
|
104
|
│ │ -lrwxrwxrwx 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/examples/website/publishing-ebooks-with-asciidoc.txt -> ../../doc/publishing-ebooks-with-asciidoc.txt
|
105
|
│ │ -lrwxrwxrwx 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/examples/website/slidy-example.txt -> ../../doc/slidy-example.txt
|
106
|
│ │ -lrwxrwxrwx 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/examples/website/slidy.txt -> ../../doc/slidy.txt
|
107
|
│ │ -lrwxrwxrwx 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/examples/website/source-highlight-filter.txt -> ../../doc/source-highlight-filter.txt
|
108
|
│ │ --rw-rw-r-- 0 root (0) root (0) 138 2017-09-29 01:10:02.000000 asciidoc-8.6.10/examples/website/support.txt
|
109
|
│ │ -lrwxrwxrwx 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/examples/website/testasciidoc.txt -> ../../doc/testasciidoc.txt
|
110
|
│ │ -lrwxrwxrwx 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/examples/website/userguide.txt -> ../../doc/asciidoc.txt
|
111
|
│ │ --rw-rw-r-- 0 root (0) root (0) 1683 2017-09-29 01:10:02.000000 asciidoc-8.6.10/examples/website/version83.txt
|
112
|
│ │ -lrwxrwxrwx 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/examples/website/xhtml11-quirks.css -> ../../stylesheets/xhtml11-quirks.css
|
113
|
│ │ -drwxrwxr-x 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/filters/
|
114
|
│ │ -drwxrwxr-x 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/filters/code/
|
115
|
│ │ --rw-rw-r-- 0 root (0) root (0) 869 2017-09-29 01:10:02.000000 asciidoc-8.6.10/filters/code/code-filter-readme.txt
|
116
|
│ │ --rw-rw-r-- 0 root (0) root (0) 393 2017-09-29 01:10:02.000000 asciidoc-8.6.10/filters/code/code-filter-test.txt
|
117
|
│ │ --rw-rw-r-- 0 root (0) root (0) 262 2017-09-29 01:10:02.000000 asciidoc-8.6.10/filters/code/code-filter.conf
|
118
|
│ │ --rwxrwxr-x 0 root (0) root (0) 7657 2017-09-29 01:10:02.000000 asciidoc-8.6.10/filters/code/code-filter.py
|
119
|
│ │ -drwxrwxr-x 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/filters/graphviz/
|
120
|
│ │ --rw-rw-r-- 0 root (0) root (0) 6051 2017-09-29 01:10:02.000000 asciidoc-8.6.10/filters/graphviz/asciidoc-graphviz-sample.txt
|
121
|
│ │ --rw-rw-r-- 0 root (0) root (0) 1765 2017-09-29 01:10:02.000000 asciidoc-8.6.10/filters/graphviz/graphviz-filter.conf
|
122
|
│ │ --rwxrwxr-x 0 root (0) root (0) 5485 2017-09-29 01:10:02.000000 asciidoc-8.6.10/filters/graphviz/graphviz2png.py
|
123
|
│ │ -drwxrwxr-x 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/filters/latex/
|
124
|
│ │ --rw-rw-r-- 0 root (0) root (0) 1611 2017-09-29 01:10:02.000000 asciidoc-8.6.10/filters/latex/latex-filter.conf
|
125
|
│ │ --rwxrwxr-x 0 root (0) root (0) 7442 2017-09-29 01:10:02.000000 asciidoc-8.6.10/filters/latex/latex2img.py
|
126
|
│ │ -drwxrwxr-x 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/filters/music/
|
127
|
│ │ --rw-rw-r-- 0 root (0) root (0) 1127 2017-09-29 01:10:02.000000 asciidoc-8.6.10/filters/music/music-filter-test.txt
|
128
|
│ │ --rw-rw-r-- 0 root (0) root (0) 1233 2017-09-29 01:10:02.000000 asciidoc-8.6.10/filters/music/music-filter.conf
|
129
|
│ │ --rwxrwxr-x 0 root (0) root (0) 6475 2017-09-29 01:10:02.000000 asciidoc-8.6.10/filters/music/music2png.py
|
130
|
│ │ -drwxrwxr-x 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/filters/source/
|
131
|
│ │ --rw-rw-r-- 0 root (0) root (0) 527 2017-09-29 01:10:02.000000 asciidoc-8.6.10/filters/source/source-highlight-filter-test.txt
|
132
|
│ │ --rw-rw-r-- 0 root (0) root (0) 5405 2017-09-29 01:10:02.000000 asciidoc-8.6.10/filters/source/source-highlight-filter.conf
|
133
|
│ │ --rwxrwxr-x 0 root (0) root (0) 460 2017-09-29 01:10:02.000000 asciidoc-8.6.10/filters/unwraplatex.py
|
134
|
│ │ --rw-rw-r-- 0 root (0) root (0) 10796 2017-09-29 01:10:02.000000 asciidoc-8.6.10/help.conf
|
135
|
│ │ --rw-rw-r-- 0 root (0) root (0) 15442 2017-09-29 01:10:02.000000 asciidoc-8.6.10/html4.conf
|
136
|
│ │ --rw-rw-r-- 0 root (0) root (0) 23167 2017-09-29 01:10:02.000000 asciidoc-8.6.10/html5.conf
|
137
|
│ │ -drwxrwxr-x 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/images/
|
138
|
│ │ --rw-rw-r-- 0 root (0) root (0) 128142 2017-09-29 01:10:02.000000 asciidoc-8.6.10/images/highlighter.png
|
139
|
│ │ -drwxrwxr-x 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/images/icons/
|
140
|
│ │ --rw-rw-r-- 0 root (0) root (0) 226 2017-09-29 01:10:02.000000 asciidoc-8.6.10/images/icons/README
|
141
|
│ │ -drwxrwxr-x 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/images/icons/callouts/
|
142
|
│ │ --rw-rw-r-- 0 root (0) root (0) 329 2017-09-29 01:10:02.000000 asciidoc-8.6.10/images/icons/callouts/1.png
|
143
|
│ │ --rw-rw-r-- 0 root (0) root (0) 361 2017-09-29 01:10:02.000000 asciidoc-8.6.10/images/icons/callouts/10.png
|
144
|
│ │ --rw-rw-r-- 0 root (0) root (0) 565 2017-09-29 01:10:02.000000 asciidoc-8.6.10/images/icons/callouts/11.png
|
145
|
│ │ --rw-rw-r-- 0 root (0) root (0) 617 2017-09-29 01:10:02.000000 asciidoc-8.6.10/images/icons/callouts/12.png
|
146
|
│ │ --rw-rw-r-- 0 root (0) root (0) 623 2017-09-29 01:10:02.000000 asciidoc-8.6.10/images/icons/callouts/13.png
|
147
|
│ │ --rw-rw-r-- 0 root (0) root (0) 411 2017-09-29 01:10:02.000000 asciidoc-8.6.10/images/icons/callouts/14.png
|
148
|
│ │ --rw-rw-r-- 0 root (0) root (0) 640 2017-09-29 01:10:02.000000 asciidoc-8.6.10/images/icons/callouts/15.png
|
149
|
│ │ --rw-rw-r-- 0 root (0) root (0) 353 2017-09-29 01:10:02.000000 asciidoc-8.6.10/images/icons/callouts/2.png
|
150
|
│ │ --rw-rw-r-- 0 root (0) root (0) 350 2017-09-29 01:10:02.000000 asciidoc-8.6.10/images/icons/callouts/3.png
|
151
|
│ │ --rw-rw-r-- 0 root (0) root (0) 345 2017-09-29 01:10:02.000000 asciidoc-8.6.10/images/icons/callouts/4.png
|
152
|
│ │ --rw-rw-r-- 0 root (0) root (0) 348 2017-09-29 01:10:02.000000 asciidoc-8.6.10/images/icons/callouts/5.png
|
153
|
│ │ --rw-rw-r-- 0 root (0) root (0) 355 2017-09-29 01:10:02.000000 asciidoc-8.6.10/images/icons/callouts/6.png
|
154
|
│ │ --rw-rw-r-- 0 root (0) root (0) 344 2017-09-29 01:10:02.000000 asciidoc-8.6.10/images/icons/callouts/7.png
|
155
|
│ │ --rw-rw-r-- 0 root (0) root (0) 357 2017-09-29 01:10:02.000000 asciidoc-8.6.10/images/icons/callouts/8.png
|
156
|
│ │ --rw-rw-r-- 0 root (0) root (0) 357 2017-09-29 01:10:02.000000 asciidoc-8.6.10/images/icons/callouts/9.png
|
157
|
│ │ --rw-rw-r-- 0 root (0) root (0) 2734 2017-09-29 01:10:02.000000 asciidoc-8.6.10/images/icons/caution.png
|
158
|
│ │ --rw-rw-r-- 0 root (0) root (0) 2599 2017-09-29 01:10:02.000000 asciidoc-8.6.10/images/icons/example.png
|
159
|
│ │ --rw-rw-r-- 0 root (0) root (0) 1340 2017-09-29 01:10:02.000000 asciidoc-8.6.10/images/icons/home.png
|
160
|
│ │ --rw-rw-r-- 0 root (0) root (0) 2980 2017-09-29 01:10:02.000000 asciidoc-8.6.10/images/icons/important.png
|
161
|
│ │ --rw-rw-r-- 0 root (0) root (0) 1302 2017-09-29 01:10:02.000000 asciidoc-8.6.10/images/icons/next.png
|
162
|
│ │ --rw-rw-r-- 0 root (0) root (0) 2494 2017-09-29 01:10:02.000000 asciidoc-8.6.10/images/icons/note.png
|
163
|
│ │ --rw-rw-r-- 0 root (0) root (0) 1348 2017-09-29 01:10:02.000000 asciidoc-8.6.10/images/icons/prev.png
|
164
|
│ │ --rw-rw-r-- 0 root (0) root (0) 2718 2017-09-29 01:10:02.000000 asciidoc-8.6.10/images/icons/tip.png
|
165
|
│ │ --rw-rw-r-- 0 root (0) root (0) 1320 2017-09-29 01:10:02.000000 asciidoc-8.6.10/images/icons/up.png
|
166
|
│ │ --rw-rw-r-- 0 root (0) root (0) 3214 2017-09-29 01:10:02.000000 asciidoc-8.6.10/images/icons/warning.png
|
167
|
│ │ --rw-rw-r-- 0 root (0) root (0) 292 2017-09-29 01:10:02.000000 asciidoc-8.6.10/images/smallnew.png
|
168
|
│ │ --rw-rw-r-- 0 root (0) root (0) 6515 2017-09-29 01:10:02.000000 asciidoc-8.6.10/images/tiger.png
|
169
|
│ │ --rwxrwxr-x 0 root (0) root (0) 13998 2017-09-29 01:10:02.000000 asciidoc-8.6.10/install-sh
|
170
|
│ │ -drwxrwxr-x 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/javascripts/
|
171
|
│ │ --rw-rw-r-- 0 root (0) root (0) 42470 2017-09-29 01:10:02.000000 asciidoc-8.6.10/javascripts/ASCIIMathML.js
|
172
|
│ │ --rw-rw-r-- 0 root (0) root (0) 55545 2017-09-29 01:10:02.000000 asciidoc-8.6.10/javascripts/LaTeXMathML.js
|
173
|
│ │ --rw-rw-r-- 0 root (0) root (0) 5826 2017-09-29 01:10:02.000000 asciidoc-8.6.10/javascripts/asciidoc.js
|
174
|
│ │ --rw-rw-r-- 0 root (0) root (0) 77332 2017-09-29 01:10:02.000000 asciidoc-8.6.10/javascripts/slidy.js
|
175
|
│ │ --rw-rw-r-- 0 root (0) root (0) 2366 2017-09-29 01:10:02.000000 asciidoc-8.6.10/javascripts/toc.js
|
176
|
│ │ --rw-rw-r-- 0 root (0) root (0) 1288 2017-09-29 01:10:02.000000 asciidoc-8.6.10/lang-cs.conf
|
177
|
│ │ --rw-rw-r-- 0 root (0) root (0) 1325 2017-09-29 01:10:02.000000 asciidoc-8.6.10/lang-de.conf
|
178
|
│ │ --rw-rw-r-- 0 root (0) root (0) 1443 2017-09-29 01:10:02.000000 asciidoc-8.6.10/lang-el.conf
|
179
|
│ │ --rw-rw-r-- 0 root (0) root (0) 1153 2017-09-29 01:10:02.000000 asciidoc-8.6.10/lang-en.conf
|
180
|
│ │ --rw-rw-r-- 0 root (0) root (0) 1297 2017-09-29 01:10:02.000000 asciidoc-8.6.10/lang-es.conf
|
181
|
│ │ --rw-rw-r-- 0 root (0) root (0) 1189 2017-09-29 01:10:02.000000 asciidoc-8.6.10/lang-fi.conf
|
182
|
│ │ --rw-rw-r-- 0 root (0) root (0) 1306 2017-09-29 01:10:02.000000 asciidoc-8.6.10/lang-fr.conf
|
183
|
│ │ --rw-rw-r-- 0 root (0) root (0) 1290 2017-09-29 01:10:02.000000 asciidoc-8.6.10/lang-hu.conf
|
184
|
│ │ --rw-rw-r-- 0 root (0) root (0) 1166 2017-09-29 01:10:02.000000 asciidoc-8.6.10/lang-id.conf
|
185
|
│ │ --rw-rw-r-- 0 root (0) root (0) 1230 2017-09-29 01:10:02.000000 asciidoc-8.6.10/lang-it.conf
|
186
|
│ │ --rw-rw-r-- 0 root (0) root (0) 1294 2017-09-29 01:10:02.000000 asciidoc-8.6.10/lang-ja.conf
|
187
|
│ │ --rw-rw-r-- 0 root (0) root (0) 1341 2017-09-29 01:10:02.000000 asciidoc-8.6.10/lang-nl.conf
|
188
|
│ │ --rw-rw-r-- 0 root (0) root (0) 1313 2017-09-29 01:10:02.000000 asciidoc-8.6.10/lang-pl.conf
|
189
|
│ │ --rw-rw-r-- 0 root (0) root (0) 1280 2017-09-29 01:10:02.000000 asciidoc-8.6.10/lang-pt-BR.conf
|
190
|
│ │ --rw-rw-r-- 0 root (0) root (0) 1252 2017-09-29 01:10:02.000000 asciidoc-8.6.10/lang-ro.conf
|
191
|
│ │ --rw-rw-r-- 0 root (0) root (0) 1520 2017-09-29 01:10:02.000000 asciidoc-8.6.10/lang-ru.conf
|
192
|
│ │ --rw-rw-r-- 0 root (0) root (0) 1212 2017-09-29 01:10:02.000000 asciidoc-8.6.10/lang-sv.conf
|
193
|
│ │ --rw-rw-r-- 0 root (0) root (0) 1487 2017-09-29 01:10:02.000000 asciidoc-8.6.10/lang-uk.conf
|
194
|
│ │ --rw-rw-r-- 0 root (0) root (0) 20348 2017-09-29 01:10:02.000000 asciidoc-8.6.10/latex.conf
|
195
|
│ │ --rw-rw-r-- 0 root (0) root (0) 2745 2017-09-29 01:10:02.000000 asciidoc-8.6.10/main.aap
|
196
|
│ │ --rw-rw-r-- 0 root (0) root (0) 4866 2017-09-29 01:10:02.000000 asciidoc-8.6.10/slidy.conf
|
197
|
│ │ -drwxrwxr-x 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/stylesheets/
|
198
|
│ │ --rw-rw-r-- 0 root (0) root (0) 9246 2017-09-29 01:10:02.000000 asciidoc-8.6.10/stylesheets/asciidoc.css
|
199
|
│ │ --rw-rw-r-- 0 root (0) root (0) 5738 2017-09-29 01:10:02.000000 asciidoc-8.6.10/stylesheets/docbook-xsl.css
|
200
|
│ │ --rw-rw-r-- 0 root (0) root (0) 3906 2017-09-29 01:10:02.000000 asciidoc-8.6.10/stylesheets/pygments.css
|
201
|
│ │ --rw-rw-r-- 0 root (0) root (0) 9293 2017-09-29 01:10:02.000000 asciidoc-8.6.10/stylesheets/slidy.css
|
202
|
│ │ --rw-rw-r-- 0 root (0) root (0) 537 2017-09-29 01:10:02.000000 asciidoc-8.6.10/stylesheets/toc2.css
|
203
|
│ │ --rw-rw-r-- 0 root (0) root (0) 859 2017-09-29 01:10:02.000000 asciidoc-8.6.10/stylesheets/xhtml11-quirks.css
|
204
|
│ │ -drwxrwxr-x 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/tests/
|
205
|
│ │ -lrwxrwxrwx 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/tests/asciidocapi.py -> ../asciidocapi.py
|
206
|
│ │ -drwxrwxr-x 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/tests/data/
|
207
|
│ │ --rw-rw-r-- 0 root (0) root (0) 171 2017-09-29 01:10:02.000000 asciidoc-8.6.10/tests/data/barchart.py
|
208
|
│ │ --rw-rw-r-- 0 root (0) root (0) 365 2017-09-29 01:10:02.000000 asciidoc-8.6.10/tests/data/deprecated-quotes.txt
|
209
|
│ │ --rw-rw-r-- 0 root (0) root (0) 2492 2017-09-29 01:10:02.000000 asciidoc-8.6.10/tests/data/filters-test.txt
|
210
|
│ │ --rw-rw-r-- 0 root (0) root (0) 378 2017-09-29 01:10:02.000000 asciidoc-8.6.10/tests/data/lang-cs-man-test.txt
|
211
|
│ │ --rw-rw-r-- 0 root (0) root (0) 2010 2017-09-29 01:10:02.000000 asciidoc-8.6.10/tests/data/lang-cs-test.txt
|
212
|
│ │ --rw-rw-r-- 0 root (0) root (0) 383 2017-09-29 01:10:02.000000 asciidoc-8.6.10/tests/data/lang-de-man-test.txt
|
213
|
│ │ --rw-rw-r-- 0 root (0) root (0) 2056 2017-09-29 01:10:02.000000 asciidoc-8.6.10/tests/data/lang-de-test.txt
|
214
|
│ │ --rw-rw-r-- 0 root (0) root (0) 380 2017-09-29 01:10:02.000000 asciidoc-8.6.10/tests/data/lang-en-man-test.txt
|
215
|
│ │ --rw-rw-r-- 0 root (0) root (0) 2168 2017-09-29 01:10:02.000000 asciidoc-8.6.10/tests/data/lang-en-test.txt
|
216
|
│ │ --rw-rw-r-- 0 root (0) root (0) 380 2017-09-29 01:10:02.000000 asciidoc-8.6.10/tests/data/lang-es-man-test.txt
|
217
|
│ │ --rw-rw-r-- 0 root (0) root (0) 2013 2017-09-29 01:10:02.000000 asciidoc-8.6.10/tests/data/lang-es-test.txt
|
218
|
│ │ --rw-rw-r-- 0 root (0) root (0) 380 2017-09-29 01:10:02.000000 asciidoc-8.6.10/tests/data/lang-fr-man-test.txt
|
219
|
│ │ --rw-rw-r-- 0 root (0) root (0) 2010 2017-09-29 01:10:02.000000 asciidoc-8.6.10/tests/data/lang-fr-test.txt
|
220
|
│ │ --rw-rw-r-- 0 root (0) root (0) 386 2017-09-29 01:10:02.000000 asciidoc-8.6.10/tests/data/lang-hu-man-test.txt
|
221
|
│ │ --rw-rw-r-- 0 root (0) root (0) 2010 2017-09-29 01:10:02.000000 asciidoc-8.6.10/tests/data/lang-hu-test.txt
|
222
|
│ │ --rw-rw-r-- 0 root (0) root (0) 378 2017-09-29 01:10:02.000000 asciidoc-8.6.10/tests/data/lang-it-man-test.txt
|
223
|
│ │ --rw-rw-r-- 0 root (0) root (0) 2010 2017-09-29 01:10:02.000000 asciidoc-8.6.10/tests/data/lang-it-test.txt
|
224
|
│ │ --rw-rw-r-- 0 root (0) root (0) 406 2017-09-29 01:10:02.000000 asciidoc-8.6.10/tests/data/lang-ja-man-test.txt
|
225
|
│ │ --rw-rw-r-- 0 root (0) root (0) 1891 2017-09-29 01:10:02.000000 asciidoc-8.6.10/tests/data/lang-ja-test.txt
|
226
|
│ │ --rw-rw-r-- 0 root (0) root (0) 380 2017-09-29 01:10:02.000000 asciidoc-8.6.10/tests/data/lang-nl-man-test.txt
|
227
|
│ │ --rw-rw-r-- 0 root (0) root (0) 1935 2017-09-29 01:10:02.000000 asciidoc-8.6.10/tests/data/lang-nl-test.txt
|
228
|
│ │ --rw-rw-r-- 0 root (0) root (0) 384 2017-09-29 01:10:02.000000 asciidoc-8.6.10/tests/data/lang-pt-BR-man-test.txt
|
229
|
│ │ --rw-rw-r-- 0 root (0) root (0) 2021 2017-09-29 01:10:02.000000 asciidoc-8.6.10/tests/data/lang-pt-BR-test.txt
|
230
|
│ │ --rw-rw-r-- 0 root (0) root (0) 378 2017-09-29 01:10:02.000000 asciidoc-8.6.10/tests/data/lang-ro-man-test.txt
|
231
|
│ │ --rw-rw-r-- 0 root (0) root (0) 2010 2017-09-29 01:10:02.000000 asciidoc-8.6.10/tests/data/lang-ro-test.txt
|
232
|
│ │ --rw-rw-r-- 0 root (0) root (0) 379 2017-09-29 01:10:02.000000 asciidoc-8.6.10/tests/data/lang-ru-man-test.txt
|
233
|
│ │ --rw-rw-r-- 0 root (0) root (0) 2150 2017-09-29 01:10:02.000000 asciidoc-8.6.10/tests/data/lang-ru-test.txt
|
234
|
│ │ --rw-rw-r-- 0 root (0) root (0) 381 2017-09-29 01:10:02.000000 asciidoc-8.6.10/tests/data/lang-sv-man-test.txt
|
235
|
│ │ --rw-rw-r-- 0 root (0) root (0) 2185 2017-09-29 01:10:02.000000 asciidoc-8.6.10/tests/data/lang-sv-test.txt
|
236
|
│ │ --rw-rw-r-- 0 root (0) root (0) 379 2017-09-29 01:10:02.000000 asciidoc-8.6.10/tests/data/lang-uk-man-test.txt
|
237
|
│ │ --rw-rw-r-- 0 root (0) root (0) 2129 2017-09-29 01:10:02.000000 asciidoc-8.6.10/tests/data/lang-uk-test.txt
|
238
|
│ │ --rw-rw-r-- 0 root (0) root (0) 1784 2017-09-29 01:10:02.000000 asciidoc-8.6.10/tests/data/oldtables.txt
|
239
|
│ │ --rw-rw-r-- 0 root (0) root (0) 1432 2017-09-29 01:10:02.000000 asciidoc-8.6.10/tests/data/open-block-test.txt
|
240
|
│ │ --rw-rw-r-- 0 root (0) root (0) 114 2017-09-29 01:10:02.000000 asciidoc-8.6.10/tests/data/rcs-id-marker-test.txt
|
241
|
│ │ --rw-rw-r-- 0 root (0) root (0) 192 2017-09-29 01:10:02.000000 asciidoc-8.6.10/tests/data/testcases.conf
|
242
|
│ │ --rw-rw-r-- 0 root (0) root (0) 17369 2017-09-29 01:10:02.000000 asciidoc-8.6.10/tests/data/testcases.txt
|
243
|
│ │ --rw-rw-r-- 0 root (0) root (0) 128 2017-09-29 01:10:02.000000 asciidoc-8.6.10/tests/data/utf8-bom-test.txt
|
244
|
│ │ --rw-rw-r-- 0 root (0) root (0) 13360 2017-09-29 01:10:02.000000 asciidoc-8.6.10/tests/data/utf8-examples.txt
|
245
|
│ │ --rw-rw-r-- 0 root (0) root (0) 14415 2017-09-29 01:10:02.000000 asciidoc-8.6.10/tests/testasciidoc.conf
|
246
|
│ │ --rwxrwxr-x 0 root (0) root (0) 14731 2017-09-29 01:10:02.000000 asciidoc-8.6.10/tests/testasciidoc.py
|
247
|
│ │ --rw-rw-r-- 0 root (0) root (0) 438 2017-09-29 01:10:02.000000 asciidoc-8.6.10/text.conf
|
248
|
│ │ -drwxrwxr-x 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/themes/
|
249
|
│ │ -drwxrwxr-x 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/themes/flask/
|
250
|
│ │ --rw-rw-r-- 0 root (0) root (0) 11240 2017-09-29 01:10:02.000000 asciidoc-8.6.10/themes/flask/flask.css
|
251
|
│ │ -drwxrwxr-x 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/themes/volnitsky/
|
252
|
│ │ --rw-rw-r-- 0 root (0) root (0) 8042 2017-09-29 01:10:02.000000 asciidoc-8.6.10/themes/volnitsky/volnitsky.css
|
253
|
│ │ -drwxrwxr-x 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/vim/
|
254
|
│ │ -drwxrwxr-x 0 root (0) root (0) 0 2017-09-29 01:10:02.000000 asciidoc-8.6.10/vim/syntax/
|
255
|
│ │ --rw-rw-r-- 0 root (0) root (0) 10858 2017-09-29 01:10:02.000000 asciidoc-8.6.10/vim/syntax/asciidoc.vim
|
256
|
│ │ --rw-rw-r-- 0 root (0) root (0) 1940 2017-09-29 01:10:02.000000 asciidoc-8.6.10/xhtml11-quirks.conf
|
257
|
│ │ --rw-rw-r-- 0 root (0) root (0) 22931 2017-09-29 01:10:02.000000 asciidoc-8.6.10/xhtml11.conf
|
258
|
│ │ +drwxrwxr-x 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/
|
259
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 174 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/.gitignore
|
260
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 537 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/.travis.yml
|
261
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 620 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/BUGS.txt
|
262
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 153592 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/CHANGELOG.txt
|
263
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 17982 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/COPYING
|
264
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 745 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/COPYRIGHT
|
265
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 7585 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/INSTALL.txt
|
266
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 1744 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/MANIFEST
|
267
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 4546 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/Makefile.in
|
268
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 1502 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/README.asciidoc
|
269
|
│ │ +-rwxrwxr-x 0 root (0) root (0) 37150 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/a2x.py
|
270
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 17757 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/asciidoc.conf
|
271
|
│ │ +-rwxrwxr-x 0 root (0) root (0) 253937 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/asciidoc.py
|
272
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 9090 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/asciidocapi.py
|
273
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 127 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/common.aap
|
274
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 108 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/configure.ac
|
275
|
│ │ +drwxrwxr-x 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/dblatex/
|
276
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 696 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/dblatex/asciidoc-dblatex.sty
|
277
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 2335 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/dblatex/asciidoc-dblatex.xsl
|
278
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 1360 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/dblatex/dblatex-readme.txt
|
279
|
│ │ +drwxrwxr-x 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/doc/
|
280
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 12611 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/doc/a2x.1.txt
|
281
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 2422 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/doc/article-docinfo.xml
|
282
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 3593 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/doc/article.txt
|
283
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 7080 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/doc/asciidoc.1.txt
|
284
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 171 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/doc/asciidoc.conf
|
285
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 9211 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/doc/asciidoc.dict
|
286
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 225247 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/doc/asciidoc.txt
|
287
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 6371 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/doc/asciidocapi.txt
|
288
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 2384 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/doc/asciimathml.txt
|
289
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 4628 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/doc/book-multi.txt
|
290
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 3708 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/doc/book.txt
|
291
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 819 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/doc/customers.csv
|
292
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 7173 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/doc/epub-notes.txt
|
293
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 47516 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/doc/faq.txt
|
294
|
│ │ +lrwxrwxrwx 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/doc/images -> ../images
|
295
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 11540 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/doc/latex-backend.txt
|
296
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 4256 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/doc/latex-bugs.txt
|
297
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 7726 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/doc/latex-filter.txt
|
298
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 3744 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/doc/latexmath.txt
|
299
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 1341 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/doc/latexmathml.txt
|
300
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 8647 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/doc/main.aap
|
301
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 5129 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/doc/music-filter.txt
|
302
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 13748 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/doc/publishing-ebooks-with-asciidoc.txt
|
303
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 4006 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/doc/slidy-example.txt
|
304
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 4083 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/doc/slidy.txt
|
305
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 7825 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/doc/source-highlight-filter.txt
|
306
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 8131 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/doc/testasciidoc.txt
|
307
|
│ │ +drwxrwxr-x 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/docbook-xsl/
|
308
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 2440 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/docbook-xsl/asciidoc-docbook-xsl.txt
|
309
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 851 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/docbook-xsl/chunked.xsl
|
310
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 3716 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/docbook-xsl/common.xsl
|
311
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 1077 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/docbook-xsl/epub.xsl
|
312
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 5568 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/docbook-xsl/fo.xsl
|
313
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 998 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/docbook-xsl/htmlhelp.xsl
|
314
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 1100 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/docbook-xsl/manpage.xsl
|
315
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 1738 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/docbook-xsl/text.xsl
|
316
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 647 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/docbook-xsl/xhtml.xsl
|
317
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 23553 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/docbook45.conf
|
318
|
│ │ +drwxrwxr-x 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/examples/
|
319
|
│ │ +drwxrwxr-x 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/examples/website/
|
320
|
│ │ +lrwxrwxrwx 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/examples/website/ASCIIMathML.js -> ../../javascripts/ASCIIMathML.js
|
321
|
│ │ +lrwxrwxrwx 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/examples/website/CHANGELOG.txt -> ../../CHANGELOG.txt
|
322
|
│ │ +lrwxrwxrwx 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/examples/website/INSTALL.txt -> ../../INSTALL.txt
|
323
|
│ │ +lrwxrwxrwx 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/examples/website/LaTeXMathML.js -> ../../javascripts/LaTeXMathML.js
|
324
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 1035 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/examples/website/README-website.txt
|
325
|
│ │ +lrwxrwxrwx 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/examples/website/README.txt -> ../../README.asciidoc
|
326
|
│ │ +lrwxrwxrwx 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/examples/website/a2x.1.txt -> ../../doc/a2x.1.txt
|
327
|
│ │ +lrwxrwxrwx 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/examples/website/asciidoc-docbook-xsl.txt -> ../../docbook-xsl/asciidoc-docbook-xsl.txt
|
328
|
│ │ +lrwxrwxrwx 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/examples/website/asciidoc-graphviz-sample.txt -> ../../filters/graphviz/asciidoc-graphviz-sample.txt
|
329
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 1887 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/examples/website/asciidoc-website.dict
|
330
|
│ │ +lrwxrwxrwx 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/examples/website/asciidoc.css -> ../../stylesheets/asciidoc.css
|
331
|
│ │ +lrwxrwxrwx 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/examples/website/asciidoc.js -> ../../javascripts/asciidoc.js
|
332
|
│ │ +lrwxrwxrwx 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/examples/website/asciidocapi.txt -> ../../doc/asciidocapi.txt
|
333
|
│ │ +lrwxrwxrwx 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/examples/website/asciimathml.txt -> ../../doc/asciimathml.txt
|
334
|
│ │ +-rwxrwxr-x 0 root (0) root (0) 838 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/examples/website/build-website.sh
|
335
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 819 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/examples/website/customers.csv
|
336
|
│ │ +lrwxrwxrwx 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/examples/website/epub-notes.txt -> ../../doc/epub-notes.txt
|
337
|
│ │ +lrwxrwxrwx 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/examples/website/faq.txt -> ../../doc/faq.txt
|
338
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 1150 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/examples/website/favicon.ico
|
339
|
│ │ +lrwxrwxrwx 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/examples/website/images -> ../../images
|
340
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 22897 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/examples/website/index.txt
|
341
|
│ │ +lrwxrwxrwx 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/examples/website/latex-backend.txt -> ../../doc/latex-backend.txt
|
342
|
│ │ +lrwxrwxrwx 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/examples/website/latex-bugs.txt -> ../../doc/latex-bugs.txt
|
343
|
│ │ +lrwxrwxrwx 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/examples/website/latex-filter.txt -> ../../doc/latex-filter.txt
|
344
|
│ │ +lrwxrwxrwx 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/examples/website/latexmathml.txt -> ../../doc/latexmathml.txt
|
345
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 5292 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/examples/website/layout1.conf
|
346
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 1135 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/examples/website/layout1.css
|
347
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 5373 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/examples/website/layout2.conf
|
348
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 1443 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/examples/website/layout2.css
|
349
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 4508 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/examples/website/main.aap
|
350
|
│ │ +lrwxrwxrwx 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/examples/website/manpage.txt -> ../../doc/asciidoc.1.txt
|
351
|
│ │ +lrwxrwxrwx 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/examples/website/music-filter.txt -> ../../doc/music-filter.txt
|
352
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 1662 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/examples/website/newlists.txt
|
353
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 19480 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/examples/website/newtables.txt
|
354
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 2760 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/examples/website/plugins.txt
|
355
|
│ │ +lrwxrwxrwx 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/examples/website/publishing-ebooks-with-asciidoc.txt -> ../../doc/publishing-ebooks-with-asciidoc.txt
|
356
|
│ │ +lrwxrwxrwx 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/examples/website/slidy-example.txt -> ../../doc/slidy-example.txt
|
357
|
│ │ +lrwxrwxrwx 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/examples/website/slidy.txt -> ../../doc/slidy.txt
|
358
|
│ │ +lrwxrwxrwx 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/examples/website/source-highlight-filter.txt -> ../../doc/source-highlight-filter.txt
|
359
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 138 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/examples/website/support.txt
|
360
|
│ │ +lrwxrwxrwx 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/examples/website/testasciidoc.txt -> ../../doc/testasciidoc.txt
|
361
|
│ │ +lrwxrwxrwx 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/examples/website/userguide.txt -> ../../doc/asciidoc.txt
|
362
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 1683 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/examples/website/version83.txt
|
363
|
│ │ +lrwxrwxrwx 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/examples/website/xhtml11-quirks.css -> ../../stylesheets/xhtml11-quirks.css
|
364
|
│ │ +drwxrwxr-x 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/filters/
|
365
|
│ │ +drwxrwxr-x 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/filters/code/
|
366
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 869 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/filters/code/code-filter-readme.txt
|
367
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 393 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/filters/code/code-filter-test.txt
|
368
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 262 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/filters/code/code-filter.conf
|
369
|
│ │ +-rwxrwxr-x 0 root (0) root (0) 7591 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/filters/code/code-filter.py
|
370
|
│ │ +drwxrwxr-x 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/filters/graphviz/
|
371
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 6051 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/filters/graphviz/asciidoc-graphviz-sample.txt
|
372
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 1765 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/filters/graphviz/graphviz-filter.conf
|
373
|
│ │ +-rwxrwxr-x 0 root (0) root (0) 5492 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/filters/graphviz/graphviz2png.py
|
374
|
│ │ +drwxrwxr-x 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/filters/latex/
|
375
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 1611 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/filters/latex/latex-filter.conf
|
376
|
│ │ +-rwxrwxr-x 0 root (0) root (0) 7340 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/filters/latex/latex2img.py
|
377
|
│ │ +drwxrwxr-x 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/filters/music/
|
378
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 1127 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/filters/music/music-filter-test.txt
|
379
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 1233 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/filters/music/music-filter.conf
|
380
|
│ │ +-rwxrwxr-x 0 root (0) root (0) 6371 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/filters/music/music2png.py
|
381
|
│ │ +drwxrwxr-x 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/filters/source/
|
382
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 527 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/filters/source/source-highlight-filter-test.txt
|
383
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 5405 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/filters/source/source-highlight-filter.conf
|
384
|
│ │ +-rwxrwxr-x 0 root (0) root (0) 460 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/filters/unwraplatex.py
|
385
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 10796 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/help.conf
|
386
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 15488 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/html4.conf
|
387
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 23213 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/html5.conf
|
388
|
│ │ +drwxrwxr-x 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/images/
|
389
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 128142 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/images/highlighter.png
|
390
|
│ │ +drwxrwxr-x 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/images/icons/
|
391
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 226 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/images/icons/README
|
392
|
│ │ +drwxrwxr-x 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/images/icons/callouts/
|
393
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 329 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/images/icons/callouts/1.png
|
394
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 361 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/images/icons/callouts/10.png
|
395
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 565 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/images/icons/callouts/11.png
|
396
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 617 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/images/icons/callouts/12.png
|
397
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 623 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/images/icons/callouts/13.png
|
398
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 411 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/images/icons/callouts/14.png
|
399
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 640 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/images/icons/callouts/15.png
|
400
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 353 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/images/icons/callouts/2.png
|
401
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 350 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/images/icons/callouts/3.png
|
402
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 345 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/images/icons/callouts/4.png
|
403
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 348 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/images/icons/callouts/5.png
|
404
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 355 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/images/icons/callouts/6.png
|
405
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 344 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/images/icons/callouts/7.png
|
406
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 357 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/images/icons/callouts/8.png
|
407
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 357 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/images/icons/callouts/9.png
|
408
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 2734 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/images/icons/caution.png
|
409
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 2599 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/images/icons/example.png
|
410
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 1340 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/images/icons/home.png
|
411
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 2980 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/images/icons/important.png
|
412
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 1302 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/images/icons/next.png
|
413
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 2494 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/images/icons/note.png
|
414
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 1348 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/images/icons/prev.png
|
415
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 2718 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/images/icons/tip.png
|
416
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 1320 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/images/icons/up.png
|
417
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 3214 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/images/icons/warning.png
|
418
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 292 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/images/smallnew.png
|
419
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 6515 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/images/tiger.png
|
420
|
│ │ +-rwxrwxr-x 0 root (0) root (0) 13998 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/install-sh
|
421
|
│ │ +drwxrwxr-x 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/javascripts/
|
422
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 42470 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/javascripts/ASCIIMathML.js
|
423
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 55545 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/javascripts/LaTeXMathML.js
|
424
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 5826 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/javascripts/asciidoc.js
|
425
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 77332 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/javascripts/slidy.js
|
426
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 2366 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/javascripts/toc.js
|
427
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 1288 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/lang-cs.conf
|
428
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 1325 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/lang-de.conf
|
429
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 1443 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/lang-el.conf
|
430
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 1153 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/lang-en.conf
|
431
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 1297 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/lang-es.conf
|
432
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 1189 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/lang-fi.conf
|
433
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 1306 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/lang-fr.conf
|
434
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 1290 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/lang-hu.conf
|
435
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 1166 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/lang-id.conf
|
436
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 1230 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/lang-it.conf
|
437
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 1294 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/lang-ja.conf
|
438
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 1341 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/lang-nl.conf
|
439
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 1313 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/lang-pl.conf
|
440
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 1280 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/lang-pt-BR.conf
|
441
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 1252 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/lang-ro.conf
|
442
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 1520 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/lang-ru.conf
|
443
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 1212 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/lang-sv.conf
|
444
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 1487 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/lang-uk.conf
|
445
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 20348 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/latex.conf
|
446
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 2745 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/main.aap
|
447
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 4866 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/slidy.conf
|
448
|
│ │ +drwxrwxr-x 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/stylesheets/
|
449
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 9246 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/stylesheets/asciidoc.css
|
450
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 5738 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/stylesheets/docbook-xsl.css
|
451
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 3906 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/stylesheets/pygments.css
|
452
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 9293 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/stylesheets/slidy.css
|
453
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 537 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/stylesheets/toc2.css
|
454
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 859 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/stylesheets/xhtml11-quirks.css
|
455
|
│ │ +drwxrwxr-x 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/tests/
|
456
|
│ │ +lrwxrwxrwx 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/tests/asciidocapi.py -> ../asciidocapi.py
|
457
|
│ │ +drwxrwxr-x 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/tests/data/
|
458
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 171 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/tests/data/barchart.py
|
459
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 365 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/tests/data/deprecated-quotes.txt
|
460
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 2492 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/tests/data/filters-test.txt
|
461
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 378 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/tests/data/lang-cs-man-test.txt
|
462
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 2010 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/tests/data/lang-cs-test.txt
|
463
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 383 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/tests/data/lang-de-man-test.txt
|
464
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 2056 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/tests/data/lang-de-test.txt
|
465
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 380 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/tests/data/lang-en-man-test.txt
|
466
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 2168 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/tests/data/lang-en-test.txt
|
467
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 380 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/tests/data/lang-es-man-test.txt
|
468
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 2013 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/tests/data/lang-es-test.txt
|
469
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 380 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/tests/data/lang-fr-man-test.txt
|
470
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 2010 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/tests/data/lang-fr-test.txt
|
471
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 386 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/tests/data/lang-hu-man-test.txt
|
472
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 2010 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/tests/data/lang-hu-test.txt
|
473
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 378 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/tests/data/lang-it-man-test.txt
|
474
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 2010 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/tests/data/lang-it-test.txt
|
475
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 406 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/tests/data/lang-ja-man-test.txt
|
476
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 1891 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/tests/data/lang-ja-test.txt
|
477
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 380 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/tests/data/lang-nl-man-test.txt
|
478
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 1935 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/tests/data/lang-nl-test.txt
|
479
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 384 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/tests/data/lang-pt-BR-man-test.txt
|
480
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 2021 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/tests/data/lang-pt-BR-test.txt
|
481
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 378 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/tests/data/lang-ro-man-test.txt
|
482
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 2010 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/tests/data/lang-ro-test.txt
|
483
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 379 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/tests/data/lang-ru-man-test.txt
|
484
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 2150 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/tests/data/lang-ru-test.txt
|
485
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 381 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/tests/data/lang-sv-man-test.txt
|
486
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 2185 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/tests/data/lang-sv-test.txt
|
487
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 379 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/tests/data/lang-uk-man-test.txt
|
488
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 2129 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/tests/data/lang-uk-test.txt
|
489
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 1784 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/tests/data/oldtables.txt
|
490
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 1432 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/tests/data/open-block-test.txt
|
491
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 114 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/tests/data/rcs-id-marker-test.txt
|
492
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 192 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/tests/data/testcases.conf
|
493
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 17369 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/tests/data/testcases.txt
|
494
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 128 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/tests/data/utf8-bom-test.txt
|
495
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 13360 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/tests/data/utf8-examples.txt
|
496
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 14415 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/tests/testasciidoc.conf
|
497
|
│ │ +-rwxrwxr-x 0 root (0) root (0) 14662 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/tests/testasciidoc.py
|
498
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 438 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/text.conf
|
499
|
│ │ +drwxrwxr-x 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/themes/
|
500
|
│ │ +drwxrwxr-x 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/themes/flask/
|
501
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 11240 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/themes/flask/flask.css
|
502
|
│ │ +drwxrwxr-x 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/themes/volnitsky/
|
503
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 8042 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/themes/volnitsky/volnitsky.css
|
504
|
│ │ +drwxrwxr-x 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/vim/
|
505
|
│ │ +drwxrwxr-x 0 root (0) root (0) 0 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/vim/syntax/
|
506
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 10858 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/vim/syntax/asciidoc.vim
|
507
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 1940 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/xhtml11-quirks.conf
|
508
|
│ │ +-rw-rw-r-- 0 root (0) root (0) 22957 2018-05-26 01:08:44.000000 asciidoc-py-8.6.10/xhtml11.conf
|
509
|
│ │ --- asciidoc-8.6.10/.travis.yml
|
510
|
│ ├── +++ asciidoc-py-8.6.10/.travis.yml
|
511
|
│ │┄ Files 3% similar despite different names
|
512
|
│ │ @@ -1,11 +1,12 @@
|
513
|
│ │ language: python
|
514
|
│ │ python:
|
515
|
│ │ - - 2.6
|
516
|
│ │ - - 2.7
|
517
|
│ │ + - 3.4
|
518
|
│ │ + - 3.5
|
519
|
│ │ + - 3.6
|
520
|
│ │ install:
|
521
|
│ │ # 12.04 LTS ships an outdated texlive https://launchpad.net/bugs/712521
|
522
|
│ │ - sudo add-apt-repository --yes ppa:texlive-backports/ppa
|
523
|
│ │ - sudo apt-get update -yq2
|
524
|
│ │ - sudo apt-get install -yq2 --no-install-recommends dvipng graphviz imagemagick lilypond source-highlight texlive-latex-base
|
525
|
│ │ script:
|
526
|
│ │ - time python tests/testasciidoc.py update
|
527
|
│ │ --- asciidoc-8.6.10/BUGS.txt
|
528
|
│ ├── +++ asciidoc-py-8.6.10/BUGS.txt
|
529
|
│ │┄ Files identical despite different names
|
530
|
│ │ --- asciidoc-8.6.10/CHANGELOG.txt
|
531
|
│ ├── +++ asciidoc-py-8.6.10/CHANGELOG.txt
|
532
|
│ │┄ Files identical despite different names
|
533
|
│ │ --- asciidoc-8.6.10/COPYING
|
534
|
│ ├── +++ asciidoc-py-8.6.10/COPYING
|
535
|
│ │┄ Files identical despite different names
|
536
|
│ │ --- asciidoc-8.6.10/COPYRIGHT
|
537
|
│ ├── +++ asciidoc-py-8.6.10/COPYRIGHT
|
538
|
│ │┄ Files identical despite different names
|
539
|
│ │ --- asciidoc-8.6.10/INSTALL.txt
|
540
|
│ ├── +++ asciidoc-py-8.6.10/INSTALL.txt
|
541
|
│ │┄ Files identical despite different names
|
542
|
│ │ --- asciidoc-8.6.10/MANIFEST
|
543
|
│ ├── +++ asciidoc-py-8.6.10/MANIFEST
|
544
|
│ │┄ Files identical despite different names
|
545
|
│ │ --- asciidoc-8.6.10/Makefile.in
|
546
|
│ ├── +++ asciidoc-py-8.6.10/Makefile.in
|
547
|
│ │┄ Files identical despite different names
|
548
|
│ │ --- asciidoc-8.6.10/README.asciidoc
|
549
|
│ ├── +++ asciidoc-py-8.6.10/README.asciidoc
|
550
|
│ │┄ Files identical despite different names
|
551
|
│ │ --- asciidoc-8.6.10/a2x.py
|
552
|
│ ├── +++ asciidoc-py-8.6.10/a2x.py
|
553
|
│ │┄ Files identical despite different names
|
554
|
│ │ --- asciidoc-8.6.10/asciidoc.conf
|
555
|
│ ├── +++ asciidoc-py-8.6.10/asciidoc.conf
|
556
|
│ │┄ Files identical despite different names
|
557
|
│ │ --- asciidoc-8.6.10/asciidoc.py
|
558
|
│ ├── +++ asciidoc-py-8.6.10/asciidoc.py
|
559
|
│ │┄ Files 2% similar despite different names
|
560
|
│ │ @@ -1,8 +1,8 @@
|
561
|
│ │ -#!/usr/bin/env python2
|
562
|
│ │ +#!/usr/bin/env python3
|
563
|
│ │ """
|
564
|
│ │ asciidoc - converts an AsciiDoc text file to HTML or DocBook
|
565
|
│ │
|
566
|
│ │ Copyright (C) 2002-2010 Stuart Rackham. Free use of this software is granted
|
567
|
│ │ under the terms of the GNU General Public License (GPL).
|
568
|
│ │ """
|
569
|
│ │
|
570
|
│ │ @@ -58,15 +58,15 @@
|
571
|
│ │ dict.clear(self)
|
572
|
│ │ self._keys = []
|
573
|
│ │ def copy(self):
|
574
|
│ │ d = dict.copy(self)
|
575
|
│ │ d._keys = self._keys[:]
|
576
|
│ │ return d
|
577
|
│ │ def items(self):
|
578
|
│ │ - return zip(self._keys, self.values())
|
579
|
│ │ + return list(zip(self._keys, list(self.values())))
|
580
|
│ │ def keys(self):
|
581
|
│ │ return self._keys
|
582
|
│ │ def popitem(self):
|
583
|
│ │ try:
|
584
|
│ │ key = self._keys[-1]
|
585
|
│ │ except IndexError:
|
586
|
│ │ raise KeyError('dictionary is empty')
|
587
|
│ │ @@ -76,39 +76,39 @@
|
588
|
│ │ def setdefault(self, key, failobj = None):
|
589
|
│ │ dict.setdefault(self, key, failobj)
|
590
|
│ │ if key not in self._keys: self._keys.append(key)
|
591
|
│ │ def update(self, d=None, **kwargs):
|
592
|
│ │ if d is None:
|
593
|
│ │ d = kwargs
|
594
|
│ │ dict.update(self, d)
|
595
|
│ │ - for key in d.keys():
|
596
|
│ │ + for key in list(d.keys()):
|
597
|
│ │ if key not in self._keys: self._keys.append(key)
|
598
|
│ │ def values(self):
|
599
|
│ │ - return map(self.get, self._keys)
|
600
|
│ │ + return list(map(self.get, self._keys))
|
601
|
│ │
|
602
|
│ │ class AttrDict(dict):
|
603
|
│ │ """
|
604
|
│ │ Like a dictionary except values can be accessed as attributes i.e. obj.foo
|
605
|
│ │ can be used in addition to obj['foo'].
|
606
|
│ │ If an item is not present None is returned.
|
607
|
│ │ """
|
608
|
│ │ def __getattr__(self, key):
|
609
|
│ │ try: return self[key]
|
610
|
│ │ except KeyError: return None
|
611
|
│ │ def __setattr__(self, key, value):
|
612
|
│ │ self[key] = value
|
613
|
│ │ def __delattr__(self, key):
|
614
|
│ │ try: del self[key]
|
615
|
│ │ - except KeyError, k: raise AttributeError, k
|
616
|
│ │ + except KeyError as k: raise AttributeError(k)
|
617
|
│ │ def __repr__(self):
|
618
|
│ │ return '<AttrDict ' + dict.__repr__(self) + '>'
|
619
|
│ │ def __getstate__(self):
|
620
|
│ │ return dict(self)
|
621
|
│ │ def __setstate__(self,value):
|
622
|
│ │ - for k,v in value.items(): self[k]=v
|
623
|
│ │ + for k,v in list(value.items()): self[k]=v
|
624
|
│ │
|
625
|
│ │ class InsensitiveDict(dict):
|
626
|
│ │ """
|
627
|
│ │ Like a dictionary except key access is case insensitive.
|
628
|
│ │ Keys are stored in lower case.
|
629
|
│ │ """
|
630
|
│ │ def __getitem__(self, key):
|
631
|
│ │ @@ -116,15 +116,15 @@
|
632
|
│ │ def __setitem__(self, key, value):
|
633
|
│ │ dict.__setitem__(self, key.lower(), value)
|
634
|
│ │ def has_key(self, key):
|
635
|
│ │ return dict.has_key(self,key.lower())
|
636
|
│ │ def get(self, key, default=None):
|
637
|
│ │ return dict.get(self, key.lower(), default)
|
638
|
│ │ def update(self, dict):
|
639
|
│ │ - for k,v in dict.items():
|
640
|
│ │ + for k,v in list(dict.items()):
|
641
|
│ │ self[k] = v
|
642
|
│ │ def setdefault(self, key, default = None):
|
643
|
│ │ return dict.setdefault(self, key.lower(), default)
|
644
|
│ │
|
645
|
│ │
|
646
|
│ │ class Trace(object):
|
647
|
│ │ """
|
648
|
│ │ @@ -173,15 +173,15 @@
|
649
|
│ │ # Set to True or False to globally override line numbers method
|
650
|
│ │ # argument. Has no effect when set to None.
|
651
|
│ │ self.linenos = None
|
652
|
│ │ self.messages = []
|
653
|
│ │ self.prev_msg = ''
|
654
|
│ │
|
655
|
│ │ def stdout(self,msg):
|
656
|
│ │ - print msg
|
657
|
│ │ + print(msg)
|
658
|
│ │
|
659
|
│ │ def stderr(self,msg=''):
|
660
|
│ │ if msg == self.prev_msg: # Suppress repeated messages.
|
661
|
│ │ return
|
662
|
│ │ self.messages.append(msg)
|
663
|
│ │ if __name__ == '__main__':
|
664
|
│ │ sys.stderr.write('%s: %s%s' % (self.PROG, msg, os.linesep))
|
665
|
│ │ @@ -213,15 +213,15 @@
|
666
|
│ │ """
|
667
|
│ │ Report fatal error.
|
668
|
│ │ If halt=True raise EAsciiDoc exception.
|
669
|
│ │ If halt=False don't exit application, continue in the hope of reporting
|
670
|
│ │ all fatal errors finishing with a non-zero exit code.
|
671
|
│ │ """
|
672
|
│ │ if halt:
|
673
|
│ │ - raise EAsciiDoc, self.format(msg,linenos=False,cursor=cursor)
|
674
|
│ │ + raise EAsciiDoc(self.format(msg,linenos=False,cursor=cursor))
|
675
|
│ │ else:
|
676
|
│ │ msg = self.format(msg,'ERROR: ',cursor=cursor)
|
677
|
│ │ self.stderr(msg)
|
678
|
│ │ document.has_errors = True
|
679
|
│ │
|
680
|
│ │ def unsafe(self, msg):
|
681
|
│ │ self.error('unsafe: '+msg)
|
682
|
│ │ @@ -286,15 +286,15 @@
|
683
|
│ │ if not is_safe_file(fname, parentdir):
|
684
|
│ │ message.unsafe('include file: %s' % fname)
|
685
|
│ │ return None
|
686
|
│ │ return fname
|
687
|
│ │
|
688
|
│ │ def assign(dst,src):
|
689
|
│ │ """Assign all attributes from 'src' object to 'dst' object."""
|
690
|
│ │ - for a,v in src.__dict__.items():
|
691
|
│ │ + for a,v in list(src.__dict__.items()):
|
692
|
│ │ setattr(dst,a,v)
|
693
|
│ │
|
694
|
│ │ def strip_quotes(s):
|
695
|
│ │ """Trim white space and, if necessary, quote characters from s."""
|
696
|
│ │ s = s.strip()
|
697
|
│ │ # Strip quotation mark characters from quoted strings.
|
698
|
│ │ if len(s) >= 3 and s[0] == '"' and s[-1] == '"':
|
699
|
│ │ @@ -418,21 +418,21 @@
|
700
|
│ │ """
|
701
|
│ │ Safely evaluate an expression node or a string containing a Python
|
702
|
│ │ expression. The string or node provided may only consist of the
|
703
|
│ │ following Python literal structures: strings, numbers, tuples,
|
704
|
│ │ lists, dicts, booleans, and None.
|
705
|
│ │ """
|
706
|
│ │ _safe_names = {'None': None, 'True': True, 'False': False}
|
707
|
│ │ - if isinstance(node_or_string, basestring):
|
708
|
│ │ + if isinstance(node_or_string, str):
|
709
|
│ │ node_or_string = compiler.parse(node_or_string, mode='eval')
|
710
|
│ │ if isinstance(node_or_string, Expression):
|
711
|
│ │ node_or_string = node_or_string.node
|
712
|
│ │ def _convert(node):
|
713
|
│ │ if isinstance(node, Const) and isinstance(node.value,
|
714
|
│ │ - (basestring, int, float, long, complex)):
|
715
|
│ │ + (str, int, float, complex)):
|
716
|
│ │ return node.value
|
717
|
│ │ elif isinstance(node, Tuple):
|
718
|
│ │ return tuple(map(_convert, node.nodes))
|
719
|
│ │ elif isinstance(node, compiler.ast.List):
|
720
|
│ │ return list(map(_convert, node.nodes))
|
721
|
│ │ elif isinstance(node, Dict):
|
722
|
│ │ return dict((_convert(k), _convert(v)) for k, v
|
723
|
│ │ @@ -501,29 +501,29 @@
|
724
|
│ │ dict['0'] = attrs
|
725
|
│ │ # Replace line separators with spaces so line spanning works.
|
726
|
│ │ s = re.sub(r'\s', ' ', attrs)
|
727
|
│ │ d = {}
|
728
|
│ │ try:
|
729
|
│ │ d.update(get_args(s))
|
730
|
│ │ d.update(get_kwargs(s))
|
731
|
│ │ - for v in d.values():
|
732
|
│ │ + for v in list(d.values()):
|
733
|
│ │ if not (isinstance(v,str) or isinstance(v,int) or isinstance(v,float) or v is None):
|
734
|
│ │ raise Exception
|
735
|
│ │ except Exception:
|
736
|
│ │ s = s.replace('"','\\"')
|
737
|
│ │ s = s.split(',')
|
738
|
│ │ - s = map(lambda x: '"' + x.strip() + '"', s)
|
739
|
│ │ + s = ['"' + x.strip() + '"' for x in s]
|
740
|
│ │ s = ','.join(s)
|
741
|
│ │ try:
|
742
|
│ │ d = {}
|
743
|
│ │ d.update(get_args(s))
|
744
|
│ │ d.update(get_kwargs(s))
|
745
|
│ │ except Exception:
|
746
|
│ │ return # If there's a syntax error leave with {0}=attrs.
|
747
|
│ │ - for k in d.keys(): # Drop any empty positional arguments.
|
748
|
│ │ + for k in list(d.keys()): # Drop any empty positional arguments.
|
749
|
│ │ if d[k] == '': del d[k]
|
750
|
│ │ dict.update(d)
|
751
|
│ │ assert len(d) > 0
|
752
|
│ │
|
753
|
│ │ def parse_named_attributes(s,attrs):
|
754
|
│ │ """Update a attrs dictionary with name="value" attributes from the s string.
|
755
|
│ │ Returns False if invalid syntax.
|
756
|
│ │ @@ -543,27 +543,27 @@
|
757
|
│ │
|
758
|
│ │ def parse_list(s):
|
759
|
│ │ """Parse comma separated string of Python literals. Return a tuple of of
|
760
|
│ │ parsed values."""
|
761
|
│ │ try:
|
762
|
│ │ result = tuple(parse_to_list(s))
|
763
|
│ │ except Exception:
|
764
|
│ │ - raise EAsciiDoc,'malformed list: '+s
|
765
|
│ │ + raise EAsciiDoc('malformed list: '+s)
|
766
|
│ │ return result
|
767
|
│ │
|
768
|
│ │ def parse_options(options,allowed,errmsg):
|
769
|
│ │ """Parse comma separated string of unquoted option names and return as a
|
770
|
│ │ tuple of valid options. 'allowed' is a list of allowed option values.
|
771
|
│ │ If allowed=() then all legitimate names are allowed.
|
772
|
│ │ 'errmsg' is an error message prefix if an illegal option error is thrown."""
|
773
|
│ │ result = []
|
774
|
│ │ if options:
|
775
|
│ │ for s in re.split(r'\s*,\s*',options):
|
776
|
│ │ if (allowed and s not in allowed) or not is_name(s):
|
777
|
│ │ - raise EAsciiDoc,'%s: %s' % (errmsg,s)
|
778
|
│ │ + raise EAsciiDoc('%s: %s' % (errmsg,s))
|
779
|
│ │ result.append(s)
|
780
|
│ │ return tuple(result)
|
781
|
│ │
|
782
|
│ │ def symbolize(s):
|
783
|
│ │ """Drop non-symbol characters and convert to lowercase."""
|
784
|
│ │ return re.sub(r'(?u)[^\w\-_]', '', s).lower()
|
785
|
│ │
|
786
|
│ │ @@ -571,15 +571,15 @@
|
787
|
│ │ """Return True if s is valid attribute, macro or tag name
|
788
|
│ │ (starts with alpha containing alphanumeric and dashes only)."""
|
789
|
│ │ return re.match(r'^'+NAME_RE+r'$',s) is not None
|
790
|
│ │
|
791
|
│ │ def subs_quotes(text):
|
792
|
│ │ """Quoted text is marked up and the resulting text is
|
793
|
│ │ returned."""
|
794
|
│ │ - keys = config.quotes.keys()
|
795
|
│ │ + keys = list(config.quotes.keys())
|
796
|
│ │ for q in keys:
|
797
|
│ │ i = q.find('|')
|
798
|
│ │ if i != -1 and q != '|' and q != '||':
|
799
|
│ │ lq = q[:i] # Left quote.
|
800
|
│ │ rq = q[i+1:] # Right quote.
|
801
|
│ │ else:
|
802
|
│ │ lq = rq = q
|
803
|
│ │ @@ -628,15 +628,15 @@
|
804
|
│ │ return [None,None]
|
805
|
│ │ result = s.split('|')
|
806
|
│ │ if len(result) == 1:
|
807
|
│ │ return result+[None]
|
808
|
│ │ elif len(result) == 2:
|
809
|
│ │ return result
|
810
|
│ │ else:
|
811
|
│ │ - raise EAsciiDoc,'malformed tag: %s' % tag
|
812
|
│ │ + raise EAsciiDoc('malformed tag: %s' % tag)
|
813
|
│ │
|
814
|
│ │ def parse_entry(entry, dict=None, unquote=False, unique_values=False,
|
815
|
│ │ allow_name_only=False, escape_delimiter=True):
|
816
|
│ │ """Parse name=value entry to dictionary 'dict'. Return tuple (name,value)
|
817
|
│ │ or None if illegal entry.
|
818
|
│ │ If name= then value is set to ''.
|
819
|
│ │ If name and allow_name_only=True then value is set to ''.
|
820
|
│ │ @@ -676,34 +676,34 @@
|
821
|
│ │ name = name.strip()
|
822
|
│ │ if value is not None:
|
823
|
│ │ value = value.strip()
|
824
|
│ │ if not name:
|
825
|
│ │ return None
|
826
|
│ │ if dict is not None:
|
827
|
│ │ if unique_values:
|
828
|
│ │ - for k,v in dict.items():
|
829
|
│ │ + for k,v in list(dict.items()):
|
830
|
│ │ if v == value: del dict[k]
|
831
|
│ │ dict[name] = value
|
832
|
│ │ return name,value
|
833
|
│ │
|
834
|
│ │ def parse_entries(entries, dict, unquote=False, unique_values=False,
|
835
|
│ │ allow_name_only=False,escape_delimiter=True):
|
836
|
│ │ """Parse name=value entries from from lines of text in 'entries' into
|
837
|
│ │ dictionary 'dict'. Blank lines are skipped."""
|
838
|
│ │ entries = config.expand_templates(entries)
|
839
|
│ │ for entry in entries:
|
840
|
│ │ if entry and not parse_entry(entry, dict, unquote, unique_values,
|
841
|
│ │ allow_name_only, escape_delimiter):
|
842
|
│ │ - raise EAsciiDoc,'malformed section entry: %s' % entry
|
843
|
│ │ + raise EAsciiDoc('malformed section entry: %s' % entry)
|
844
|
│ │
|
845
|
│ │ def dump_section(name,dict,f=sys.stdout):
|
846
|
│ │ """Write parameters in 'dict' as in configuration file section format with
|
847
|
│ │ section 'name'."""
|
848
|
│ │ f.write('[%s]%s' % (name,writer.newline))
|
849
|
│ │ - for k,v in dict.items():
|
850
|
│ │ + for k,v in list(dict.items()):
|
851
|
│ │ k = str(k)
|
852
|
│ │ k = k.replace('=',r'\=') # Escape = in name.
|
853
|
│ │ # Quote if necessary.
|
854
|
│ │ if len(k) != len(k.strip()):
|
855
|
│ │ k = '"'+k+'"'
|
856
|
│ │ if v and len(v) != len(v.strip()):
|
857
|
│ │ v = '"'+v+'"'
|
858
|
│ │ @@ -715,17 +715,17 @@
|
859
|
│ │ if s[0] == '#':
|
860
|
│ │ s = '\\' + s # Escape so not treated as comment lines.
|
861
|
│ │ f.write('%s%s' % (s,writer.newline))
|
862
|
│ │ f.write(writer.newline)
|
863
|
│ │
|
864
|
│ │ def update_attrs(attrs,dict):
|
865
|
│ │ """Update 'attrs' dictionary with parsed attributes in dictionary 'dict'."""
|
866
|
│ │ - for k,v in dict.items():
|
867
|
│ │ + for k,v in list(dict.items()):
|
868
|
│ │ if not is_name(k):
|
869
|
│ │ - raise EAsciiDoc,'illegal attribute name: %s' % k
|
870
|
│ │ + raise EAsciiDoc('illegal attribute name: %s' % k)
|
871
|
│ │ attrs[k] = v
|
872
|
│ │
|
873
|
│ │ def is_attr_defined(attrs,dic):
|
874
|
│ │ """
|
875
|
│ │ Check if the sequence of attributes is defined in dictionary 'dic'.
|
876
|
│ │ Valid 'attrs' sequence syntax:
|
877
|
│ │ <attr> Return True if single attrbiute is defined.
|
878
|
│ │ @@ -815,17 +815,17 @@
|
879
|
│ │ # Remove redundant quoting -- this is not just
|
880
|
│ │ # cosmetic, unnecessary quoting appears to cause
|
881
|
│ │ # command line truncation.
|
882
|
│ │ filter_cmd = re.sub(r'"([^ ]+?)"', r'\1', filter_cmd)
|
883
|
│ │ try:
|
884
|
│ │ p = subprocess.Popen(filter_cmd, shell=True,
|
885
|
│ │ stdin=subprocess.PIPE, stdout=subprocess.PIPE)
|
886
|
│ │ - output = p.communicate(os.linesep.join(lines))[0]
|
887
|
│ │ + output = str(p.communicate(os.linesep.join(lines).encode("utf-8"))[0])
|
888
|
│ │ except Exception:
|
889
|
│ │ - raise EAsciiDoc,'filter error: %s: %s' % (filter_cmd, sys.exc_info()[1])
|
890
|
│ │ + raise EAsciiDoc('filter error: %s: %s' % (filter_cmd, sys.exc_info()[1]))
|
891
|
│ │ if output:
|
892
|
│ │ result = [s.rstrip() for s in output.split(os.linesep)]
|
893
|
│ │ else:
|
894
|
│ │ result = []
|
895
|
│ │ filter_status = p.wait()
|
896
|
│ │ if filter_status:
|
897
|
│ │ message.warning('filter non-zero exit code: %s: returned %d' %
|
898
|
│ │ @@ -903,15 +903,15 @@
|
899
|
│ │ try:
|
900
|
│ │ lines = [s.rstrip() for s in f]
|
901
|
│ │ finally:
|
902
|
│ │ f.close()
|
903
|
│ │ else:
|
904
|
│ │ lines = []
|
905
|
│ │ except Exception:
|
906
|
│ │ - raise EAsciiDoc,'%s: temp file read error' % syntax
|
907
|
│ │ + raise EAsciiDoc('%s: temp file read error' % syntax)
|
908
|
│ │ result = separator.join(lines)
|
909
|
│ │ finally:
|
910
|
│ │ if os.path.isfile(tmp):
|
911
|
│ │ os.remove(tmp)
|
912
|
│ │ elif name in ('counter','counter2'):
|
913
|
│ │ mo = re.match(r'^(?P<attr>[^:]*?)(:(?P<seed>.*))?$', args)
|
914
|
│ │ attr = mo.group('attr')
|
915
|
│ │ @@ -1036,19 +1036,19 @@
|
916
|
│ │ string_result = False
|
917
|
│ │ if dictionary is None:
|
918
|
│ │ attrs = document.attributes
|
919
|
│ │ else:
|
920
|
│ │ # Remove numbered document attributes so they don't clash with
|
921
|
│ │ # attribute list positional attributes.
|
922
|
│ │ attrs = {}
|
923
|
│ │ - for k,v in document.attributes.items():
|
924
|
│ │ + for k,v in list(document.attributes.items()):
|
925
|
│ │ if not re.match(r'^\d+$', k):
|
926
|
│ │ attrs[k] = v
|
927
|
│ │ # Substitute attribute references inside dictionary values.
|
928
|
│ │ - for k,v in dictionary.items():
|
929
|
│ │ + for k,v in list(dictionary.items()):
|
930
|
│ │ if v is None:
|
931
|
│ │ del dictionary[k]
|
932
|
│ │ else:
|
933
|
│ │ v = subs_attrs(str(v))
|
934
|
│ │ if v is None:
|
935
|
│ │ del dictionary[k]
|
936
|
│ │ else:
|
937
|
│ │ @@ -1216,61 +1216,29 @@
|
938
|
│ │ if result:
|
939
|
│ │ return '\n'.join(result)
|
940
|
│ │ else:
|
941
|
│ │ return None
|
942
|
│ │ else:
|
943
|
│ │ return tuple(result)
|
944
|
│ │
|
945
|
│ │ -def char_encoding():
|
946
|
│ │ - encoding = document.attributes.get('encoding')
|
947
|
│ │ - if encoding:
|
948
|
│ │ - try:
|
949
|
│ │ - codecs.lookup(encoding)
|
950
|
│ │ - except LookupError,e:
|
951
|
│ │ - raise EAsciiDoc,str(e)
|
952
|
│ │ - return encoding
|
953
|
│ │ -
|
954
|
│ │ -def char_len(s):
|
955
|
│ │ - return len(char_decode(s))
|
956
|
│ │ -
|
957
|
│ │ east_asian_widths = {'W': 2, # Wide
|
958
|
│ │ 'F': 2, # Full-width (wide)
|
959
|
│ │ 'Na': 1, # Narrow
|
960
|
│ │ 'H': 1, # Half-width (narrow)
|
961
|
│ │ 'N': 1, # Neutral (not East Asian, treated as narrow)
|
962
|
│ │ 'A': 1} # Ambiguous (s/b wide in East Asian context,
|
963
|
│ │ # narrow otherwise, but that doesn't work)
|
964
|
│ │ """Mapping of result codes from `unicodedata.east_asian_width()` to character
|
965
|
│ │ column widths."""
|
966
|
│ │
|
967
|
│ │ def column_width(s):
|
968
|
│ │ - text = char_decode(s)
|
969
|
│ │ - if isinstance(text, unicode):
|
970
|
│ │ - width = 0
|
971
|
│ │ - for c in text:
|
972
|
│ │ - width += east_asian_widths[unicodedata.east_asian_width(c)]
|
973
|
│ │ - return width
|
974
|
│ │ - else:
|
975
|
│ │ - return len(text)
|
976
|
│ │ -
|
977
|
│ │ -def char_decode(s):
|
978
|
│ │ - if char_encoding():
|
979
|
│ │ - try:
|
980
|
│ │ - return s.decode(char_encoding())
|
981
|
│ │ - except Exception:
|
982
|
│ │ - raise EAsciiDoc, \
|
983
|
│ │ - "'%s' codec can't decode \"%s\"" % (char_encoding(), s)
|
984
|
│ │ - else:
|
985
|
│ │ - return s
|
986
|
│ │ -
|
987
|
│ │ -def char_encode(s):
|
988
|
│ │ - if char_encoding():
|
989
|
│ │ - return s.encode(char_encoding())
|
990
|
│ │ - else:
|
991
|
│ │ - return s
|
992
|
│ │ + width = 0
|
993
|
│ │ + for c in s:
|
994
|
│ │ + width += east_asian_widths[unicodedata.east_asian_width(c)]
|
995
|
│ │ + return width
|
996
|
│ │
|
997
|
│ │ def date_time_str(t):
|
998
|
│ │ """Convert seconds since the Epoch to formatted local date and time strings."""
|
999
|
│ │ source_date_epoch = os.environ.get('SOURCE_DATE_EPOCH')
|
1000
|
│ │ if source_date_epoch is not None:
|
1001
|
│ │ t = time.gmtime(min(t, int(source_date_epoch)))
|
1002
|
│ │ else:
|
1003
|
│ │ @@ -1281,28 +1249,32 @@
|
1004
|
│ │ time_str += ' UTC'
|
1005
|
│ │ elif time.daylight and t.tm_isdst == 1:
|
1006
|
│ │ time_str += ' ' + time.tzname[1]
|
1007
|
│ │ else:
|
1008
|
│ │ time_str += ' ' + time.tzname[0]
|
1009
|
│ │ # Attempt to convert the localtime to the output encoding.
|
1010
|
│ │ try:
|
1011
|
│ │ - time_str = char_encode(time_str.decode(locale.getdefaultlocale()[1]))
|
1012
|
│ │ + time_str = time_str.decode(locale.getdefaultlocale()[1])
|
1013
|
│ │ except Exception:
|
1014
|
│ │ pass
|
1015
|
│ │ return date_str, time_str
|
1016
|
│ │
|
1017
|
│ │
|
1018
|
│ │ class Lex:
|
1019
|
│ │ """Lexical analysis routines. Static methods and attributes only."""
|
1020
|
│ │ prev_element = None
|
1021
|
│ │ prev_cursor = None
|
1022
|
│ │ def __init__(self):
|
1023
|
│ │ - raise AssertionError,'no class instances allowed'
|
1024
|
│ │ + raise AssertionError('no class instances allowed')
|
1025
|
│ │ +
|
1026
|
│ │ + def __iter__(self):
|
1027
|
│ │ + return self
|
1028
|
│ │ +
|
1029
|
│ │ @staticmethod
|
1030
|
│ │ - def next():
|
1031
|
│ │ + def next_element():
|
1032
|
│ │ """Returns class of next element on the input (None if EOF). The
|
1033
|
│ │ reader is assumed to be at the first line following a previous element,
|
1034
|
│ │ end of file or line one. Exits with the reader pointing to the first
|
1035
|
│ │ line of the next element or EOF (leading blank lines are skipped)."""
|
1036
|
│ │ reader.skip_blank_lines()
|
1037
|
│ │ if reader.eof(): return None
|
1038
|
│ │ # Optimization: If we've already checked for an element at this
|
1039
|
│ │ @@ -1328,15 +1300,15 @@
|
1040
|
│ │ result = blocks.current
|
1041
|
│ │ elif tables_OLD.isnext():
|
1042
|
│ │ result = tables_OLD.current
|
1043
|
│ │ elif tables.isnext():
|
1044
|
│ │ result = tables.current
|
1045
|
│ │ else:
|
1046
|
│ │ if not paragraphs.isnext():
|
1047
|
│ │ - raise EAsciiDoc,'paragraph expected'
|
1048
|
│ │ + raise EAsciiDoc('paragraph expected')
|
1049
|
│ │ result = paragraphs.current
|
1050
|
│ │ # Optimization: Cache answer.
|
1051
|
│ │ Lex.prev_cursor = reader.cursor
|
1052
|
│ │ Lex.prev_element = result
|
1053
|
│ │ return result
|
1054
|
│ │
|
1055
|
│ │ @staticmethod
|
1056
|
│ │ @@ -1372,15 +1344,15 @@
|
1057
|
│ │ elif o in ('replacements','replacements2','replacements3'):
|
1058
|
│ │ result = config.subs_replacements(result,o)
|
1059
|
│ │ elif o == 'macros':
|
1060
|
│ │ result = macros.subs(result)
|
1061
|
│ │ elif o == 'callouts':
|
1062
|
│ │ result = macros.subs(result,callouts=True)
|
1063
|
│ │ else:
|
1064
|
│ │ - raise EAsciiDoc,'illegal substitution option: %s' % o
|
1065
|
│ │ + raise EAsciiDoc('illegal substitution option: %s' % o)
|
1066
|
│ │ trace(o, s, result)
|
1067
|
│ │ if not result:
|
1068
|
│ │ break
|
1069
|
│ │ return result
|
1070
|
│ │
|
1071
|
│ │ @staticmethod
|
1072
|
│ │ def subs(lines,options):
|
1073
|
│ │ @@ -1609,21 +1581,21 @@
|
1074
|
│ │ # Has been set in document header.
|
1075
|
│ │ self.backend = self.backend # Translate alias in header.
|
1076
|
│ │ assert self.doctype in ('article','manpage','book'), 'illegal document type'
|
1077
|
│ │ return has_header
|
1078
|
│ │ def translate(self,has_header):
|
1079
|
│ │ if self.doctype == 'manpage':
|
1080
|
│ │ # Translate mandatory NAME section.
|
1081
|
│ │ - if Lex.next() is not Title:
|
1082
|
│ │ + if Lex.next_element() is not Title:
|
1083
|
│ │ message.error('name section expected')
|
1084
|
│ │ else:
|
1085
|
│ │ Title.translate()
|
1086
|
│ │ if Title.level != 1:
|
1087
|
│ │ message.error('name section title must be at level 1')
|
1088
|
│ │ - if not isinstance(Lex.next(),Paragraph):
|
1089
|
│ │ + if not isinstance(Lex.next_element(),Paragraph):
|
1090
|
│ │ message.error('malformed name section body')
|
1091
|
│ │ lines = reader.read_until(r'^$')
|
1092
|
│ │ s = ' '.join(lines)
|
1093
|
│ │ mo = re.match(r'^(?P<manname>.*?)\s+-\s+(?P<manpurpose>.*)$',s)
|
1094
|
│ │ if not mo:
|
1095
|
│ │ message.error('malformed name section body')
|
1096
|
│ │ self.attributes['manname'] = mo.group('manname').strip()
|
1097
|
│ │ @@ -1641,32 +1613,32 @@
|
1098
|
│ │ writer.write(hdr,trace='header')
|
1099
|
│ │ if 'title' in self.attributes:
|
1100
|
│ │ del self.attributes['title']
|
1101
|
│ │ self.consume_attributes_and_comments()
|
1102
|
│ │ if self.doctype in ('article','book'):
|
1103
|
│ │ # Translate 'preamble' (untitled elements between header
|
1104
|
│ │ # and first section title).
|
1105
|
│ │ - if Lex.next() is not Title:
|
1106
|
│ │ + if Lex.next_element() is not Title:
|
1107
|
│ │ stag,etag = config.section2tags('preamble')
|
1108
|
│ │ writer.write(stag,trace='preamble open')
|
1109
|
│ │ Section.translate_body()
|
1110
|
│ │ writer.write(etag,trace='preamble close')
|
1111
|
│ │ elif self.doctype == 'manpage' and 'name' in config.sections:
|
1112
|
│ │ writer.write(config.subs_section('name',{}), trace='name')
|
1113
|
│ │ else:
|
1114
|
│ │ self.process_author_names()
|
1115
|
│ │ if config.header_footer:
|
1116
|
│ │ hdr = config.subs_section('header',{})
|
1117
|
│ │ writer.write(hdr,trace='header')
|
1118
|
│ │ - if Lex.next() is not Title:
|
1119
|
│ │ + if Lex.next_element() is not Title:
|
1120
|
│ │ Section.translate_body()
|
1121
|
│ │ # Process remaining sections.
|
1122
|
│ │ while not reader.eof():
|
1123
|
│ │ - if Lex.next() is not Title:
|
1124
|
│ │ - raise EAsciiDoc,'section title expected'
|
1125
|
│ │ + if Lex.next_element() is not Title:
|
1126
|
│ │ + raise EAsciiDoc('section title expected')
|
1127
|
│ │ Section.translate()
|
1128
|
│ │ Section.setlevel(0) # Write remaining unwritten section close tags.
|
1129
|
│ │ # Substitute document parameters and write document footer.
|
1130
|
│ │ if config.header_footer:
|
1131
|
│ │ ftr = config.subs_section('footer',{})
|
1132
|
│ │ writer.write(ftr,trace='footer')
|
1133
|
│ │ def parse_author(self,s):
|
1134
|
│ │ @@ -1718,17 +1690,16 @@
|
1135
|
│ │ self.process_author_names()
|
1136
|
│ │ return
|
1137
|
│ │ if not author:
|
1138
|
│ │ author = '%s %s %s' % (firstname, middlename, lastname)
|
1139
|
│ │ author = author.strip()
|
1140
|
│ │ author = re.sub(r'\s+',' ', author)
|
1141
|
│ │ if not initials:
|
1142
|
│ │ - initials = (char_decode(firstname)[:1] +
|
1143
|
│ │ - char_decode(middlename)[:1] + char_decode(lastname)[:1])
|
1144
|
│ │ - initials = char_encode(initials).upper()
|
1145
|
│ │ + initials = (firstname[:1] + middlename[:1] + lastname[:1])
|
1146
|
│ │ + initials = initials.upper()
|
1147
|
│ │ names = [firstname,middlename,lastname,author,initials]
|
1148
|
│ │ for i,v in enumerate(names):
|
1149
|
│ │ v = config.subs_specialchars(v)
|
1150
|
│ │ v = subs_attrs(v)
|
1151
|
│ │ names[i] = v
|
1152
|
│ │ firstname,middlename,lastname,author,initials = names
|
1153
|
│ │ if firstname:
|
1154
|
│ │ @@ -1746,18 +1717,18 @@
|
1155
|
│ │
|
1156
|
│ │
|
1157
|
│ │ class Header:
|
1158
|
│ │ """Static methods and attributes only."""
|
1159
|
│ │ REV_LINE_RE = r'^(\D*(?P<revnumber>.*?),)?(?P<revdate>.*?)(:\s*(?P<revremark>.*))?$'
|
1160
|
│ │ RCS_ID_RE = r'^\$Id: \S+ (?P<revnumber>\S+) (?P<revdate>\S+) \S+ (?P<author>\S+) (\S+ )?\$$'
|
1161
|
│ │ def __init__(self):
|
1162
|
│ │ - raise AssertionError,'no class instances allowed'
|
1163
|
│ │ + raise AssertionError('no class instances allowed')
|
1164
|
│ │ @staticmethod
|
1165
|
│ │ def parse():
|
1166
|
│ │ - assert Lex.next() is Title and Title.level == 0
|
1167
|
│ │ + assert Lex.next_element() is Title and Title.level == 0
|
1168
|
│ │ attrs = document.attributes # Alias for readability.
|
1169
|
│ │ # Postpone title subs until backend conf files have been loaded.
|
1170
|
│ │ Title.translate(skipsubs=True)
|
1171
|
│ │ attrs['doctitle'] = Title.attributes['title']
|
1172
|
│ │ document.consume_attributes_and_comments(noblanks=True)
|
1173
|
│ │ s = reader.read_next()
|
1174
|
│ │ mo = None
|
1175
|
│ │ @@ -1829,15 +1800,15 @@
|
1176
|
│ │ pattern = None
|
1177
|
│ │ subs = None
|
1178
|
│ │ name = None
|
1179
|
│ │ name2 = None
|
1180
|
│ │ value = None
|
1181
|
│ │ attributes = {} # Accumulates all the parsed attribute entries.
|
1182
|
│ │ def __init__(self):
|
1183
|
│ │ - raise AssertionError,'no class instances allowed'
|
1184
|
│ │ + raise AssertionError('no class instances allowed')
|
1185
|
│ │ @staticmethod
|
1186
|
│ │ def isnext():
|
1187
|
│ │ result = False # Assume not next.
|
1188
|
│ │ if not AttributeEntry.pattern:
|
1189
|
│ │ pat = document.attributes.get('attributeentry-pattern')
|
1190
|
│ │ if not pat:
|
1191
|
│ │ message.error("[attributes] missing 'attributeentry-pattern' entry")
|
1192
|
│ │ @@ -1851,15 +1822,15 @@
|
1193
|
│ │ AttributeEntry.name2 = mo.group('attrname2')
|
1194
|
│ │ AttributeEntry.value = mo.group('attrvalue') or ''
|
1195
|
│ │ AttributeEntry.value = AttributeEntry.value.strip()
|
1196
|
│ │ result = True
|
1197
|
│ │ return result
|
1198
|
│ │ @staticmethod
|
1199
|
│ │ def translate():
|
1200
|
│ │ - assert Lex.next() is AttributeEntry
|
1201
|
│ │ + assert Lex.next_element() is AttributeEntry
|
1202
|
│ │ attr = AttributeEntry # Alias for brevity.
|
1203
|
│ │ reader.read() # Discard attribute entry from reader.
|
1204
|
│ │ while attr.value.endswith(' +'):
|
1205
|
│ │ if not reader.read_next(): break
|
1206
|
│ │ attr.value = attr.value[:-1] + reader.read().strip()
|
1207
|
│ │ if attr.name2 is not None:
|
1208
|
│ │ # Configuration file attribute.
|
1209
|
│ │ @@ -1911,15 +1882,15 @@
|
1210
|
│ │
|
1211
|
│ │ class AttributeList:
|
1212
|
│ │ """Static methods and attributes only."""
|
1213
|
│ │ pattern = None
|
1214
|
│ │ match = None
|
1215
|
│ │ attrs = {}
|
1216
|
│ │ def __init__(self):
|
1217
|
│ │ - raise AssertionError,'no class instances allowed'
|
1218
|
│ │ + raise AssertionError('no class instances allowed')
|
1219
|
│ │ @staticmethod
|
1220
|
│ │ def initialize():
|
1221
|
│ │ if not 'attributelist-pattern' in document.attributes:
|
1222
|
│ │ message.error("[attributes] missing 'attributelist-pattern' entry")
|
1223
|
│ │ AttributeList.pattern = document.attributes['attributelist-pattern']
|
1224
|
│ │ @staticmethod
|
1225
|
│ │ def isnext():
|
1226
|
│ │ @@ -1929,33 +1900,33 @@
|
1227
|
│ │ mo = re.match(AttributeList.pattern, line)
|
1228
|
│ │ if mo:
|
1229
|
│ │ AttributeList.match = mo
|
1230
|
│ │ result = True
|
1231
|
│ │ return result
|
1232
|
│ │ @staticmethod
|
1233
|
│ │ def translate():
|
1234
|
│ │ - assert Lex.next() is AttributeList
|
1235
|
│ │ + assert Lex.next_element() is AttributeList
|
1236
|
│ │ reader.read() # Discard attribute list from reader.
|
1237
|
│ │ attrs = {}
|
1238
|
│ │ d = AttributeList.match.groupdict()
|
1239
|
│ │ - for k,v in d.items():
|
1240
|
│ │ + for k,v in list(d.items()):
|
1241
|
│ │ if v is not None:
|
1242
|
│ │ if k == 'attrlist':
|
1243
|
│ │ v = subs_attrs(v)
|
1244
|
│ │ if v:
|
1245
|
│ │ parse_attributes(v, attrs)
|
1246
|
│ │ else:
|
1247
|
│ │ AttributeList.attrs[k] = v
|
1248
|
│ │ AttributeList.subs(attrs)
|
1249
|
│ │ AttributeList.attrs.update(attrs)
|
1250
|
│ │ @staticmethod
|
1251
|
│ │ def subs(attrs):
|
1252
|
│ │ '''Substitute single quoted attribute values normally.'''
|
1253
|
│ │ reo = re.compile(r"^'.*'$")
|
1254
|
│ │ - for k,v in attrs.items():
|
1255
|
│ │ + for k,v in list(attrs.items()):
|
1256
|
│ │ if reo.match(str(v)):
|
1257
|
│ │ attrs[k] = Lex.subs_1(v[1:-1], config.subsnormal)
|
1258
|
│ │ @staticmethod
|
1259
|
│ │ def style():
|
1260
|
│ │ return AttributeList.attrs.get('style') or AttributeList.attrs.get('1')
|
1261
|
│ │ @staticmethod
|
1262
|
│ │ def consume(d={}):
|
1263
|
│ │ @@ -1970,28 +1941,28 @@
|
1264
|
│ │ d[option+'-option'] = ''
|
1265
|
│ │
|
1266
|
│ │ class BlockTitle:
|
1267
|
│ │ """Static methods and attributes only."""
|
1268
|
│ │ title = None
|
1269
|
│ │ pattern = None
|
1270
|
│ │ def __init__(self):
|
1271
|
│ │ - raise AssertionError,'no class instances allowed'
|
1272
|
│ │ + raise AssertionError('no class instances allowed')
|
1273
|
│ │ @staticmethod
|
1274
|
│ │ def isnext():
|
1275
|
│ │ result = False # Assume not next.
|
1276
|
│ │ line = reader.read_next()
|
1277
|
│ │ if line:
|
1278
|
│ │ mo = re.match(BlockTitle.pattern,line)
|
1279
|
│ │ if mo:
|
1280
|
│ │ BlockTitle.title = mo.group('title')
|
1281
|
│ │ result = True
|
1282
|
│ │ return result
|
1283
|
│ │ @staticmethod
|
1284
|
│ │ def translate():
|
1285
|
│ │ - assert Lex.next() is BlockTitle
|
1286
|
│ │ + assert Lex.next_element() is BlockTitle
|
1287
|
│ │ reader.read() # Discard title from reader.
|
1288
|
│ │ # Perform title substitutions.
|
1289
|
│ │ if not Title.subs:
|
1290
|
│ │ Title.subs = config.subsnormal
|
1291
|
│ │ s = Lex.subs((BlockTitle.title,), Title.subs)
|
1292
|
│ │ s = writer.newline.join(s)
|
1293
|
│ │ if not s:
|
1294
|
│ │ @@ -2014,20 +1985,20 @@
|
1295
|
│ │ level = 0
|
1296
|
│ │ attributes = {}
|
1297
|
│ │ sectname = None
|
1298
|
│ │ section_numbers = [0]*len(underlines)
|
1299
|
│ │ dump_dict = {}
|
1300
|
│ │ linecount = None # Number of lines in title (1 or 2).
|
1301
|
│ │ def __init__(self):
|
1302
|
│ │ - raise AssertionError,'no class instances allowed'
|
1303
|
│ │ + raise AssertionError('no class instances allowed')
|
1304
|
│ │ @staticmethod
|
1305
|
│ │ def translate(skipsubs=False):
|
1306
|
│ │ """Parse the Title.attributes and Title.level from the reader. The
|
1307
|
│ │ real work has already been done by parse()."""
|
1308
|
│ │ - assert Lex.next() in (Title,FloatingTitle)
|
1309
|
│ │ + assert Lex.next_element() in (Title,FloatingTitle)
|
1310
|
│ │ # Discard title from reader.
|
1311
|
│ │ for i in range(Title.linecount):
|
1312
|
│ │ reader.read()
|
1313
|
│ │ Title.setsectname()
|
1314
|
│ │ if not skipsubs:
|
1315
|
│ │ Title.attributes['title'] = Title.dosubs(Title.attributes['title'])
|
1316
|
│ │ @staticmethod
|
1317
|
│ │ @@ -2065,25 +2036,25 @@
|
1318
|
│ │ break
|
1319
|
│ │ if not result:
|
1320
|
│ │ # Check for double-line titles.
|
1321
|
│ │ if not Title.pattern: return False # Single-line titles only.
|
1322
|
│ │ if len(lines) < 2: return False
|
1323
|
│ │ title,ul = lines[:2]
|
1324
|
│ │ title_len = column_width(title)
|
1325
|
│ │ - ul_len = char_len(ul)
|
1326
|
│ │ + ul_len = len(ul)
|
1327
|
│ │ if ul_len < 2: return False
|
1328
|
│ │ # Fast elimination check.
|
1329
|
│ │ if ul[:2] not in Title.underlines: return False
|
1330
|
│ │ # Length of underline must be within +-3 of title.
|
1331
|
│ │ if not ((ul_len-3 < title_len < ul_len+3)
|
1332
|
│ │ # Next test for backward compatibility.
|
1333
|
│ │ - or (ul_len-3 < char_len(title) < ul_len+3)):
|
1334
|
│ │ + or (ul_len-3 < len(title) < ul_len+3)):
|
1335
|
│ │ return False
|
1336
|
│ │ # Check for valid repetition of underline character pairs.
|
1337
|
│ │ - s = ul[:2]*((ul_len+1)/2)
|
1338
|
│ │ + s = ul[:2]*((ul_len+1)//2)
|
1339
|
│ │ if ul != s[:ul_len]: return False
|
1340
|
│ │ # Don't be fooled by back-to-back delimited blocks, require at
|
1341
|
│ │ # least one alphanumeric character in title.
|
1342
|
│ │ if not re.search(r'(?u)\w',title): return False
|
1343
|
│ │ mo = re.match(Title.pattern, title)
|
1344
|
│ │ if mo:
|
1345
|
│ │ Title.attributes = mo.groupdict()
|
1346
|
│ │ @@ -2091,15 +2062,15 @@
|
1347
|
│ │ Title.linecount = 2
|
1348
|
│ │ result = True
|
1349
|
│ │ # Check for expected pattern match groups.
|
1350
|
│ │ if result:
|
1351
|
│ │ if not 'title' in Title.attributes:
|
1352
|
│ │ message.warning('[titles] entry has no <title> group')
|
1353
|
│ │ Title.attributes['title'] = lines[0]
|
1354
|
│ │ - for k,v in Title.attributes.items():
|
1355
|
│ │ + for k,v in list(Title.attributes.items()):
|
1356
|
│ │ if v is None: del Title.attributes[k]
|
1357
|
│ │ try:
|
1358
|
│ │ Title.level += int(document.attributes.get('leveloffset','0'))
|
1359
|
│ │ except:
|
1360
|
│ │ pass
|
1361
|
│ │ Title.attributes['level'] = str(Title.level)
|
1362
|
│ │ return result
|
1363
|
│ │ @@ -2107,44 +2078,44 @@
|
1364
|
│ │ def load(entries):
|
1365
|
│ │ """Load and validate [titles] section entries dictionary."""
|
1366
|
│ │ if 'underlines' in entries:
|
1367
|
│ │ errmsg = 'malformed [titles] underlines entry'
|
1368
|
│ │ try:
|
1369
|
│ │ underlines = parse_list(entries['underlines'])
|
1370
|
│ │ except Exception:
|
1371
|
│ │ - raise EAsciiDoc,errmsg
|
1372
|
│ │ + raise EAsciiDoc(errmsg)
|
1373
|
│ │ if len(underlines) != len(Title.underlines):
|
1374
|
│ │ - raise EAsciiDoc,errmsg
|
1375
|
│ │ + raise EAsciiDoc(errmsg)
|
1376
|
│ │ for s in underlines:
|
1377
|
│ │ if len(s) !=2:
|
1378
|
│ │ - raise EAsciiDoc,errmsg
|
1379
|
│ │ + raise EAsciiDoc(errmsg)
|
1380
|
│ │ Title.underlines = tuple(underlines)
|
1381
|
│ │ Title.dump_dict['underlines'] = entries['underlines']
|
1382
|
│ │ if 'subs' in entries:
|
1383
|
│ │ Title.subs = parse_options(entries['subs'], SUBS_OPTIONS,
|
1384
|
│ │ 'illegal [titles] subs entry')
|
1385
|
│ │ Title.dump_dict['subs'] = entries['subs']
|
1386
|
│ │ if 'sectiontitle' in entries:
|
1387
|
│ │ pat = entries['sectiontitle']
|
1388
|
│ │ if not pat or not is_re(pat):
|
1389
|
│ │ - raise EAsciiDoc,'malformed [titles] sectiontitle entry'
|
1390
|
│ │ + raise EAsciiDoc('malformed [titles] sectiontitle entry')
|
1391
|
│ │ Title.pattern = pat
|
1392
|
│ │ Title.dump_dict['sectiontitle'] = pat
|
1393
|
│ │ if 'blocktitle' in entries:
|
1394
|
│ │ pat = entries['blocktitle']
|
1395
|
│ │ if not pat or not is_re(pat):
|
1396
|
│ │ - raise EAsciiDoc,'malformed [titles] blocktitle entry'
|
1397
|
│ │ + raise EAsciiDoc('malformed [titles] blocktitle entry')
|
1398
|
│ │ BlockTitle.pattern = pat
|
1399
|
│ │ Title.dump_dict['blocktitle'] = pat
|
1400
|
│ │ # Load single-line title patterns.
|
1401
|
│ │ for k in ('sect0','sect1','sect2','sect3','sect4'):
|
1402
|
│ │ if k in entries:
|
1403
|
│ │ pat = entries[k]
|
1404
|
│ │ if not pat or not is_re(pat):
|
1405
|
│ │ - raise EAsciiDoc,'malformed [titles] %s entry' % k
|
1406
|
│ │ + raise EAsciiDoc('malformed [titles] %s entry' % k)
|
1407
|
│ │ Title.dump_dict[k] = pat
|
1408
|
│ │ # TODO: Check we have either a Title.pattern or at least one
|
1409
|
│ │ # single-line title pattern -- can this be done here or do we need
|
1410
|
│ │ # check routine like the other block checkers?
|
1411
|
│ │ @staticmethod
|
1412
|
│ │ def dump():
|
1413
|
│ │ dump_section('titles',Title.dump_dict)
|
1414
|
│ │ @@ -2158,15 +2129,15 @@
|
1415
|
│ │ """
|
1416
|
│ │ sectname = AttributeList.attrs.get('1')
|
1417
|
│ │ if sectname and sectname != 'float':
|
1418
|
│ │ Title.sectname = sectname
|
1419
|
│ │ elif 'template' in AttributeList.attrs:
|
1420
|
│ │ Title.sectname = AttributeList.attrs['template']
|
1421
|
│ │ else:
|
1422
|
│ │ - for pat,sect in config.specialsections.items():
|
1423
|
│ │ + for pat,sect in list(config.specialsections.items()):
|
1424
|
│ │ mo = re.match(pat,Title.attributes['title'])
|
1425
|
│ │ if mo:
|
1426
|
│ │ title = mo.groupdict().get('title')
|
1427
|
│ │ if title is not None:
|
1428
|
│ │ Title.attributes['title'] = title.strip()
|
1429
|
│ │ else:
|
1430
|
│ │ Title.attributes['title'] = mo.group().strip()
|
1431
|
│ │ @@ -2197,15 +2168,15 @@
|
1432
|
│ │ class FloatingTitle(Title):
|
1433
|
│ │ '''Floated titles are translated differently.'''
|
1434
|
│ │ @staticmethod
|
1435
|
│ │ def isnext():
|
1436
|
│ │ return Title.isnext() and AttributeList.style() == 'float'
|
1437
|
│ │ @staticmethod
|
1438
|
│ │ def translate():
|
1439
|
│ │ - assert Lex.next() is FloatingTitle
|
1440
|
│ │ + assert Lex.next_element() is FloatingTitle
|
1441
|
│ │ Title.translate()
|
1442
|
│ │ Section.set_id()
|
1443
|
│ │ AttributeList.consume(Title.attributes)
|
1444
|
│ │ template = 'floatingtitle'
|
1445
|
│ │ if template in config.sections:
|
1446
|
│ │ stag,etag = config.section2tags(template,Title.attributes)
|
1447
|
│ │ writer.write(stag,trace='floating title')
|
1448
|
│ │ @@ -2214,15 +2185,15 @@
|
1449
|
│ │
|
1450
|
│ │
|
1451
|
│ │ class Section:
|
1452
|
│ │ """Static methods and attributes only."""
|
1453
|
│ │ endtags = [] # Stack of currently open section (level,endtag) tuples.
|
1454
|
│ │ ids = [] # List of already used ids.
|
1455
|
│ │ def __init__(self):
|
1456
|
│ │ - raise AssertionError,'no class instances allowed'
|
1457
|
│ │ + raise AssertionError('no class instances allowed')
|
1458
|
│ │ @staticmethod
|
1459
|
│ │ def savetag(level,etag):
|
1460
|
│ │ """Save section end."""
|
1461
|
│ │ Section.endtags.append((level,etag))
|
1462
|
│ │ @staticmethod
|
1463
|
│ │ def setlevel(level):
|
1464
|
│ │ """Set document level and write open section close tags up to level."""
|
1465
|
│ │ @@ -2237,24 +2208,23 @@
|
1466
|
│ │ NCName ::= NCNameStartChar NCNameChar*
|
1467
|
│ │ NCNameChar ::= NameChar - ':'
|
1468
|
│ │ NCNameStartChar ::= Letter | '_'
|
1469
|
│ │ NameChar ::= Letter | Digit | '.' | '-' | '_' | ':'
|
1470
|
│ │ """
|
1471
|
│ │ # Replace non-alpha numeric characters in title with underscores and
|
1472
|
│ │ # convert to lower case.
|
1473
|
│ │ - base_id = re.sub(r'(?u)\W+', '_', char_decode(title)).strip('_').lower()
|
1474
|
│ │ + base_id = re.sub(r'(?u)\W+', '_', title).strip('_').lower()
|
1475
|
│ │ if 'ascii-ids' in document.attributes:
|
1476
|
│ │ # Replace non-ASCII characters with ASCII equivalents.
|
1477
|
│ │ import unicodedata
|
1478
|
│ │ base_id = unicodedata.normalize('NFKD', base_id).encode('ascii','ignore')
|
1479
|
│ │ - base_id = char_encode(base_id)
|
1480
|
│ │ # Prefix the ID name with idprefix attribute or underscore if not
|
1481
|
│ │ # defined. Prefix ensures the ID does not clash with existing IDs.
|
1482
|
│ │ idprefix = document.attributes.get('idprefix','_')
|
1483
|
│ │ - base_id = idprefix + base_id
|
1484
|
│ │ + base_id = idprefix + str(base_id)
|
1485
|
│ │ i = 1
|
1486
|
│ │ while True:
|
1487
|
│ │ if i == 1:
|
1488
|
│ │ id = base_id
|
1489
|
│ │ else:
|
1490
|
│ │ id = '%s_%d' % (base_id, i)
|
1491
|
│ │ if id not in Section.ids:
|
1492
|
│ │ @@ -2267,15 +2237,15 @@
|
1493
|
│ │ def set_id():
|
1494
|
│ │ if not document.attributes.get('sectids') is None \
|
1495
|
│ │ and 'id' not in AttributeList.attrs:
|
1496
|
│ │ # Generate ids for sections.
|
1497
|
│ │ AttributeList.attrs['id'] = Section.gen_id(Title.attributes['title'])
|
1498
|
│ │ @staticmethod
|
1499
|
│ │ def translate():
|
1500
|
│ │ - assert Lex.next() is Title
|
1501
|
│ │ + assert Lex.next_element() is Title
|
1502
|
│ │ prev_sectname = Title.sectname
|
1503
|
│ │ Title.translate()
|
1504
|
│ │ if Title.level == 0 and document.doctype != 'book':
|
1505
|
│ │ message.error('only book doctypes can contain level 0 sections')
|
1506
|
│ │ if Title.level > document.level \
|
1507
|
│ │ and 'basebackend-docbook' in document.attributes \
|
1508
|
│ │ and prev_sectname in ('colophon','abstract', \
|
1509
|
│ │ @@ -2304,20 +2274,20 @@
|
1510
|
│ │ Section.savetag(Title.level,etag)
|
1511
|
│ │ writer.write(stag,trace='section open: level %d: %s' %
|
1512
|
│ │ (Title.level, Title.attributes['title']))
|
1513
|
│ │ Section.translate_body()
|
1514
|
│ │ @staticmethod
|
1515
|
│ │ def translate_body(terminator=Title):
|
1516
|
│ │ isempty = True
|
1517
|
│ │ - next = Lex.next()
|
1518
|
│ │ + next = Lex.next_element()
|
1519
|
│ │ while next and next is not terminator:
|
1520
|
│ │ if isinstance(terminator,DelimitedBlock) and next is Title:
|
1521
|
│ │ message.error('section title not permitted in delimited block')
|
1522
|
│ │ next.translate()
|
1523
|
│ │ - next = Lex.next()
|
1524
|
│ │ + next = Lex.next_element()
|
1525
|
│ │ isempty = False
|
1526
|
│ │ # The section is not empty if contains a subsection.
|
1527
|
│ │ if next and isempty and Title.level > document.level:
|
1528
|
│ │ isempty = False
|
1529
|
│ │ # Report empty sections if invalid markup will result.
|
1530
|
│ │ if isempty:
|
1531
|
│ │ if document.backend == 'docbook' and Title.sectname != 'index':
|
1532
|
│ │ @@ -2384,20 +2354,20 @@
|
1533
|
│ │ dst = dst or self.parameters
|
1534
|
│ │ msg = '[%s] malformed entry %%s: %%s' % self.defname
|
1535
|
│ │ def copy(obj,k,v):
|
1536
|
│ │ if isinstance(obj,dict):
|
1537
|
│ │ obj[k] = v
|
1538
|
│ │ else:
|
1539
|
│ │ setattr(obj,k,v)
|
1540
|
│ │ - for k,v in src.items():
|
1541
|
│ │ + for k,v in list(src.items()):
|
1542
|
│ │ if not re.match(r'\d+',k) and not is_name(k):
|
1543
|
│ │ - raise EAsciiDoc, msg % (k,v)
|
1544
|
│ │ + raise EAsciiDoc(msg % (k,v))
|
1545
|
│ │ if k == 'template':
|
1546
|
│ │ if not is_name(v):
|
1547
|
│ │ - raise EAsciiDoc, msg % (k,v)
|
1548
|
│ │ + raise EAsciiDoc(msg % (k,v))
|
1549
|
│ │ copy(dst,k,v)
|
1550
|
│ │ elif k == 'filter':
|
1551
|
│ │ copy(dst,k,v)
|
1552
|
│ │ elif k == 'options':
|
1553
|
│ │ if isinstance(v,str):
|
1554
|
│ │ v = parse_options(v, (), msg % (k,v))
|
1555
|
│ │ # Merge with existing options.
|
1556
|
│ │ @@ -2409,34 +2379,34 @@
|
1557
|
│ │ if isinstance(v,str):
|
1558
|
│ │ v = parse_options(v, SUBS_OPTIONS, msg % (k,v))
|
1559
|
│ │ copy(dst,k,v)
|
1560
|
│ │ elif k == 'delimiter':
|
1561
|
│ │ if v and is_re(v):
|
1562
|
│ │ copy(dst,k,v)
|
1563
|
│ │ else:
|
1564
|
│ │ - raise EAsciiDoc, msg % (k,v)
|
1565
|
│ │ + raise EAsciiDoc(msg % (k,v))
|
1566
|
│ │ elif k == 'style':
|
1567
|
│ │ if is_name(v):
|
1568
|
│ │ copy(dst,k,v)
|
1569
|
│ │ else:
|
1570
|
│ │ - raise EAsciiDoc, msg % (k,v)
|
1571
|
│ │ + raise EAsciiDoc(msg % (k,v))
|
1572
|
│ │ elif k == 'posattrs':
|
1573
|
│ │ v = parse_options(v, (), msg % (k,v))
|
1574
|
│ │ copy(dst,k,v)
|
1575
|
│ │ else:
|
1576
|
│ │ mo = re.match(r'^(?P<style>.*)-style$',k)
|
1577
|
│ │ if mo:
|
1578
|
│ │ if not v:
|
1579
|
│ │ - raise EAsciiDoc, msg % (k,v)
|
1580
|
│ │ + raise EAsciiDoc(msg % (k,v))
|
1581
|
│ │ style = mo.group('style')
|
1582
|
│ │ if not is_name(style):
|
1583
|
│ │ - raise EAsciiDoc, msg % (k,v)
|
1584
|
│ │ + raise EAsciiDoc(msg % (k,v))
|
1585
|
│ │ d = {}
|
1586
|
│ │ if not parse_named_attributes(v,d):
|
1587
|
│ │ - raise EAsciiDoc, msg % (k,v)
|
1588
|
│ │ + raise EAsciiDoc(msg % (k,v))
|
1589
|
│ │ if 'subs' in d:
|
1590
|
│ │ # Subs is an alias for presubs.
|
1591
|
│ │ d['presubs'] = d['subs']
|
1592
|
│ │ del d['subs']
|
1593
|
│ │ self.styles[style] = d
|
1594
|
│ │ elif all or k in self.PARAM_NAMES:
|
1595
|
│ │ copy(dst,k,v) # Derived class specific entries.
|
1596
|
│ │ @@ -2478,32 +2448,32 @@
|
1597
|
│ │ if self.filter:
|
1598
|
│ │ write('filter='+self.filter)
|
1599
|
│ │ if self.posattrs:
|
1600
|
│ │ write('posattrs='+','.join(self.posattrs))
|
1601
|
│ │ if self.style:
|
1602
|
│ │ write('style='+self.style)
|
1603
|
│ │ if self.styles:
|
1604
|
│ │ - for style,d in self.styles.items():
|
1605
|
│ │ + for style,d in list(self.styles.items()):
|
1606
|
│ │ s = ''
|
1607
|
│ │ - for k,v in d.items(): s += '%s=%r,' % (k,v)
|
1608
|
│ │ + for k,v in list(d.items()): s += '%s=%r,' % (k,v)
|
1609
|
│ │ write('%s-style=%s' % (style,s[:-1]))
|
1610
|
│ │ def validate(self):
|
1611
|
│ │ """Validate block after the complete configuration has been loaded."""
|
1612
|
│ │ if self.is_conf_entry('delimiter') and not self.delimiter:
|
1613
|
│ │ - raise EAsciiDoc,'[%s] missing delimiter' % self.defname
|
1614
|
│ │ + raise EAsciiDoc('[%s] missing delimiter' % self.defname)
|
1615
|
│ │ if self.style:
|
1616
|
│ │ if not is_name(self.style):
|
1617
|
│ │ - raise EAsciiDoc, 'illegal style name: %s' % self.style
|
1618
|
│ │ + raise EAsciiDoc('illegal style name: %s' % self.style)
|
1619
|
│ │ if not self.style in self.styles:
|
1620
|
│ │ if not isinstance(self,List): # Lists don't have templates.
|
1621
|
│ │ message.warning('[%s] \'%s\' style not in %s' % (
|
1622
|
│ │ - self.defname,self.style,self.styles.keys()))
|
1623
|
│ │ + self.defname,self.style,list(self.styles.keys())))
|
1624
|
│ │ # Check all styles for missing templates.
|
1625
|
│ │ all_styles_have_template = True
|
1626
|
│ │ - for k,v in self.styles.items():
|
1627
|
│ │ + for k,v in list(self.styles.items()):
|
1628
|
│ │ t = v.get('template')
|
1629
|
│ │ if t and not t in config.sections:
|
1630
|
│ │ # Defer check if template name contains attributes.
|
1631
|
│ │ if not re.search(r'{.+}',t):
|
1632
|
│ │ message.warning('missing template section: [%s]' % t)
|
1633
|
│ │ if not t:
|
1634
|
│ │ all_styles_have_template = False
|
1635
|
│ │ @@ -2621,15 +2591,15 @@
|
1636
|
│ │ style = self.style
|
1637
|
│ │ # Lists have implicit styles and do their own style checks.
|
1638
|
│ │ elif style not in self.styles and not isinstance(self,List):
|
1639
|
│ │ message.warning('missing style: [%s]: %s' % (self.defname,style))
|
1640
|
│ │ style = self.style
|
1641
|
│ │ if style in self.styles:
|
1642
|
│ │ self.attributes['style'] = style
|
1643
|
│ │ - for k,v in self.styles[style].items():
|
1644
|
│ │ + for k,v in list(self.styles[style].items()):
|
1645
|
│ │ if k == 'posattrs':
|
1646
|
│ │ posattrs = v
|
1647
|
│ │ elif k in params:
|
1648
|
│ │ self.parameters[k] = v
|
1649
|
│ │ elif not k in self.attributes:
|
1650
|
│ │ # Style attributes don't take precedence over explicit.
|
1651
|
│ │ self.attributes[k] = v
|
1652
|
│ │ @@ -2650,28 +2620,28 @@
|
1653
|
│ │ def __init__(self):
|
1654
|
│ │ self.current=None
|
1655
|
│ │ self.blocks = [] # List of Block objects.
|
1656
|
│ │ self.default = None # Default Block.
|
1657
|
│ │ self.delimiters = None # Combined delimiters regular expression.
|
1658
|
│ │ def load(self,sections):
|
1659
|
│ │ """Load block definition from 'sections' dictionary."""
|
1660
|
│ │ - for k in sections.keys():
|
1661
|
│ │ + for k in list(sections.keys()):
|
1662
|
│ │ if re.match(r'^'+ self.PREFIX + r'.+$',k):
|
1663
|
│ │ d = {}
|
1664
|
│ │ parse_entries(sections.get(k,()),d)
|
1665
|
│ │ for b in self.blocks:
|
1666
|
│ │ if b.defname == k:
|
1667
|
│ │ break
|
1668
|
│ │ else:
|
1669
|
│ │ b = self.BLOCK_TYPE()
|
1670
|
│ │ self.blocks.append(b)
|
1671
|
│ │ try:
|
1672
|
│ │ b.load(k,d)
|
1673
|
│ │ - except EAsciiDoc,e:
|
1674
|
│ │ - raise EAsciiDoc,'[%s] %s' % (k,str(e))
|
1675
|
│ │ + except EAsciiDoc as e:
|
1676
|
│ │ + raise EAsciiDoc('[%s] %s' % (k,str(e)))
|
1677
|
│ │ def dump(self):
|
1678
|
│ │ for b in self.blocks:
|
1679
|
│ │ b.dump()
|
1680
|
│ │ def isnext(self):
|
1681
|
│ │ for b in self.blocks:
|
1682
|
│ │ if b.isnext():
|
1683
|
│ │ self.current = b
|
1684
|
│ │ @@ -2753,15 +2723,15 @@
|
1685
|
│ │ for b in self.blocks:
|
1686
|
│ │ if b.defname == 'paradef-default':
|
1687
|
│ │ self.blocks.append(b)
|
1688
|
│ │ self.default = b
|
1689
|
│ │ self.blocks.remove(b)
|
1690
|
│ │ break
|
1691
|
│ │ else:
|
1692
|
│ │ - raise EAsciiDoc,'missing section: [paradef-default]'
|
1693
|
│ │ + raise EAsciiDoc('missing section: [paradef-default]')
|
1694
|
│ │
|
1695
|
│ │ class List(AbstractBlock):
|
1696
|
│ │ NUMBER_STYLES= ('arabic','loweralpha','upperalpha','lowerroman',
|
1697
|
│ │ 'upperroman')
|
1698
|
│ │ def __init__(self):
|
1699
|
│ │ AbstractBlock.__init__(self)
|
1700
|
│ │ self.CONF_ENTRIES += ('type','tags')
|
1701
|
│ │ @@ -2784,15 +2754,15 @@
|
1702
|
│ │ write = lambda s: sys.stdout.write('%s%s' % (s,writer.newline))
|
1703
|
│ │ write('type='+self.type)
|
1704
|
│ │ write('tags='+self.tags)
|
1705
|
│ │ write('')
|
1706
|
│ │ def validate(self):
|
1707
|
│ │ AbstractBlock.validate(self)
|
1708
|
│ │ tags = [self.tags]
|
1709
|
│ │ - tags += [s['tags'] for s in self.styles.values() if 'tags' in s]
|
1710
|
│ │ + tags += [s['tags'] for s in list(self.styles.values()) if 'tags' in s]
|
1711
|
│ │ for t in tags:
|
1712
|
│ │ if t not in lists.tags:
|
1713
|
│ │ self.error('missing section: [listtags-%s]' % t,halt=True)
|
1714
|
│ │ def isnext(self):
|
1715
|
│ │ result = AbstractBlock.isnext(self)
|
1716
|
│ │ if result:
|
1717
|
│ │ self.label = self.mo.groupdict().get('label')
|
1718
|
│ │ @@ -2802,15 +2772,15 @@
|
1719
|
│ │ def translate_entry(self):
|
1720
|
│ │ assert self.type == 'labeled'
|
1721
|
│ │ entrytag = subs_tag(self.tag.entry, self.attributes)
|
1722
|
│ │ labeltag = subs_tag(self.tag.label, self.attributes)
|
1723
|
│ │ writer.write(entrytag[0],trace='list entry open')
|
1724
|
│ │ writer.write(labeltag[0],trace='list label open')
|
1725
|
│ │ # Write labels.
|
1726
|
│ │ - while Lex.next() is self:
|
1727
|
│ │ + while Lex.next_element() is self:
|
1728
|
│ │ reader.read() # Discard (already parsed item first line).
|
1729
|
│ │ writer.write_tag(self.tag.term, [self.label],
|
1730
|
│ │ self.presubs, self.attributes,trace='list term')
|
1731
|
│ │ if self.text: break
|
1732
|
│ │ writer.write(labeltag[1],trace='list label close')
|
1733
|
│ │ # Write item text.
|
1734
|
│ │ self.translate_item()
|
1735
|
│ │ @@ -2826,21 +2796,21 @@
|
1736
|
│ │ text = [self.text] + list(text)
|
1737
|
│ │ if text:
|
1738
|
│ │ writer.write_tag(self.tag.text, text, self.presubs, self.attributes,trace='list text')
|
1739
|
│ │ # Process explicit and implicit list item continuations.
|
1740
|
│ │ while True:
|
1741
|
│ │ continuation = reader.read_next() == '+'
|
1742
|
│ │ if continuation: reader.read() # Discard continuation line.
|
1743
|
│ │ - while Lex.next() in (BlockTitle,AttributeList):
|
1744
|
│ │ + while Lex.next_element() in (BlockTitle,AttributeList):
|
1745
|
│ │ # Consume continued element title and attributes.
|
1746
|
│ │ - Lex.next().translate()
|
1747
|
│ │ + Lex.next_element().translate()
|
1748
|
│ │ if not continuation and BlockTitle.title:
|
1749
|
│ │ # Titled elements terminate the list.
|
1750
|
│ │ break
|
1751
|
│ │ - next = Lex.next()
|
1752
|
│ │ + next = Lex.next_element()
|
1753
|
│ │ if next in lists.open:
|
1754
|
│ │ break
|
1755
|
│ │ elif isinstance(next,List):
|
1756
|
│ │ next.translate()
|
1757
|
│ │ elif isinstance(next,Paragraph) and 'listelement' in next.options:
|
1758
|
│ │ next.translate()
|
1759
|
│ │ elif continuation:
|
1760
|
│ │ @@ -2917,15 +2887,15 @@
|
1761
|
│ │ (self.ordinal,ordinal), offset=1)
|
1762
|
│ │
|
1763
|
│ │ def check_tags(self):
|
1764
|
│ │ """ Check that all necessary tags are present. """
|
1765
|
│ │ tags = set(Lists.TAGS)
|
1766
|
│ │ if self.type != 'labeled':
|
1767
|
│ │ tags = tags.difference(['entry','label','term'])
|
1768
|
│ │ - missing = tags.difference(self.tag.keys())
|
1769
|
│ │ + missing = tags.difference(list(self.tag.keys()))
|
1770
|
│ │ if missing:
|
1771
|
│ │ self.error('missing tag(s): %s' % ','.join(missing), halt=True)
|
1772
|
│ │ def translate(self):
|
1773
|
│ │ AbstractBlock.translate(self)
|
1774
|
│ │ if self.short_name() in ('bibliography','glossary','qanda'):
|
1775
|
│ │ message.deprecated('old %s list syntax' % self.short_name())
|
1776
|
│ │ lists.open.append(self)
|
1777
|
│ │ @@ -2958,26 +2928,26 @@
|
1778
|
│ │ else:
|
1779
|
│ │ self.error('illegal attribute value: width="%s"' % v)
|
1780
|
│ │ stag,etag = subs_tag(self.tag.list, self.attributes)
|
1781
|
│ │ if stag:
|
1782
|
│ │ writer.write(stag,trace='list open')
|
1783
|
│ │ self.ordinal = 0
|
1784
|
│ │ # Process list till list syntax changes or there is a new title.
|
1785
|
│ │ - while Lex.next() is self and not BlockTitle.title:
|
1786
|
│ │ + while Lex.next_element() is self and not BlockTitle.title:
|
1787
|
│ │ self.ordinal += 1
|
1788
|
│ │ document.attributes['listindex'] = str(self.ordinal)
|
1789
|
│ │ if self.type in ('numbered','callout'):
|
1790
|
│ │ self.check_index()
|
1791
|
│ │ if self.type in ('bulleted','numbered','callout'):
|
1792
|
│ │ reader.read() # Discard (already parsed item first line).
|
1793
|
│ │ self.translate_item()
|
1794
|
│ │ elif self.type == 'labeled':
|
1795
|
│ │ self.translate_entry()
|
1796
|
│ │ else:
|
1797
|
│ │ - raise AssertionError,'illegal [%s] list type' % self.defname
|
1798
|
│ │ + raise AssertionError('illegal [%s] list type' % self.defname)
|
1799
|
│ │ if etag:
|
1800
|
│ │ writer.write(etag,trace='list close')
|
1801
|
│ │ if self.type == 'callout':
|
1802
|
│ │ calloutmap.validate(self.ordinal)
|
1803
|
│ │ calloutmap.listclose()
|
1804
|
│ │ lists.open.pop()
|
1805
|
│ │ if len(lists.open):
|
1806
|
│ │ @@ -3007,38 +2977,38 @@
|
1807
|
│ │ def load(self,sections):
|
1808
|
│ │ AbstractBlocks.load(self,sections)
|
1809
|
│ │ self.load_tags(sections)
|
1810
|
│ │ def load_tags(self,sections):
|
1811
|
│ │ """
|
1812
|
│ │ Load listtags-* conf file sections to self.tags.
|
1813
|
│ │ """
|
1814
|
│ │ - for section in sections.keys():
|
1815
|
│ │ + for section in list(sections.keys()):
|
1816
|
│ │ mo = re.match(r'^listtags-(?P<name>\w+)$',section)
|
1817
|
│ │ if mo:
|
1818
|
│ │ name = mo.group('name')
|
1819
|
│ │ if name in self.tags:
|
1820
|
│ │ d = self.tags[name]
|
1821
|
│ │ else:
|
1822
|
│ │ d = AttrDict()
|
1823
|
│ │ parse_entries(sections.get(section,()),d)
|
1824
|
│ │ - for k in d.keys():
|
1825
|
│ │ + for k in list(d.keys()):
|
1826
|
│ │ if k not in self.TAGS:
|
1827
|
│ │ message.warning('[%s] contains illegal list tag: %s' %
|
1828
|
│ │ (section,k))
|
1829
|
│ │ self.tags[name] = d
|
1830
|
│ │ def validate(self):
|
1831
|
│ │ AbstractBlocks.validate(self)
|
1832
|
│ │ for b in self.blocks:
|
1833
|
│ │ # Check list has valid type.
|
1834
|
│ │ if not b.type in Lists.TYPES:
|
1835
|
│ │ - raise EAsciiDoc,'[%s] illegal type' % b.defname
|
1836
|
│ │ + raise EAsciiDoc('[%s] illegal type' % b.defname)
|
1837
|
│ │ b.validate()
|
1838
|
│ │ def dump(self):
|
1839
|
│ │ AbstractBlocks.dump(self)
|
1840
|
│ │ - for k,v in self.tags.items():
|
1841
|
│ │ + for k,v in list(self.tags.items()):
|
1842
|
│ │ dump_section('listtags-'+k, v)
|
1843
|
│ │
|
1844
|
│ │
|
1845
|
│ │ class DelimitedBlock(AbstractBlock):
|
1846
|
│ │ def __init__(self):
|
1847
|
│ │ AbstractBlock.__init__(self)
|
1848
|
│ │ def load(self,name,entries):
|
1849
|
│ │ @@ -3194,15 +3164,15 @@
|
1850
|
│ │ write('')
|
1851
|
│ │ def validate(self):
|
1852
|
│ │ AbstractBlock.validate(self)
|
1853
|
│ │ if self.format not in Table.FORMATS:
|
1854
|
│ │ self.error('illegal format=%s' % self.format,halt=True)
|
1855
|
│ │ self.tags = self.tags or 'default'
|
1856
|
│ │ tags = [self.tags]
|
1857
|
│ │ - tags += [s['tags'] for s in self.styles.values() if 'tags' in s]
|
1858
|
│ │ + tags += [s['tags'] for s in list(self.styles.values()) if 'tags' in s]
|
1859
|
│ │ for t in tags:
|
1860
|
│ │ if t not in tables.tags:
|
1861
|
│ │ self.error('missing section: [tabletags-%s]' % t,halt=True)
|
1862
|
│ │ if self.separator:
|
1863
|
│ │ # Evaluate escape characters.
|
1864
|
│ │ self.separator = literal_eval('"'+self.separator+'"')
|
1865
|
│ │ #TODO: Move to class Tables
|
1866
|
│ │ @@ -3215,15 +3185,15 @@
|
1867
|
│ │ """Validate and parse table attributes."""
|
1868
|
│ │ # Set defaults.
|
1869
|
│ │ format = self.format
|
1870
|
│ │ tags = self.tags
|
1871
|
│ │ separator = self.separator
|
1872
|
│ │ abswidth = float(config.pagewidth)
|
1873
|
│ │ pcwidth = 100.0
|
1874
|
│ │ - for k,v in self.attributes.items():
|
1875
|
│ │ + for k,v in list(self.attributes.items()):
|
1876
|
│ │ if k == 'format':
|
1877
|
│ │ if v not in self.FORMATS:
|
1878
|
│ │ self.error('illegal %s=%s' % (k,v))
|
1879
|
│ │ else:
|
1880
|
│ │ format = v
|
1881
|
│ │ elif k == 'tags':
|
1882
|
│ │ if v not in tables.tags:
|
1883
|
│ │ @@ -3260,15 +3230,15 @@
|
1884
|
│ │ return tables.tags[tags]
|
1885
|
│ │ def get_style(self,prefix):
|
1886
|
│ │ """
|
1887
|
│ │ Return the style dictionary whose name starts with 'prefix'.
|
1888
|
│ │ """
|
1889
|
│ │ if prefix is None:
|
1890
|
│ │ return None
|
1891
|
│ │ - names = self.styles.keys()
|
1892
|
│ │ + names = list(self.styles.keys())
|
1893
|
│ │ names.sort()
|
1894
|
│ │ for name in names:
|
1895
|
│ │ if name.startswith(prefix):
|
1896
|
│ │ return self.styles[name]
|
1897
|
│ │ else:
|
1898
|
│ │ self.error('missing style: %s*' % prefix)
|
1899
|
│ │ return None
|
1900
|
│ │ @@ -3515,18 +3485,18 @@
|
1901
|
│ │ i += cell.span
|
1902
|
│ │ return result
|
1903
|
│ │ def parse_csv(self,text):
|
1904
|
│ │ """
|
1905
|
│ │ Parse the table source text and return a list of rows, each row
|
1906
|
│ │ is a list of Cells.
|
1907
|
│ │ """
|
1908
|
│ │ - import StringIO
|
1909
|
│ │ + import io
|
1910
|
│ │ import csv
|
1911
|
│ │ rows = []
|
1912
|
│ │ - rdr = csv.reader(StringIO.StringIO('\r\n'.join(text)),
|
1913
|
│ │ + rdr = csv.reader(io.StringIO('\r\n'.join(text)),
|
1914
|
│ │ delimiter=self.parameters.separator, skipinitialspace=True)
|
1915
|
│ │ try:
|
1916
|
│ │ for row in rdr:
|
1917
|
│ │ rows.append([Cell(data) for data in row])
|
1918
|
│ │ except Exception:
|
1919
|
│ │ self.error('csv parse error: %s' % row)
|
1920
|
│ │ return rows
|
1921
|
│ │ @@ -3672,71 +3642,71 @@
|
1922
|
│ │ def load(self,sections):
|
1923
|
│ │ AbstractBlocks.load(self,sections)
|
1924
|
│ │ self.load_tags(sections)
|
1925
|
│ │ def load_tags(self,sections):
|
1926
|
│ │ """
|
1927
|
│ │ Load tabletags-* conf file sections to self.tags.
|
1928
|
│ │ """
|
1929
|
│ │ - for section in sections.keys():
|
1930
|
│ │ + for section in list(sections.keys()):
|
1931
|
│ │ mo = re.match(r'^tabletags-(?P<name>\w+)$',section)
|
1932
|
│ │ if mo:
|
1933
|
│ │ name = mo.group('name')
|
1934
|
│ │ if name in self.tags:
|
1935
|
│ │ d = self.tags[name]
|
1936
|
│ │ else:
|
1937
|
│ │ d = AttrDict()
|
1938
|
│ │ parse_entries(sections.get(section,()),d)
|
1939
|
│ │ - for k in d.keys():
|
1940
|
│ │ + for k in list(d.keys()):
|
1941
|
│ │ if k not in self.TAGS:
|
1942
|
│ │ message.warning('[%s] contains illegal table tag: %s' %
|
1943
|
│ │ (section,k))
|
1944
|
│ │ self.tags[name] = d
|
1945
|
│ │ def validate(self):
|
1946
|
│ │ AbstractBlocks.validate(self)
|
1947
|
│ │ # Check we have a default table definition,
|
1948
|
│ │ for i in range(len(self.blocks)):
|
1949
|
│ │ if self.blocks[i].defname == 'tabledef-default':
|
1950
|
│ │ default = self.blocks[i]
|
1951
|
│ │ break
|
1952
|
│ │ else:
|
1953
|
│ │ - raise EAsciiDoc,'missing section: [tabledef-default]'
|
1954
|
│ │ + raise EAsciiDoc('missing section: [tabledef-default]')
|
1955
|
│ │ # Propagate defaults to unspecified table parameters.
|
1956
|
│ │ for b in self.blocks:
|
1957
|
│ │ if b is not default:
|
1958
|
│ │ if b.format is None: b.format = default.format
|
1959
|
│ │ if b.template is None: b.template = default.template
|
1960
|
│ │ # Check tags and propagate default tags.
|
1961
|
│ │ if not 'default' in self.tags:
|
1962
|
│ │ - raise EAsciiDoc,'missing section: [tabletags-default]'
|
1963
|
│ │ + raise EAsciiDoc('missing section: [tabletags-default]')
|
1964
|
│ │ default = self.tags['default']
|
1965
|
│ │ for tag in ('bodyrow','bodydata','paragraph'): # Mandatory default tags.
|
1966
|
│ │ if tag not in default:
|
1967
|
│ │ - raise EAsciiDoc,'missing [tabletags-default] entry: %s' % tag
|
1968
|
│ │ - for t in self.tags.values():
|
1969
|
│ │ + raise EAsciiDoc('missing [tabletags-default] entry: %s' % tag)
|
1970
|
│ │ + for t in list(self.tags.values()):
|
1971
|
│ │ if t is not default:
|
1972
|
│ │ if t.colspec is None: t.colspec = default.colspec
|
1973
|
│ │ if t.headrow is None: t.headrow = default.headrow
|
1974
|
│ │ if t.footrow is None: t.footrow = default.footrow
|
1975
|
│ │ if t.bodyrow is None: t.bodyrow = default.bodyrow
|
1976
|
│ │ if t.headdata is None: t.headdata = default.headdata
|
1977
|
│ │ if t.footdata is None: t.footdata = default.footdata
|
1978
|
│ │ if t.bodydata is None: t.bodydata = default.bodydata
|
1979
|
│ │ if t.paragraph is None: t.paragraph = default.paragraph
|
1980
|
│ │ # Use body tags if header and footer tags are not specified.
|
1981
|
│ │ - for t in self.tags.values():
|
1982
|
│ │ + for t in list(self.tags.values()):
|
1983
|
│ │ if not t.headrow: t.headrow = t.bodyrow
|
1984
|
│ │ if not t.footrow: t.footrow = t.bodyrow
|
1985
|
│ │ if not t.headdata: t.headdata = t.bodydata
|
1986
|
│ │ if not t.footdata: t.footdata = t.bodydata
|
1987
|
│ │ # Check table definitions are valid.
|
1988
|
│ │ for b in self.blocks:
|
1989
|
│ │ b.validate()
|
1990
|
│ │ def dump(self):
|
1991
|
│ │ AbstractBlocks.dump(self)
|
1992
|
│ │ - for k,v in self.tags.items():
|
1993
|
│ │ + for k,v in list(self.tags.items()):
|
1994
|
│ │ dump_section('tabletags-'+k, v)
|
1995
|
│ │
|
1996
|
│ │ class Macros:
|
1997
|
│ │ # Default system macro syntax.
|
1998
|
│ │ SYS_RE = r'(?u)^(?P<name>[\\]?\w(\w|-)*?)::(?P<target>\S*?)' + \
|
1999
|
│ │ r'(\[(?P<attrlist>.*?)\])$'
|
2000
|
│ │ def __init__(self):
|
2001
|
│ │ @@ -3862,25 +3832,25 @@
|
2002
|
│ │ e = parse_entry(entry)
|
2003
|
│ │ if e is None:
|
2004
|
│ │ # Only the macro pattern was specified, mark for deletion.
|
2005
|
│ │ self.name = None
|
2006
|
│ │ self.pattern = entry
|
2007
|
│ │ return
|
2008
|
│ │ if not is_re(e[0]):
|
2009
|
│ │ - raise EAsciiDoc,'illegal macro regular expression: %s' % e[0]
|
2010
|
│ │ + raise EAsciiDoc('illegal macro regular expression: %s' % e[0])
|
2011
|
│ │ pattern, name = e
|
2012
|
│ │ if name and name[0] in ('+','#'):
|
2013
|
│ │ prefix, name = name[0], name[1:]
|
2014
|
│ │ else:
|
2015
|
│ │ prefix = ''
|
2016
|
│ │ # Parse passthrough subslist.
|
2017
|
│ │ mo = re.match(r'^(?P<name>[^[]*)(\[(?P<subslist>.*)\])?$', name)
|
2018
|
│ │ name = mo.group('name')
|
2019
|
│ │ if name and not is_name(name):
|
2020
|
│ │ - raise EAsciiDoc,'illegal section name in macro entry: %s' % entry
|
2021
|
│ │ + raise EAsciiDoc('illegal section name in macro entry: %s' % entry)
|
2022
|
│ │ subslist = mo.group('subslist')
|
2023
|
│ │ if subslist is not None:
|
2024
|
│ │ # Parse and validate passthrough subs.
|
2025
|
│ │ subslist = parse_options(subslist, SUBS_OPTIONS,
|
2026
|
│ │ 'illegal subs in macro entry: %s' % entry)
|
2027
|
│ │ self.pattern = pattern
|
2028
|
│ │ self.reo = re.compile(pattern)
|
2029
|
│ │ @@ -3894,15 +3864,15 @@
|
2030
|
│ │ Uses matched macro regular expression object and returns string
|
2031
|
│ │ containing the substituted macro body."""
|
2032
|
│ │ # Check if macro reference is escaped.
|
2033
|
│ │ if mo.group()[0] == '\\':
|
2034
|
│ │ return mo.group()[1:] # Strip leading backslash.
|
2035
|
│ │ d = mo.groupdict()
|
2036
|
│ │ # Delete groups that didn't participate in match.
|
2037
|
│ │ - for k,v in d.items():
|
2038
|
│ │ + for k,v in list(d.items()):
|
2039
|
│ │ if v is None: del d[k]
|
2040
|
│ │ if self.name:
|
2041
|
│ │ name = self.name
|
2042
|
│ │ else:
|
2043
|
│ │ if not 'name' in d:
|
2044
|
│ │ message.warning('missing macro name group: %s' % mo.re.pattern)
|
2045
|
│ │ return ''
|
2046
|
│ │ @@ -4062,15 +4032,15 @@
|
2047
|
│ │ result += ' ' + self.calloutid(self.listnumber,coindex)
|
2048
|
│ │ return result.strip()
|
2049
|
│ │ else:
|
2050
|
│ │ message.warning('no callouts refer to list item '+str(listindex))
|
2051
|
│ │ return ''
|
2052
|
│ │ def validate(self,maxlistindex):
|
2053
|
│ │ # Check that all list indexes referenced by callouts exist.
|
2054
|
│ │ - for listindex in self.comap.keys():
|
2055
|
│ │ + for listindex in list(self.comap.keys()):
|
2056
|
│ │ if listindex > maxlistindex:
|
2057
|
│ │ message.warning('callout refers to non-existent list item '
|
2058
|
│ │ + str(listindex))
|
2059
|
│ │
|
2060
|
│ │ #---------------------------------------------------------------------------
|
2061
|
│ │ # Input stream Reader and output stream writer classes.
|
2062
|
│ │ #---------------------------------------------------------------------------
|
2063
|
│ │ @@ -4101,15 +4071,15 @@
|
2064
|
│ │ self.fname = fname
|
2065
|
│ │ message.verbose('reading: '+fname)
|
2066
|
│ │ if fname == '<stdin>':
|
2067
|
│ │ self.f = sys.stdin
|
2068
|
│ │ self.infile = None
|
2069
|
│ │ self.indir = None
|
2070
|
│ │ else:
|
2071
|
│ │ - self.f = open(fname,'rb')
|
2072
|
│ │ + self.f = open(fname,'r')
|
2073
|
│ │ self.infile = fname
|
2074
|
│ │ self.indir = os.path.dirname(fname)
|
2075
|
│ │ document.attributes['infile'] = self.infile
|
2076
|
│ │ document.attributes['indir'] = self.indir
|
2077
|
│ │ self._lineno = 0 # The last line read from file object f.
|
2078
|
│ │ self.next = []
|
2079
|
│ │ # Prefill buffer by reading the first line and then pushing it back.
|
2080
|
│ │ @@ -4196,28 +4166,28 @@
|
2081
|
│ │ assign(parent,self)
|
2082
|
│ │ self.parent = parent
|
2083
|
│ │ # Set attributes in child.
|
2084
|
│ │ if 'tabsize' in attrs:
|
2085
|
│ │ try:
|
2086
|
│ │ val = int(attrs['tabsize'])
|
2087
|
│ │ if not val >= 0:
|
2088
|
│ │ - raise ValueError, 'not >= 0'
|
2089
|
│ │ + raise ValueError('not >= 0')
|
2090
|
│ │ self.tabsize = val
|
2091
|
│ │ except ValueError:
|
2092
|
│ │ - raise EAsciiDoc, 'illegal include macro tabsize argument'
|
2093
|
│ │ + raise EAsciiDoc('illegal include macro tabsize argument')
|
2094
|
│ │ else:
|
2095
|
│ │ self.tabsize = config.tabsize
|
2096
|
│ │ if 'depth' in attrs:
|
2097
|
│ │ try:
|
2098
|
│ │ val = int(attrs['depth'])
|
2099
|
│ │ if not val >= 1:
|
2100
|
│ │ - raise ValueError, 'not >= 1'
|
2101
|
│ │ + raise ValueError('not >= 1')
|
2102
|
│ │ self.max_depth = self.current_depth + val
|
2103
|
│ │ except ValueError:
|
2104
|
│ │ - raise EAsciiDoc, "include macro: illegal 'depth' argument"
|
2105
|
│ │ + raise EAsciiDoc("include macro: illegal 'depth' argument")
|
2106
|
│ │ # Process included file.
|
2107
|
│ │ message.verbose('include: ' + fname, linenos=False)
|
2108
|
│ │ self.open(fname)
|
2109
|
│ │ self.current_depth = self.current_depth + 1
|
2110
|
│ │ result = Reader1.read(self)
|
2111
|
│ │ else:
|
2112
|
│ │ if not Reader1.eof(self):
|
2113
|
│ │ @@ -4260,81 +4230,81 @@
|
2114
|
│ │ self.depth = 0 # if nesting depth.
|
2115
|
│ │ self.skip = False # true if we're skipping ifdef...endif.
|
2116
|
│ │ self.skipname = '' # Name of current endif macro target.
|
2117
|
│ │ self.skipto = -1 # The depth at which skipping is reenabled.
|
2118
|
│ │ def read_super(self):
|
2119
|
│ │ result = Reader1.read(self,self.skip)
|
2120
|
│ │ if result is None and self.skip:
|
2121
|
│ │ - raise EAsciiDoc,'missing endif::%s[]' % self.skipname
|
2122
|
│ │ + raise EAsciiDoc('missing endif::%s[]' % self.skipname)
|
2123
|
│ │ return result
|
2124
|
│ │ def read(self):
|
2125
|
│ │ result = self.read_super()
|
2126
|
│ │ if result is None:
|
2127
|
│ │ return None
|
2128
|
│ │ while self.skip:
|
2129
|
│ │ mo = macros.match('+',r'ifdef|ifndef|ifeval|endif',result)
|
2130
|
│ │ if mo:
|
2131
|
│ │ name = mo.group('name')
|
2132
|
│ │ target = mo.group('target')
|
2133
|
│ │ attrlist = mo.group('attrlist')
|
2134
|
│ │ if name == 'endif':
|
2135
|
│ │ self.depth -= 1
|
2136
|
│ │ if self.depth < 0:
|
2137
|
│ │ - raise EAsciiDoc,'mismatched macro: %s' % result
|
2138
|
│ │ + raise EAsciiDoc('mismatched macro: %s' % result)
|
2139
|
│ │ if self.depth == self.skipto:
|
2140
|
│ │ self.skip = False
|
2141
|
│ │ if target and self.skipname != target:
|
2142
|
│ │ - raise EAsciiDoc,'mismatched macro: %s' % result
|
2143
|
│ │ + raise EAsciiDoc('mismatched macro: %s' % result)
|
2144
|
│ │ else:
|
2145
|
│ │ if name in ('ifdef','ifndef'):
|
2146
|
│ │ if not target:
|
2147
|
│ │ - raise EAsciiDoc,'missing macro target: %s' % result
|
2148
|
│ │ + raise EAsciiDoc('missing macro target: %s' % result)
|
2149
|
│ │ if not attrlist:
|
2150
|
│ │ self.depth += 1
|
2151
|
│ │ elif name == 'ifeval':
|
2152
|
│ │ if not attrlist:
|
2153
|
│ │ - raise EAsciiDoc,'missing ifeval condition: %s' % result
|
2154
|
│ │ + raise EAsciiDoc('missing ifeval condition: %s' % result)
|
2155
|
│ │ self.depth += 1
|
2156
|
│ │ result = self.read_super()
|
2157
|
│ │ if result is None:
|
2158
|
│ │ return None
|
2159
|
│ │ mo = macros.match('+',r'ifdef|ifndef|ifeval|endif',result)
|
2160
|
│ │ if mo:
|
2161
|
│ │ name = mo.group('name')
|
2162
|
│ │ target = mo.group('target')
|
2163
|
│ │ attrlist = mo.group('attrlist')
|
2164
|
│ │ if name == 'endif':
|
2165
|
│ │ self.depth = self.depth-1
|
2166
|
│ │ else:
|
2167
|
│ │ if not target and name in ('ifdef','ifndef'):
|
2168
|
│ │ - raise EAsciiDoc,'missing macro target: %s' % result
|
2169
|
│ │ + raise EAsciiDoc('missing macro target: %s' % result)
|
2170
|
│ │ defined = is_attr_defined(target, document.attributes)
|
2171
|
│ │ if name == 'ifdef':
|
2172
|
│ │ if attrlist:
|
2173
|
│ │ if defined: return attrlist
|
2174
|
│ │ else:
|
2175
|
│ │ self.skip = not defined
|
2176
|
│ │ elif name == 'ifndef':
|
2177
|
│ │ if attrlist:
|
2178
|
│ │ if not defined: return attrlist
|
2179
|
│ │ else:
|
2180
|
│ │ self.skip = defined
|
2181
|
│ │ elif name == 'ifeval':
|
2182
|
│ │ if safe():
|
2183
|
│ │ message.unsafe('ifeval invalid')
|
2184
|
│ │ - raise EAsciiDoc,'ifeval invalid safe document'
|
2185
|
│ │ + raise EAsciiDoc('ifeval invalid safe document')
|
2186
|
│ │ if not attrlist:
|
2187
|
│ │ - raise EAsciiDoc,'missing ifeval condition: %s' % result
|
2188
|
│ │ + raise EAsciiDoc('missing ifeval condition: %s' % result)
|
2189
|
│ │ cond = False
|
2190
|
│ │ attrlist = subs_attrs(attrlist)
|
2191
|
│ │ if attrlist:
|
2192
|
│ │ try:
|
2193
|
│ │ cond = eval(attrlist)
|
2194
|
│ │ - except Exception,e:
|
2195
|
│ │ - raise EAsciiDoc,'error evaluating ifeval condition: %s: %s' % (result, str(e))
|
2196
|
│ │ + except Exception as e:
|
2197
|
│ │ + raise EAsciiDoc('error evaluating ifeval condition: %s: %s' % (result, str(e)))
|
2198
|
│ │ message.verbose('ifeval: %s: %r' % (attrlist, cond))
|
2199
|
│ │ self.skip = not cond
|
2200
|
│ │ if not attrlist or name == 'ifeval':
|
2201
|
│ │ if self.skip:
|
2202
|
│ │ self.skipto = self.depth
|
2203
|
│ │ self.skipname = target
|
2204
|
│ │ self.depth = self.depth+1
|
2205
|
│ │ @@ -4392,15 +4362,15 @@
|
2206
|
│ │ object or list of regular expression objects. If same_file is True then
|
2207
|
│ │ the terminating pattern must occur in the file the was being read when
|
2208
|
│ │ the routine was called."""
|
2209
|
│ │ if same_file:
|
2210
|
│ │ fname = self.cursor[0]
|
2211
|
│ │ result = []
|
2212
|
│ │ if not isinstance(terminators,list):
|
2213
|
│ │ - if isinstance(terminators,basestring):
|
2214
|
│ │ + if isinstance(terminators,str):
|
2215
|
│ │ terminators = [re.compile(terminators)]
|
2216
|
│ │ else:
|
2217
|
│ │ terminators = [terminators]
|
2218
|
│ │ while not self.eof():
|
2219
|
│ │ save_cursor = self.cursor
|
2220
|
│ │ s = self.read()
|
2221
|
│ │ if not same_file or fname == self.cursor[0]:
|
2222
|
│ │ @@ -4425,15 +4395,15 @@
|
2223
|
│ │ bom is optional byte order mark.
|
2224
|
│ │ http://en.wikipedia.org/wiki/Byte-order_mark
|
2225
|
│ │ '''
|
2226
|
│ │ self.fname = fname
|
2227
|
│ │ if fname == '<stdout>':
|
2228
|
│ │ self.f = sys.stdout
|
2229
|
│ │ else:
|
2230
|
│ │ - self.f = open(fname,'wb+')
|
2231
|
│ │ + self.f = open(fname,'w+')
|
2232
|
│ │ message.verbose('writing: '+writer.fname,False)
|
2233
|
│ │ if bom:
|
2234
|
│ │ self.f.write(bom)
|
2235
|
│ │ self.lines_out = 0
|
2236
|
│ │ def close(self):
|
2237
|
│ │ if self.fname != '<stdout>':
|
2238
|
│ │ self.f.close()
|
2239
|
│ │ @@ -4480,22 +4450,22 @@
|
2240
|
│ │ #---------------------------------------------------------------------------
|
2241
|
│ │ def _subs_specialwords(mo):
|
2242
|
│ │ """Special word substitution function called by
|
2243
|
│ │ Config.subs_specialwords()."""
|
2244
|
│ │ word = mo.re.pattern # The special word.
|
2245
|
│ │ template = config.specialwords[word] # The corresponding markup template.
|
2246
|
│ │ if not template in config.sections:
|
2247
|
│ │ - raise EAsciiDoc,'missing special word template [%s]' % template
|
2248
|
│ │ + raise EAsciiDoc('missing special word template [%s]' % template)
|
2249
|
│ │ if mo.group()[0] == '\\':
|
2250
|
│ │ return mo.group()[1:] # Return escaped word.
|
2251
|
│ │ args = {}
|
2252
|
│ │ args['words'] = mo.group() # The full match string is argument 'words'.
|
2253
|
│ │ args.update(mo.groupdict()) # Add other named match groups to the arguments.
|
2254
|
│ │ # Delete groups that didn't participate in match.
|
2255
|
│ │ - for k,v in args.items():
|
2256
|
│ │ + for k,v in list(args.items()):
|
2257
|
│ │ if v is None: del args[k]
|
2258
|
│ │ lines = subs_attrs(config.sections[template],args)
|
2259
|
│ │ if len(lines) == 0:
|
2260
|
│ │ result = ''
|
2261
|
│ │ elif len(lines) == 1:
|
2262
|
│ │ result = lines[0]
|
2263
|
│ │ else:
|
2264
|
│ │ @@ -4615,15 +4585,15 @@
|
2265
|
│ │ while not rdr.eof():
|
2266
|
│ │ s = rdr.read()
|
2267
|
│ │ if s and s[0] == '#': # Skip comment lines.
|
2268
|
│ │ continue
|
2269
|
│ │ if s[:2] == '\\#': # Unescape lines starting with '#'.
|
2270
|
│ │ s = s[1:]
|
2271
|
│ │ s = s.rstrip()
|
2272
|
│ │ - found = reo.findall(s)
|
2273
|
│ │ + found = reo.findall(str(s))
|
2274
|
│ │ if found:
|
2275
|
│ │ update_section(section) # Store previous section.
|
2276
|
│ │ section = found[0].lower()
|
2277
|
│ │ contents = []
|
2278
|
│ │ else:
|
2279
|
│ │ contents.append(s)
|
2280
|
│ │ update_section(section) # Store last section.
|
2281
|
│ │ @@ -4645,22 +4615,22 @@
|
2282
|
│ │ def load_sections(self,sections,attrs=None):
|
2283
|
│ │ """
|
2284
|
│ │ Loads sections dictionary. Each dictionary entry contains a
|
2285
|
│ │ list of lines.
|
2286
|
│ │ Updates 'attrs' with parsed [attributes] section entries.
|
2287
|
│ │ """
|
2288
|
│ │ # Delete trailing blank lines from sections.
|
2289
|
│ │ - for k in sections.keys():
|
2290
|
│ │ + for k in list(sections.keys()):
|
2291
|
│ │ for i in range(len(sections[k])-1,-1,-1):
|
2292
|
│ │ if not sections[k][i]:
|
2293
|
│ │ del sections[k][i]
|
2294
|
│ │ elif not self.entries_section(k):
|
2295
|
│ │ break
|
2296
|
│ │ # Update new sections.
|
2297
|
│ │ - for k,v in sections.items():
|
2298
|
│ │ + for k,v in list(sections.items()):
|
2299
|
│ │ if k.startswith('+'):
|
2300
|
│ │ # Append section.
|
2301
|
│ │ k = k[1:]
|
2302
|
│ │ if k in self.sections:
|
2303
|
│ │ self.sections[k] += v
|
2304
|
│ │ else:
|
2305
|
│ │ self.sections[k] = v
|
2306
|
│ │ @@ -4810,27 +4780,27 @@
|
2307
|
│ │ def load_miscellaneous(self,d):
|
2308
|
│ │ """Set miscellaneous configuration entries from dictionary 'd'."""
|
2309
|
│ │ def set_if_int_ge(name, d, min_value):
|
2310
|
│ │ if name in d:
|
2311
|
│ │ try:
|
2312
|
│ │ val = int(d[name])
|
2313
|
│ │ if not val >= min_value:
|
2314
|
│ │ - raise ValueError, "not >= " + str(min_value)
|
2315
|
│ │ + raise ValueError("not >= " + str(min_value))
|
2316
|
│ │ setattr(self, name, val)
|
2317
|
│ │ except ValueError:
|
2318
|
│ │ - raise EAsciiDoc, 'illegal [miscellaneous] %s entry' % name
|
2319
|
│ │ + raise EAsciiDoc('illegal [miscellaneous] %s entry' % name)
|
2320
|
│ │ set_if_int_ge('tabsize', d, 0)
|
2321
|
│ │ set_if_int_ge('textwidth', d, 1) # DEPRECATED: Old tables only.
|
2322
|
│ │
|
2323
|
│ │ if 'pagewidth' in d:
|
2324
|
│ │ try:
|
2325
|
│ │ val = float(d['pagewidth'])
|
2326
|
│ │ self.pagewidth = val
|
2327
|
│ │ except ValueError:
|
2328
|
│ │ - raise EAsciiDoc, 'illegal [miscellaneous] pagewidth entry'
|
2329
|
│ │ + raise EAsciiDoc('illegal [miscellaneous] pagewidth entry')
|
2330
|
│ │
|
2331
|
│ │ if 'pageunits' in d:
|
2332
|
│ │ self.pageunits = d['pageunits']
|
2333
|
│ │ if 'outfilesuffix' in d:
|
2334
|
│ │ self.outfilesuffix = d['outfilesuffix']
|
2335
|
│ │ if 'newline' in d:
|
2336
|
│ │ # Convert escape sequences to their character values.
|
2337
|
│ │ @@ -4846,38 +4816,38 @@
|
2338
|
│ │
|
2339
|
│ │ def validate(self):
|
2340
|
│ │ """Check the configuration for internal consistancy. Called after all
|
2341
|
│ │ configuration files have been loaded."""
|
2342
|
│ │ message.linenos = False # Disable document line numbers.
|
2343
|
│ │ # Heuristic to validate that at least one configuration file was loaded.
|
2344
|
│ │ if not self.specialchars or not self.tags or not lists:
|
2345
|
│ │ - raise EAsciiDoc,'incomplete configuration files'
|
2346
|
│ │ + raise EAsciiDoc('incomplete configuration files')
|
2347
|
│ │ # Check special characters are only one character long.
|
2348
|
│ │ - for k in self.specialchars.keys():
|
2349
|
│ │ + for k in list(self.specialchars.keys()):
|
2350
|
│ │ if len(k) != 1:
|
2351
|
│ │ - raise EAsciiDoc,'[specialcharacters] ' \
|
2352
|
│ │ - 'must be a single character: %s' % k
|
2353
|
│ │ + raise EAsciiDoc('[specialcharacters] ' \
|
2354
|
│ │ + 'must be a single character: %s' % k)
|
2355
|
│ │ # Check all special words have a corresponding inline macro body.
|
2356
|
│ │ - for macro in self.specialwords.values():
|
2357
|
│ │ + for macro in list(self.specialwords.values()):
|
2358
|
│ │ if not is_name(macro):
|
2359
|
│ │ - raise EAsciiDoc,'illegal special word name: %s' % macro
|
2360
|
│ │ + raise EAsciiDoc('illegal special word name: %s' % macro)
|
2361
|
│ │ if not macro in self.sections:
|
2362
|
│ │ message.warning('missing special word macro: [%s]' % macro)
|
2363
|
│ │ # Check all text quotes have a corresponding tag.
|
2364
|
│ │ - for q in self.quotes.keys()[:]:
|
2365
|
│ │ + for q in list(self.quotes.keys())[:]:
|
2366
|
│ │ tag = self.quotes[q]
|
2367
|
│ │ if not tag:
|
2368
|
│ │ del self.quotes[q] # Undefine quote.
|
2369
|
│ │ else:
|
2370
|
│ │ if tag[0] == '#':
|
2371
|
│ │ tag = tag[1:]
|
2372
|
│ │ if not tag in self.tags:
|
2373
|
│ │ message.warning('[quotes] %s missing tag definition: %s' % (q,tag))
|
2374
|
│ │ # Check all specialsections section names exist.
|
2375
|
│ │ - for k,v in self.specialsections.items():
|
2376
|
│ │ + for k,v in list(self.specialsections.items()):
|
2377
|
│ │ if not v:
|
2378
|
│ │ del self.specialsections[k]
|
2379
|
│ │ elif not v in self.sections:
|
2380
|
│ │ message.warning('missing specialsections section: [%s]' % v)
|
2381
|
│ │ paragraphs.validate()
|
2382
|
│ │ lists.validate()
|
2383
|
│ │ blocks.validate()
|
2384
|
│ │ @@ -4914,36 +4884,36 @@
|
2385
|
│ │ d.update(self.conf_attrs)
|
2386
|
│ │ d.update(self.cmd_attrs)
|
2387
|
│ │ dump_section('attributes',d)
|
2388
|
│ │ Title.dump()
|
2389
|
│ │ dump_section('quotes',self.quotes)
|
2390
|
│ │ dump_section('specialcharacters',self.specialchars)
|
2391
|
│ │ d = {}
|
2392
|
│ │ - for k,v in self.specialwords.items():
|
2393
|
│ │ + for k,v in list(self.specialwords.items()):
|
2394
|
│ │ if v in d:
|
2395
|
│ │ d[v] = '%s "%s"' % (d[v],k) # Append word list.
|
2396
|
│ │ else:
|
2397
|
│ │ d[v] = '"%s"' % k
|
2398
|
│ │ dump_section('specialwords',d)
|
2399
|
│ │ dump_section('replacements',self.replacements)
|
2400
|
│ │ dump_section('replacements2',self.replacements2)
|
2401
|
│ │ dump_section('replacements3',self.replacements3)
|
2402
|
│ │ dump_section('specialsections',self.specialsections)
|
2403
|
│ │ d = {}
|
2404
|
│ │ - for k,v in self.tags.items():
|
2405
|
│ │ + for k,v in list(self.tags.items()):
|
2406
|
│ │ d[k] = '%s|%s' % v
|
2407
|
│ │ dump_section('tags',d)
|
2408
|
│ │ paragraphs.dump()
|
2409
|
│ │ lists.dump()
|
2410
|
│ │ blocks.dump()
|
2411
|
│ │ tables_OLD.dump()
|
2412
|
│ │ tables.dump()
|
2413
|
│ │ macros.dump()
|
2414
|
│ │ # Dump remaining sections.
|
2415
|
│ │ - for k in self.sections.keys():
|
2416
|
│ │ + for k in list(self.sections.keys()):
|
2417
|
│ │ if not self.entries_section(k):
|
2418
|
│ │ sys.stdout.write('[%s]%s' % (k,writer.newline))
|
2419
|
│ │ for line in self.sections[k]:
|
2420
|
│ │ sys.stdout.write('%s%s' % (line,writer.newline))
|
2421
|
│ │ sys.stdout.write(writer.newline)
|
2422
|
│ │
|
2423
|
│ │ def subs_section(self,section,d):
|
2424
|
│ │ @@ -4956,34 +4926,34 @@
|
2425
|
│ │ message.warning('missing section: [%s]' % section)
|
2426
|
│ │ return ()
|
2427
|
│ │
|
2428
|
│ │ def parse_tags(self):
|
2429
|
│ │ """Parse [tags] section entries into self.tags dictionary."""
|
2430
|
│ │ d = {}
|
2431
|
│ │ parse_entries(self.sections.get('tags',()),d)
|
2432
|
│ │ - for k,v in d.items():
|
2433
|
│ │ + for k,v in list(d.items()):
|
2434
|
│ │ if v is None:
|
2435
|
│ │ if k in self.tags:
|
2436
|
│ │ del self.tags[k]
|
2437
|
│ │ elif v == '':
|
2438
|
│ │ self.tags[k] = (None,None)
|
2439
|
│ │ else:
|
2440
|
│ │ mo = re.match(r'(?P<stag>.*)\|(?P<etag>.*)',v)
|
2441
|
│ │ if mo:
|
2442
|
│ │ self.tags[k] = (mo.group('stag'), mo.group('etag'))
|
2443
|
│ │ else:
|
2444
|
│ │ - raise EAsciiDoc,'[tag] %s value malformed' % k
|
2445
|
│ │ + raise EAsciiDoc('[tag] %s value malformed' % k)
|
2446
|
│ │
|
2447
|
│ │ def tag(self, name, d=None):
|
2448
|
│ │ """Returns (starttag,endtag) tuple named name from configuration file
|
2449
|
│ │ [tags] section. Raise error if not found. If a dictionary 'd' is
|
2450
|
│ │ passed then merge with document attributes and perform attribute
|
2451
|
│ │ substitution on tags."""
|
2452
|
│ │ if not name in self.tags:
|
2453
|
│ │ - raise EAsciiDoc, 'missing tag: %s' % name
|
2454
|
│ │ + raise EAsciiDoc('missing tag: %s' % name)
|
2455
|
│ │ stag,etag = self.tags[name]
|
2456
|
│ │ if d is not None:
|
2457
|
│ │ # TODO: Should we warn if substitution drops a tag?
|
2458
|
│ │ if stag:
|
2459
|
│ │ stag = subs_attrs(stag,d)
|
2460
|
│ │ if etag:
|
2461
|
│ │ etag = subs_attrs(etag,d)
|
2462
|
│ │ @@ -4993,33 +4963,33 @@
|
2463
|
│ │
|
2464
|
│ │ def parse_specialsections(self):
|
2465
|
│ │ """Parse specialsections section to self.specialsections dictionary."""
|
2466
|
│ │ # TODO: This is virtually the same as parse_replacements() and should
|
2467
|
│ │ # be factored to single routine.
|
2468
|
│ │ d = {}
|
2469
|
│ │ parse_entries(self.sections.get('specialsections',()),d,unquote=True)
|
2470
|
│ │ - for pat,sectname in d.items():
|
2471
|
│ │ + for pat,sectname in list(d.items()):
|
2472
|
│ │ pat = strip_quotes(pat)
|
2473
|
│ │ if not is_re(pat):
|
2474
|
│ │ - raise EAsciiDoc,'[specialsections] entry ' \
|
2475
|
│ │ - 'is not a valid regular expression: %s' % pat
|
2476
|
│ │ + raise EAsciiDoc('[specialsections] entry ' \
|
2477
|
│ │ + 'is not a valid regular expression: %s' % pat)
|
2478
|
│ │ if sectname is None:
|
2479
|
│ │ if pat in self.specialsections:
|
2480
|
│ │ del self.specialsections[pat]
|
2481
|
│ │ else:
|
2482
|
│ │ self.specialsections[pat] = sectname
|
2483
|
│ │
|
2484
|
│ │ def parse_replacements(self,sect='replacements'):
|
2485
|
│ │ """Parse replacements section into self.replacements dictionary."""
|
2486
|
│ │ d = OrderedDict()
|
2487
|
│ │ parse_entries(self.sections.get(sect,()), d, unquote=True)
|
2488
|
│ │ - for pat,rep in d.items():
|
2489
|
│ │ + for pat,rep in list(d.items()):
|
2490
|
│ │ if not self.set_replacement(pat, rep, getattr(self,sect)):
|
2491
|
│ │ - raise EAsciiDoc,'[%s] entry in %s is not a valid' \
|
2492
|
│ │ - ' regular expression: %s' % (sect,self.fname,pat)
|
2493
|
│ │ + raise EAsciiDoc('[%s] entry in %s is not a valid' \
|
2494
|
│ │ + ' regular expression: %s' % (sect,self.fname,pat))
|
2495
|
│ │
|
2496
|
│ │ @staticmethod
|
2497
|
│ │ def set_replacement(pat, rep, replacements):
|
2498
|
│ │ """Add pattern and replacement to replacements dictionary."""
|
2499
|
│ │ pat = strip_quotes(pat)
|
2500
|
│ │ if not is_re(pat):
|
2501
|
│ │ return False
|
2502
|
│ │ @@ -5029,43 +4999,43 @@
|
2503
|
│ │ else:
|
2504
|
│ │ replacements[pat] = strip_quotes(rep)
|
2505
|
│ │ return True
|
2506
|
│ │
|
2507
|
│ │ def subs_replacements(self,s,sect='replacements'):
|
2508
|
│ │ """Substitute patterns from self.replacements in 's'."""
|
2509
|
│ │ result = s
|
2510
|
│ │ - for pat,rep in getattr(self,sect).items():
|
2511
|
│ │ + for pat,rep in list(getattr(self,sect).items()):
|
2512
|
│ │ result = re.sub(pat, rep, result)
|
2513
|
│ │ return result
|
2514
|
│ │
|
2515
|
│ │ def parse_specialwords(self):
|
2516
|
│ │ """Parse special words section into self.specialwords dictionary."""
|
2517
|
│ │ reo = re.compile(r'(?:\s|^)(".+?"|[^"\s]+)(?=\s|$)')
|
2518
|
│ │ for line in self.sections.get('specialwords',()):
|
2519
|
│ │ e = parse_entry(line)
|
2520
|
│ │ if not e:
|
2521
|
│ │ - raise EAsciiDoc,'[specialwords] entry in %s is malformed: %s' \
|
2522
|
│ │ - % (self.fname,line)
|
2523
|
│ │ + raise EAsciiDoc('[specialwords] entry in %s is malformed: %s' \
|
2524
|
│ │ + % (self.fname,line))
|
2525
|
│ │ name,wordlist = e
|
2526
|
│ │ if not is_name(name):
|
2527
|
│ │ - raise EAsciiDoc,'[specialwords] name in %s is illegal: %s' \
|
2528
|
│ │ - % (self.fname,name)
|
2529
|
│ │ + raise EAsciiDoc('[specialwords] name in %s is illegal: %s' \
|
2530
|
│ │ + % (self.fname,name))
|
2531
|
│ │ if wordlist is None:
|
2532
|
│ │ # Undefine all words associated with 'name'.
|
2533
|
│ │ - for k,v in self.specialwords.items():
|
2534
|
│ │ + for k,v in list(self.specialwords.items()):
|
2535
|
│ │ if v == name:
|
2536
|
│ │ del self.specialwords[k]
|
2537
|
│ │ else:
|
2538
|
│ │ words = reo.findall(wordlist)
|
2539
|
│ │ for word in words:
|
2540
|
│ │ word = strip_quotes(word)
|
2541
|
│ │ if not is_re(word):
|
2542
|
│ │ - raise EAsciiDoc,'[specialwords] entry in %s ' \
|
2543
|
│ │ + raise EAsciiDoc('[specialwords] entry in %s ' \
|
2544
|
│ │ 'is not a valid regular expression: %s' \
|
2545
|
│ │ - % (self.fname,word)
|
2546
|
│ │ + % (self.fname,word))
|
2547
|
│ │ self.specialwords[word] = name
|
2548
|
│ │
|
2549
|
│ │ def subs_specialchars(self,s):
|
2550
|
│ │ """Perform special character substitution on string 's'."""
|
2551
|
│ │ """It may seem like a good idea to escape special characters with a '\'
|
2552
|
│ │ character, the reason we don't is because the escape character itself
|
2553
|
│ │ then has to be escaped and this makes including code listings
|
2554
|
│ │ @@ -5074,23 +5044,23 @@
|
2555
|
│ │ for ch in s:
|
2556
|
│ │ result = result + self.specialchars.get(ch,ch)
|
2557
|
│ │ return result
|
2558
|
│ │
|
2559
|
│ │ def subs_specialchars_reverse(self,s):
|
2560
|
│ │ """Perform reverse special character substitution on string 's'."""
|
2561
|
│ │ result = s
|
2562
|
│ │ - for k,v in self.specialchars.items():
|
2563
|
│ │ + for k,v in list(self.specialchars.items()):
|
2564
|
│ │ result = result.replace(v, k)
|
2565
|
│ │ return result
|
2566
|
│ │
|
2567
|
│ │ def subs_specialwords(self,s):
|
2568
|
│ │ """Search for word patterns from self.specialwords in 's' and
|
2569
|
│ │ substitute using corresponding macro."""
|
2570
|
│ │ result = s
|
2571
|
│ │ - for word in self.specialwords.keys():
|
2572
|
│ │ + for word in list(self.specialwords.keys()):
|
2573
|
│ │ result = re.sub(word, _subs_specialwords, result)
|
2574
|
│ │ return result
|
2575
|
│ │
|
2576
|
│ │ def expand_templates(self,entries):
|
2577
|
│ │ """Expand any template::[] macros in a list of section entries."""
|
2578
|
│ │ result = []
|
2579
|
│ │ for line in entries:
|
2580
|
│ │ @@ -5103,15 +5073,15 @@
|
2581
|
│ │ message.warning('missing section: [%s]' % s)
|
2582
|
│ │ result.append(line)
|
2583
|
│ │ else:
|
2584
|
│ │ result.append(line)
|
2585
|
│ │ return result
|
2586
|
│ │
|
2587
|
│ │ def expand_all_templates(self):
|
2588
|
│ │ - for k,v in self.sections.items():
|
2589
|
│ │ + for k,v in list(self.sections.items()):
|
2590
|
│ │ self.sections[k] = self.expand_templates(v)
|
2591
|
│ │
|
2592
|
│ │ def section2tags(self, section, d={}, skipstart=False, skipend=False):
|
2593
|
│ │ """Perform attribute substitution on 'section' using document
|
2594
|
│ │ attributes plus 'd' attributes. Return tuple (stag,etag) containing
|
2595
|
│ │ pre and post | placeholder tags. 'skipstart' and 'skipend' are
|
2596
|
│ │ used to suppress substitution."""
|
2597
|
│ │ @@ -5145,16 +5115,16 @@
|
2598
|
│ │ d['title'] = chr(0) # Replace with unused character.
|
2599
|
│ │ if not skipstart:
|
2600
|
│ │ stag = subs_attrs(stag, d)
|
2601
|
│ │ if not skipend:
|
2602
|
│ │ etag = subs_attrs(etag, d)
|
2603
|
│ │ # Put the {title} back.
|
2604
|
│ │ if title:
|
2605
|
│ │ - stag = map(lambda x: x.replace(chr(0), title), stag)
|
2606
|
│ │ - etag = map(lambda x: x.replace(chr(0), title), etag)
|
2607
|
│ │ + stag = [x.replace(chr(0), title) for x in stag]
|
2608
|
│ │ + etag = [x.replace(chr(0), title) for x in etag]
|
2609
|
│ │ d['title'] = title
|
2610
|
│ │ return (stag,etag)
|
2611
|
│ │
|
2612
|
│ │
|
2613
|
│ │ #---------------------------------------------------------------------------
|
2614
|
│ │ # Deprecated old table classes follow.
|
2615
|
│ │ # Naming convention is an _OLD name suffix.
|
2616
|
│ │ @@ -5213,25 +5183,25 @@
|
2617
|
│ │ self.tablewidth=None # Optional table width scale factor.
|
2618
|
│ │ self.columns=[] # List of Columns.
|
2619
|
│ │ # Other.
|
2620
|
│ │ self.check_msg='' # Message set by previous self.validate() call.
|
2621
|
│ │ def load(self,name,entries):
|
2622
|
│ │ AbstractBlock.load(self,name,entries)
|
2623
|
│ │ """Update table definition from section entries in 'entries'."""
|
2624
|
│ │ - for k,v in entries.items():
|
2625
|
│ │ + for k,v in list(entries.items()):
|
2626
|
│ │ if k == 'fillchar':
|
2627
|
│ │ if v and len(v) == 1:
|
2628
|
│ │ self.fillchar = v
|
2629
|
│ │ else:
|
2630
|
│ │ - raise EAsciiDoc,'malformed table fillchar: %s' % v
|
2631
|
│ │ + raise EAsciiDoc('malformed table fillchar: %s' % v)
|
2632
|
│ │ elif k == 'format':
|
2633
|
│ │ if v in Table_OLD.FORMATS:
|
2634
|
│ │ self.format = v
|
2635
|
│ │ else:
|
2636
|
│ │ - raise EAsciiDoc,'illegal table format: %s' % v
|
2637
|
│ │ + raise EAsciiDoc('illegal table format: %s' % v)
|
2638
|
│ │ elif k == 'colspec':
|
2639
|
│ │ self.colspec = v
|
2640
|
│ │ elif k == 'headrow':
|
2641
|
│ │ self.headrow = v
|
2642
|
│ │ elif k == 'footrow':
|
2643
|
│ │ self.footrow = v
|
2644
|
│ │ elif k == 'bodyrow':
|
2645
|
│ │ @@ -5322,21 +5292,21 @@
|
2646
|
│ │ s = re.sub(fc+r'+$','',s)
|
2647
|
│ │ if s == '':
|
2648
|
│ │ c.rulerwidth = None
|
2649
|
│ │ else:
|
2650
|
│ │ try:
|
2651
|
│ │ val = int(s)
|
2652
|
│ │ if not val > 0:
|
2653
|
│ │ - raise ValueError, 'not > 0'
|
2654
|
│ │ + raise ValueError('not > 0')
|
2655
|
│ │ c.rulerwidth = val
|
2656
|
│ │ except ValueError:
|
2657
|
│ │ - raise EAsciiDoc, 'malformed ruler: bad width'
|
2658
|
│ │ + raise EAsciiDoc('malformed ruler: bad width')
|
2659
|
│ │ else: # Calculate column width from inter-fillchar intervals.
|
2660
|
│ │ if not re.match(r'^'+fc+r'+$',s):
|
2661
|
│ │ - raise EAsciiDoc,'malformed ruler: illegal fillchars'
|
2662
|
│ │ + raise EAsciiDoc('malformed ruler: illegal fillchars')
|
2663
|
│ │ c.rulerwidth = len(s)+1
|
2664
|
│ │ self.columns.append(c)
|
2665
|
│ │ # Fill in unspecified ruler widths.
|
2666
|
│ │ if self.isnumeric:
|
2667
|
│ │ if self.columns[0].rulerwidth is None:
|
2668
|
│ │ prevwidth = 1
|
2669
|
│ │ for c in self.columns:
|
2670
|
│ │ @@ -5348,15 +5318,15 @@
|
2671
|
│ │ table arguments have been parsed since we use the table format."""
|
2672
|
│ │ self.attributes['cols'] = len(self.columns)
|
2673
|
│ │ # Calculate total ruler width.
|
2674
|
│ │ totalwidth = 0
|
2675
|
│ │ for c in self.columns:
|
2676
|
│ │ totalwidth = totalwidth + c.rulerwidth
|
2677
|
│ │ if totalwidth <= 0:
|
2678
|
│ │ - raise EAsciiDoc,'zero width table'
|
2679
|
│ │ + raise EAsciiDoc('zero width table')
|
2680
|
│ │ # Calculate marked up colwidths from rulerwidths.
|
2681
|
│ │ for c in self.columns:
|
2682
|
│ │ # Convert ruler width to output page width.
|
2683
|
│ │ width = float(c.rulerwidth)
|
2684
|
│ │ if self.format == 'fixed':
|
2685
|
│ │ if self.tablewidth is None:
|
2686
|
│ │ # Size proportional to ruler width.
|
2687
|
│ │ @@ -5392,17 +5362,17 @@
|
2688
|
│ │ including the next underline (continued lines are joined ) and the
|
2689
|
│ │ tuple of all lines after the underline."""
|
2690
|
│ │ reo = re.compile(self.underline)
|
2691
|
│ │ i = 0
|
2692
|
│ │ while not reo.match(rows[i]):
|
2693
|
│ │ i = i+1
|
2694
|
│ │ if i == 0:
|
2695
|
│ │ - raise EAsciiDoc,'missing table rows'
|
2696
|
│ │ + raise EAsciiDoc('missing table rows')
|
2697
|
│ │ if i >= len(rows):
|
2698
|
│ │ - raise EAsciiDoc,'closing [%s] underline expected' % self.defname
|
2699
|
│ │ + raise EAsciiDoc('closing [%s] underline expected' % self.defname)
|
2700
|
│ │ return (join_lines_OLD(rows[:i]), rows[i+1:])
|
2701
|
│ │ def parse_rows(self, rows, rtag, dtag):
|
2702
|
│ │ """Parse rows list using the row and data tags. Returns a substituted
|
2703
|
│ │ list of output lines."""
|
2704
|
│ │ result = []
|
2705
|
│ │ # Source rows are parsed as single block, rather than line by line, to
|
2706
|
│ │ # allow the CSV reader to handle multi-line rows.
|
2707
|
│ │ @@ -5456,49 +5426,47 @@
|
2708
|
│ │ def parse_fixed(self,rows):
|
2709
|
│ │ """Parse the list of source table rows. Each row item in the returned
|
2710
|
│ │ list contains a list of cell data elements."""
|
2711
|
│ │ result = []
|
2712
|
│ │ for row in rows:
|
2713
|
│ │ data = []
|
2714
|
│ │ start = 0
|
2715
|
│ │ - # build an encoded representation
|
2716
|
│ │ - row = char_decode(row)
|
2717
|
│ │ for c in self.columns:
|
2718
|
│ │ end = start + c.rulerwidth
|
2719
|
│ │ if c is self.columns[-1]:
|
2720
|
│ │ # Text in last column can continue forever.
|
2721
|
│ │ # Use the encoded string to slice, but convert back
|
2722
|
│ │ # to plain string before further processing
|
2723
|
│ │ - data.append(char_encode(row[start:]).strip())
|
2724
|
│ │ + data.append(row[start:].strip())
|
2725
|
│ │ else:
|
2726
|
│ │ - data.append(char_encode(row[start:end]).strip())
|
2727
|
│ │ + data.append(row[start:end].strip())
|
2728
|
│ │ start = end
|
2729
|
│ │ result.append(data)
|
2730
|
│ │ return result
|
2731
|
│ │ def parse_csv(self,rows):
|
2732
|
│ │ """Parse the list of source table rows. Each row item in the returned
|
2733
|
│ │ list contains a list of cell data elements."""
|
2734
|
│ │ - import StringIO
|
2735
|
│ │ + import io
|
2736
|
│ │ import csv
|
2737
|
│ │ result = []
|
2738
|
│ │ - rdr = csv.reader(StringIO.StringIO('\r\n'.join(rows)),
|
2739
|
│ │ + rdr = csv.reader(io.StringIO('\r\n'.join(rows)),
|
2740
|
│ │ skipinitialspace=True)
|
2741
|
│ │ try:
|
2742
|
│ │ for row in rdr:
|
2743
|
│ │ result.append(row)
|
2744
|
│ │ except Exception:
|
2745
|
│ │ - raise EAsciiDoc,'csv parse error: %s' % row
|
2746
|
│ │ + raise EAsciiDoc('csv parse error: %s' % row)
|
2747
|
│ │ return result
|
2748
|
│ │ def parse_dsv(self,rows):
|
2749
|
│ │ """Parse the list of source table rows. Each row item in the returned
|
2750
|
│ │ list contains a list of cell data elements."""
|
2751
|
│ │ separator = self.attributes.get('separator',':')
|
2752
|
│ │ separator = literal_eval('"'+separator+'"')
|
2753
|
│ │ if len(separator) != 1:
|
2754
|
│ │ - raise EAsciiDoc,'malformed dsv separator: %s' % separator
|
2755
|
│ │ + raise EAsciiDoc('malformed dsv separator: %s' % separator)
|
2756
|
│ │ # TODO If separator is preceeded by an odd number of backslashes then
|
2757
|
│ │ # it is escaped and should not delimit.
|
2758
|
│ │ result = []
|
2759
|
│ │ for row in rows:
|
2760
|
│ │ # Skip blank lines
|
2761
|
│ │ if row == '': continue
|
2762
|
│ │ # Unescape escaped characters.
|
2763
|
│ │ @@ -5517,39 +5485,39 @@
|
2764
|
│ │ BlockTitle.consume(attrs)
|
2765
|
│ │ # Add relevant globals to table substitutions.
|
2766
|
│ │ attrs['pagewidth'] = str(config.pagewidth)
|
2767
|
│ │ attrs['pageunits'] = config.pageunits
|
2768
|
│ │ # Mix in document attribute list.
|
2769
|
│ │ AttributeList.consume(attrs)
|
2770
|
│ │ # Validate overridable attributes.
|
2771
|
│ │ - for k,v in attrs.items():
|
2772
|
│ │ + for k,v in list(attrs.items()):
|
2773
|
│ │ if k == 'format':
|
2774
|
│ │ if v not in self.FORMATS:
|
2775
|
│ │ - raise EAsciiDoc, 'illegal [%s] %s: %s' % (self.defname,k,v)
|
2776
|
│ │ + raise EAsciiDoc('illegal [%s] %s: %s' % (self.defname,k,v))
|
2777
|
│ │ self.format = v
|
2778
|
│ │ elif k == 'tablewidth':
|
2779
|
│ │ try:
|
2780
|
│ │ self.tablewidth = float(attrs['tablewidth'])
|
2781
|
│ │ except Exception:
|
2782
|
│ │ - raise EAsciiDoc, 'illegal [%s] %s: %s' % (self.defname,k,v)
|
2783
|
│ │ + raise EAsciiDoc('illegal [%s] %s: %s' % (self.defname,k,v))
|
2784
|
│ │ self.merge_attributes(attrs)
|
2785
|
│ │ # Parse table ruler.
|
2786
|
│ │ ruler = reader.read()
|
2787
|
│ │ assert re.match(self.delimiter,ruler)
|
2788
|
│ │ self.parse_ruler(ruler)
|
2789
|
│ │ # Read the entire table.
|
2790
|
│ │ table = []
|
2791
|
│ │ while True:
|
2792
|
│ │ line = reader.read_next()
|
2793
|
│ │ # Table terminated by underline followed by a blank line or EOF.
|
2794
|
│ │ if len(table) > 0 and re.match(self.underline,table[-1]):
|
2795
|
│ │ if line in ('',None):
|
2796
|
│ │ break;
|
2797
|
│ │ if line is None:
|
2798
|
│ │ - raise EAsciiDoc,'closing [%s] underline expected' % self.defname
|
2799
|
│ │ + raise EAsciiDoc('closing [%s] underline expected' % self.defname)
|
2800
|
│ │ table.append(reader.read())
|
2801
|
│ │ # EXPERIMENTAL: The number of lines in the table, requested by Benjamin Klum.
|
2802
|
│ │ self.attributes['rows'] = str(len(table))
|
2803
|
│ │ if self.check_msg: # Skip if table definition was marked invalid.
|
2804
|
│ │ message.warning('skipping [%s] table: %s' % (self.defname,self.check_msg))
|
2805
|
│ │ return
|
2806
|
│ │ self.push_blockname('table')
|
2807
|
│ │ @@ -5604,15 +5572,15 @@
|
2808
|
│ │ # Does not call AbstractBlocks.validate().
|
2809
|
│ │ # Check we have a default table definition,
|
2810
|
│ │ for i in range(len(self.blocks)):
|
2811
|
│ │ if self.blocks[i].defname == 'old_tabledef-default':
|
2812
|
│ │ default = self.blocks[i]
|
2813
|
│ │ break
|
2814
|
│ │ else:
|
2815
|
│ │ - raise EAsciiDoc,'missing section: [OLD_tabledef-default]'
|
2816
|
│ │ + raise EAsciiDoc('missing section: [OLD_tabledef-default]')
|
2817
|
│ │ # Set default table defaults.
|
2818
|
│ │ if default.format is None: default.subs = 'fixed'
|
2819
|
│ │ # Propagate defaults to unspecified table parameters.
|
2820
|
│ │ for b in self.blocks:
|
2821
|
│ │ if b is not default:
|
2822
|
│ │ if b.fillchar is None: b.fillchar = default.fillchar
|
2823
|
│ │ if b.format is None: b.format = default.format
|
2824
|
│ │ @@ -5623,15 +5591,15 @@
|
2825
|
│ │ if b.bodyrow is None: b.bodyrow = default.bodyrow
|
2826
|
│ │ if b.headdata is None: b.headdata = default.headdata
|
2827
|
│ │ if b.footdata is None: b.footdata = default.footdata
|
2828
|
│ │ if b.bodydata is None: b.bodydata = default.bodydata
|
2829
|
│ │ # Check all tables have valid fill character.
|
2830
|
│ │ for b in self.blocks:
|
2831
|
│ │ if not b.fillchar or len(b.fillchar) != 1:
|
2832
|
│ │ - raise EAsciiDoc,'[%s] missing or illegal fillchar' % b.defname
|
2833
|
│ │ + raise EAsciiDoc('[%s] missing or illegal fillchar' % b.defname)
|
2834
|
│ │ # Build combined tables delimiter patterns and assign defaults.
|
2835
|
│ │ delimiters = []
|
2836
|
│ │ for b in self.blocks:
|
2837
|
│ │ # Ruler is:
|
2838
|
│ │ # (ColStop,(ColWidth,FillChar+)?)+, FillChar+, TableWidth?
|
2839
|
│ │ b.delimiter = r'^(' + Table_OLD.COL_STOP \
|
2840
|
│ │ + r'(\d*|' + re.escape(b.fillchar) + r'*)' \
|
2841
|
│ │ @@ -5678,15 +5646,15 @@
|
2842
|
│ │ outfile = zi.filename
|
2843
|
│ │ if not outfile.endswith('/'):
|
2844
|
│ │ d, outfile = os.path.split(outfile)
|
2845
|
│ │ directory = os.path.normpath(os.path.join(destdir, d))
|
2846
|
│ │ if not os.path.isdir(directory):
|
2847
|
│ │ os.makedirs(directory)
|
2848
|
│ │ outfile = os.path.join(directory, outfile)
|
2849
|
│ │ - perms = (zi.external_attr >> 16) & 0777
|
2850
|
│ │ + perms = (zi.external_attr >> 16) & 0o777
|
2851
|
│ │ message.verbose('extracting: %s' % outfile)
|
2852
|
│ │ flags = os.O_CREAT | os.O_WRONLY
|
2853
|
│ │ if sys.platform == 'win32':
|
2854
|
│ │ flags |= os.O_BINARY
|
2855
|
│ │ if perms == 0:
|
2856
|
│ │ # Zip files created under Windows do not include permissions.
|
2857
|
│ │ fh = os.open(outfile, flags)
|
2858
|
│ │ @@ -5729,15 +5697,15 @@
|
2859
|
│ │ arcname = os.path.join(arcroot, f)
|
2860
|
│ │ if skip_hidden and f.startswith('.'):
|
2861
|
│ │ message.verbose('skipping: %s' % arcname)
|
2862
|
│ │ continue
|
2863
|
│ │ message.verbose('archiving: %s' % arcname)
|
2864
|
│ │ zipo.write(filename, arcname, zipfile.ZIP_DEFLATED)
|
2865
|
│ │ else:
|
2866
|
│ │ - raise ValueError,'src must specify directory or file: %s' % src
|
2867
|
│ │ + raise ValueError('src must specify directory or file: %s' % src)
|
2868
|
│ │ finally:
|
2869
|
│ │ zipo.close()
|
2870
|
│ │
|
2871
|
│ │ class Plugin:
|
2872
|
│ │ """
|
2873
|
│ │ --filter and --theme option commands.
|
2874
|
│ │ """
|
2875
|
│ │ @@ -5783,19 +5751,19 @@
|
2876
|
│ │ if not plugins_dir:
|
2877
|
│ │ die('user home directory is not defined')
|
2878
|
│ │ plugin_dir = os.path.join(plugins_dir, plugin_name)
|
2879
|
│ │ if os.path.exists(plugin_dir):
|
2880
|
│ │ die('%s is already installed: %s' % (Plugin.type, plugin_dir))
|
2881
|
│ │ try:
|
2882
|
│ │ os.makedirs(plugin_dir)
|
2883
|
│ │ - except Exception,e:
|
2884
|
│ │ + except Exception as e:
|
2885
|
│ │ die('failed to create %s directory: %s' % (Plugin.type, str(e)))
|
2886
|
│ │ try:
|
2887
|
│ │ extract_zip(zip_file, plugin_dir)
|
2888
|
│ │ - except Exception,e:
|
2889
|
│ │ + except Exception as e:
|
2890
|
│ │ if os.path.isdir(plugin_dir):
|
2891
|
│ │ shutil.rmtree(plugin_dir)
|
2892
|
│ │ die('failed to extract %s: %s' % (Plugin.type, str(e)))
|
2893
|
│ │
|
2894
|
│ │ @staticmethod
|
2895
|
│ │ def remove(args):
|
2896
|
│ │ """
|
2897
|
│ │ @@ -5819,15 +5787,15 @@
|
2898
|
│ │ die('user directory is not defined')
|
2899
|
│ │ plugin_dir = os.path.join(d, plugin_name)
|
2900
|
│ │ if not os.path.isdir(plugin_dir):
|
2901
|
│ │ die('cannot find %s: %s' % (Plugin.type, plugin_dir))
|
2902
|
│ │ try:
|
2903
|
│ │ message.verbose('removing: %s' % plugin_dir)
|
2904
|
│ │ shutil.rmtree(plugin_dir)
|
2905
|
│ │ - except Exception,e:
|
2906
|
│ │ + except Exception as e:
|
2907
|
│ │ die('failed to delete %s: %s' % (Plugin.type, str(e)))
|
2908
|
│ │
|
2909
|
│ │ @staticmethod
|
2910
|
│ │ def list(args):
|
2911
|
│ │ """
|
2912
|
│ │ List all plugin directories (global and local).
|
2913
|
│ │ """
|
2914
|
│ │ @@ -5848,15 +5816,15 @@
|
2915
|
│ │ % (Plugin.type, ' '.join(args)))
|
2916
|
│ │ zip_file = args[0]
|
2917
|
│ │ plugin_source = args[1]
|
2918
|
│ │ if not (os.path.isdir(plugin_source) or os.path.isfile(plugin_source)):
|
2919
|
│ │ die('plugin source not found: %s' % plugin_source)
|
2920
|
│ │ try:
|
2921
|
│ │ create_zip(zip_file, plugin_source, skip_hidden=True)
|
2922
|
│ │ - except Exception,e:
|
2923
|
│ │ + except Exception as e:
|
2924
|
│ │ die('failed to create %s: %s' % (zip_file, str(e)))
|
2925
|
│ │
|
2926
|
│ │
|
2927
|
│ │ #---------------------------------------------------------------------------
|
2928
|
│ │ # Application code.
|
2929
|
│ │ #---------------------------------------------------------------------------
|
2930
|
│ │ # Constants
|
2931
|
│ │ @@ -5899,62 +5867,62 @@
|
2932
|
│ │ files = [f.strip() for f in files.split('|') if f.strip()]
|
2933
|
│ │ files += confiles
|
2934
|
│ │ if files:
|
2935
|
│ │ for f in files:
|
2936
|
│ │ if os.path.isfile(f):
|
2937
|
│ │ config.load_file(f, include=include, exclude=exclude)
|
2938
|
│ │ else:
|
2939
|
│ │ - raise EAsciiDoc,'missing configuration file: %s' % f
|
2940
|
│ │ + raise EAsciiDoc('missing configuration file: %s' % f)
|
2941
|
│ │ try:
|
2942
|
│ │ document.attributes['python'] = sys.executable
|
2943
|
│ │ for f in config.filters:
|
2944
|
│ │ if not config.find_config_dir('filters', f):
|
2945
|
│ │ - raise EAsciiDoc,'missing filter: %s' % f
|
2946
|
│ │ + raise EAsciiDoc('missing filter: %s' % f)
|
2947
|
│ │ if doctype not in (None,'article','manpage','book'):
|
2948
|
│ │ - raise EAsciiDoc,'illegal document type'
|
2949
|
│ │ + raise EAsciiDoc('illegal document type')
|
2950
|
│ │ # Set processing options.
|
2951
|
│ │ for o in options:
|
2952
|
│ │ if o == '-c': config.dumping = True
|
2953
|
│ │ if o == '-s': config.header_footer = False
|
2954
|
│ │ if o == '-v': config.verbose = True
|
2955
|
│ │ document.update_attributes()
|
2956
|
│ │ if '-e' not in options:
|
2957
|
│ │ # Load asciidoc.conf files in two passes: the first for attributes
|
2958
|
│ │ # the second for everything. This is so that locally set attributes
|
2959
|
│ │ # available are in the global asciidoc.conf
|
2960
|
│ │ if not config.load_from_dirs('asciidoc.conf',include=['attributes']):
|
2961
|
│ │ - raise EAsciiDoc,'configuration file asciidoc.conf missing'
|
2962
|
│ │ + raise EAsciiDoc('configuration file asciidoc.conf missing')
|
2963
|
│ │ load_conffiles(include=['attributes'])
|
2964
|
│ │ config.load_from_dirs('asciidoc.conf')
|
2965
|
│ │ if infile != '<stdin>':
|
2966
|
│ │ indir = os.path.dirname(infile)
|
2967
|
│ │ config.load_file('asciidoc.conf', indir,
|
2968
|
│ │ include=['attributes','titles','specialchars'])
|
2969
|
│ │ else:
|
2970
|
│ │ load_conffiles(include=['attributes','titles','specialchars'])
|
2971
|
│ │ document.update_attributes()
|
2972
|
│ │ # Check the infile exists.
|
2973
|
│ │ if infile != '<stdin>':
|
2974
|
│ │ if not os.path.isfile(infile):
|
2975
|
│ │ - raise EAsciiDoc,'input file %s missing' % infile
|
2976
|
│ │ + raise EAsciiDoc('input file %s missing' % infile)
|
2977
|
│ │ document.infile = infile
|
2978
|
│ │ AttributeList.initialize()
|
2979
|
│ │ # Open input file and parse document header.
|
2980
|
│ │ reader.tabsize = config.tabsize
|
2981
|
│ │ reader.open(infile)
|
2982
|
│ │ has_header = document.parse_header(doctype,backend)
|
2983
|
│ │ # doctype is now finalized.
|
2984
|
│ │ document.attributes['doctype-'+document.doctype] = ''
|
2985
|
│ │ config.set_theme_attributes()
|
2986
|
│ │ # Load backend configuration files.
|
2987
|
│ │ if '-e' not in options:
|
2988
|
│ │ f = document.backend + '.conf'
|
2989
|
│ │ conffile = config.load_backend()
|
2990
|
│ │ if not conffile:
|
2991
|
│ │ - raise EAsciiDoc,'missing backend conf file: %s' % f
|
2992
|
│ │ + raise EAsciiDoc('missing backend conf file: %s' % f)
|
2993
|
│ │ document.attributes['backend-confdir'] = os.path.dirname(conffile)
|
2994
|
│ │ # backend is now known.
|
2995
|
│ │ document.attributes['backend-'+document.backend] = ''
|
2996
|
│ │ document.attributes[document.backend+'-'+document.doctype] = ''
|
2997
|
│ │ doc_conffiles = []
|
2998
|
│ │ if '-e' not in options:
|
2999
|
│ │ # Load filters and language file.
|
3000
|
│ │ @@ -5980,15 +5948,15 @@
|
3001
|
│ │ args += ' --conf-file "%s"' % f
|
3002
|
│ │ # Add command-line and header attributes.
|
3003
|
│ │ attrs = {}
|
3004
|
│ │ attrs.update(AttributeEntry.attributes)
|
3005
|
│ │ attrs.update(config.cmd_attrs)
|
3006
|
│ │ if 'title' in attrs: # Don't pass the header title.
|
3007
|
│ │ del attrs['title']
|
3008
|
│ │ - for k,v in attrs.items():
|
3009
|
│ │ + for k,v in list(attrs.items()):
|
3010
|
│ │ if v:
|
3011
|
│ │ args += ' --attribute "%s=%s"' % (k,v)
|
3012
|
│ │ else:
|
3013
|
│ │ args += ' --attribute "%s"' % k
|
3014
|
│ │ document.attributes['asciidoc-args'] = args
|
3015
|
│ │ # Build outfile name.
|
3016
|
│ │ if outfile is None:
|
3017
|
│ │ @@ -6023,15 +5991,15 @@
|
3018
|
│ │ document.translate(has_header) # Generate the output.
|
3019
|
│ │ finally:
|
3020
|
│ │ writer.close()
|
3021
|
│ │ finally:
|
3022
|
│ │ reader.closefile()
|
3023
|
│ │ except KeyboardInterrupt:
|
3024
|
│ │ raise
|
3025
|
│ │ - except Exception,e:
|
3026
|
│ │ + except Exception as e:
|
3027
|
│ │ # Cleanup.
|
3028
|
│ │ if outfile and outfile != '<stdout>' and os.path.isfile(outfile):
|
3029
|
│ │ os.unlink(outfile)
|
3030
|
│ │ # Build and print error description.
|
3031
|
│ │ msg = 'FAILED: '
|
3032
|
│ │ if reader.cursor:
|
3033
|
│ │ msg = message.format('', msg)
|
3034
|
│ │ @@ -6075,44 +6043,44 @@
|
3035
|
│ │ for k in config.sections:
|
3036
|
│ │ if re.match(re.escape(topic), k):
|
3037
|
│ │ n += 1
|
3038
|
│ │ lines = config.sections[k]
|
3039
|
│ │ if n == 0:
|
3040
|
│ │ if topic != 'topics':
|
3041
|
│ │ message.stderr('help topic not found: [%s] in %s' % (topic, help_file))
|
3042
|
│ │ - message.stderr('available help topics: %s' % ', '.join(config.sections.keys()))
|
3043
|
│ │ + message.stderr('available help topics: %s' % ', '.join(list(config.sections.keys())))
|
3044
|
│ │ sys.exit(1)
|
3045
|
│ │ elif n > 1:
|
3046
|
│ │ message.stderr('ambiguous help topic: %s' % topic)
|
3047
|
│ │ else:
|
3048
|
│ │ for line in lines:
|
3049
|
│ │ - print >>f, line
|
3050
|
│ │ + print(line, file=f)
|
3051
|
│ │
|
3052
|
│ │ ### Used by asciidocapi.py ###
|
3053
|
│ │ def execute(cmd,opts,args):
|
3054
|
│ │ """
|
3055
|
│ │ Execute asciidoc with command-line options and arguments.
|
3056
|
│ │ cmd is asciidoc command or asciidoc.py path.
|
3057
|
│ │ opts and args conform to values returned by getopt.getopt().
|
3058
|
│ │ Raises SystemExit if an error occurs.
|
3059
|
│ │
|
3060
|
│ │ Doctests:
|
3061
|
│ │
|
3062
|
│ │ 1. Check execution:
|
3063
|
│ │
|
3064
|
│ │ - >>> import StringIO
|
3065
|
│ │ - >>> infile = StringIO.StringIO('Hello *{author}*')
|
3066
|
│ │ - >>> outfile = StringIO.StringIO()
|
3067
|
│ │ + >>> import io
|
3068
|
│ │ + >>> infile = io.StringIO('Hello *{author}*')
|
3069
|
│ │ + >>> outfile = io.StringIO()
|
3070
|
│ │ >>> opts = []
|
3071
|
│ │ >>> opts.append(('--backend','html4'))
|
3072
|
│ │ >>> opts.append(('--no-header-footer',None))
|
3073
|
│ │ >>> opts.append(('--attribute','author=Joe Bloggs'))
|
3074
|
│ │ >>> opts.append(('--out-file',outfile))
|
3075
|
│ │ >>> execute(__file__, opts, [infile])
|
3076
|
│ │ - >>> print outfile.getvalue()
|
3077
|
│ │ + >>> print(outfile.getvalue())
|
3078
|
│ │ <p>Hello <strong>Joe Bloggs</strong></p>
|
3079
|
│ │
|
3080
|
│ │ >>>
|
3081
|
│ │
|
3082
|
│ │ """
|
3083
|
│ │ config.init(cmd)
|
3084
|
│ │ if len(args) > 1:
|
3085
|
│ │ @@ -6129,15 +6097,15 @@
|
3086
|
│ │ help_option = True
|
3087
|
│ │ #DEPRECATED: --unsafe option.
|
3088
|
│ │ if o == '--unsafe':
|
3089
|
│ │ document.safe = False
|
3090
|
│ │ if o == '--safe':
|
3091
|
│ │ document.safe = True
|
3092
|
│ │ if o == '--version':
|
3093
|
│ │ - print('asciidoc %s' % VERSION)
|
3094
|
│ │ + print(('asciidoc %s' % VERSION))
|
3095
|
│ │ sys.exit(0)
|
3096
|
│ │ if o in ('-b','--backend'):
|
3097
|
│ │ backend = v
|
3098
|
│ │ if o in ('-c','--dump-conf'):
|
3099
|
│ │ options.append('-c')
|
3100
|
│ │ if o in ('-d','--doctype'):
|
3101
|
│ │ doctype = v
|
3102
|
│ │ --- asciidoc-8.6.10/dblatex/asciidoc-dblatex.sty
|
3103
|
│ ├── +++ asciidoc-py-8.6.10/dblatex/asciidoc-dblatex.sty
|
3104
|
│ │┄ Files identical despite different names
|
3105
|
│ │ --- asciidoc-8.6.10/dblatex/asciidoc-dblatex.xsl
|
3106
|
│ ├── +++ asciidoc-py-8.6.10/dblatex/asciidoc-dblatex.xsl
|
3107
|
│ │┄ Files identical despite different names
|
3108
|
│ │ --- asciidoc-8.6.10/dblatex/dblatex-readme.txt
|
3109
|
│ ├── +++ asciidoc-py-8.6.10/dblatex/dblatex-readme.txt
|
3110
|
│ │┄ Files identical despite different names
|
3111
|
│ │ --- asciidoc-8.6.10/doc/a2x.1.txt
|
3112
|
│ ├── +++ asciidoc-py-8.6.10/doc/a2x.1.txt
|
3113
|
│ │┄ Files identical despite different names
|
3114
|
│ │ --- asciidoc-8.6.10/doc/article-docinfo.xml
|
3115
|
│ ├── +++ asciidoc-py-8.6.10/doc/article-docinfo.xml
|
3116
|
│ │┄ Files identical despite different names
|
3117
|
│ │ --- asciidoc-8.6.10/doc/article.txt
|
3118
|
│ ├── +++ asciidoc-py-8.6.10/doc/article.txt
|
3119
|
│ │┄ Files identical despite different names
|
3120
|
│ │ --- asciidoc-8.6.10/doc/asciidoc.1.txt
|
3121
|
│ ├── +++ asciidoc-py-8.6.10/doc/asciidoc.1.txt
|
3122
|
│ │┄ Files identical despite different names
|
3123
|
│ │ --- asciidoc-8.6.10/doc/asciidoc.dict
|
3124
|
│ ├── +++ asciidoc-py-8.6.10/doc/asciidoc.dict
|
3125
|
│ │┄ Files identical despite different names
|
3126
|
│ │ --- asciidoc-8.6.10/doc/asciidoc.txt
|
3127
|
│ ├── +++ asciidoc-py-8.6.10/doc/asciidoc.txt
|
3128
|
│ │┄ Files identical despite different names
|
3129
|
│ │ --- asciidoc-8.6.10/doc/asciidocapi.txt
|
3130
|
│ ├── +++ asciidoc-py-8.6.10/doc/asciidocapi.txt
|
3131
|
│ │┄ Files identical despite different names
|
3132
|
│ │ --- asciidoc-8.6.10/doc/asciimathml.txt
|
3133
|
│ ├── +++ asciidoc-py-8.6.10/doc/asciimathml.txt
|
3134
|
│ │┄ Files identical despite different names
|
3135
|
│ │ --- asciidoc-8.6.10/doc/book-multi.txt
|
3136
|
│ ├── +++ asciidoc-py-8.6.10/doc/book-multi.txt
|
3137
|
│ │┄ Files identical despite different names
|
3138
|
│ │ --- asciidoc-8.6.10/doc/book.txt
|
3139
|
│ ├── +++ asciidoc-py-8.6.10/doc/book.txt
|
3140
|
│ │┄ Files identical despite different names
|
3141
|
│ │ --- asciidoc-8.6.10/doc/customers.csv
|
3142
|
│ ├── +++ asciidoc-py-8.6.10/doc/customers.csv
|
3143
|
│ │┄ Files identical despite different names
|
3144
|
│ │ --- asciidoc-8.6.10/doc/epub-notes.txt
|
3145
|
│ ├── +++ asciidoc-py-8.6.10/doc/epub-notes.txt
|
3146
|
│ │┄ Files identical despite different names
|
3147
|
│ │ --- asciidoc-8.6.10/doc/faq.txt
|
3148
|
│ ├── +++ asciidoc-py-8.6.10/doc/faq.txt
|
3149
|
│ │┄ Files identical despite different names
|
3150
|
│ │ --- asciidoc-8.6.10/doc/latex-backend.txt
|
3151
|
│ ├── +++ asciidoc-py-8.6.10/doc/latex-backend.txt
|
3152
|
│ │┄ Files identical despite different names
|
3153
|
│ │ --- asciidoc-8.6.10/doc/latex-bugs.txt
|
3154
|
│ ├── +++ asciidoc-py-8.6.10/doc/latex-bugs.txt
|
3155
|
│ │┄ Files identical despite different names
|
3156
|
│ │ --- asciidoc-8.6.10/doc/latex-filter.txt
|
3157
|
│ ├── +++ asciidoc-py-8.6.10/doc/latex-filter.txt
|
3158
|
│ │┄ Files identical despite different names
|
3159
|
│ │ --- asciidoc-8.6.10/doc/latexmath.txt
|
3160
|
│ ├── +++ asciidoc-py-8.6.10/doc/latexmath.txt
|
3161
|
│ │┄ Files identical despite different names
|
3162
|
│ │ --- asciidoc-8.6.10/doc/latexmathml.txt
|
3163
|
│ ├── +++ asciidoc-py-8.6.10/doc/latexmathml.txt
|
3164
|
│ │┄ Files identical despite different names
|
3165
|
│ │ --- asciidoc-8.6.10/doc/main.aap
|
3166
|
│ ├── +++ asciidoc-py-8.6.10/doc/main.aap
|
3167
|
│ │┄ Files identical despite different names
|
3168
|
│ │ --- asciidoc-8.6.10/doc/music-filter.txt
|
3169
|
│ ├── +++ asciidoc-py-8.6.10/doc/music-filter.txt
|
3170
|
│ │┄ Files identical despite different names
|
3171
|
│ │ --- asciidoc-8.6.10/doc/publishing-ebooks-with-asciidoc.txt
|
3172
|
│ ├── +++ asciidoc-py-8.6.10/doc/publishing-ebooks-with-asciidoc.txt
|
3173
|
│ │┄ Files identical despite different names
|
3174
|
│ │ --- asciidoc-8.6.10/doc/slidy-example.txt
|
3175
|
│ ├── +++ asciidoc-py-8.6.10/doc/slidy-example.txt
|
3176
|
│ │┄ Files identical despite different names
|
3177
|
│ │ --- asciidoc-8.6.10/doc/slidy.txt
|
3178
|
│ ├── +++ asciidoc-py-8.6.10/doc/slidy.txt
|
3179
|
│ │┄ Files identical despite different names
|
3180
|
│ │ --- asciidoc-8.6.10/doc/source-highlight-filter.txt
|
3181
|
│ ├── +++ asciidoc-py-8.6.10/doc/source-highlight-filter.txt
|
3182
|
│ │┄ Files identical despite different names
|
3183
|
│ │ --- asciidoc-8.6.10/doc/testasciidoc.txt
|
3184
|
│ ├── +++ asciidoc-py-8.6.10/doc/testasciidoc.txt
|
3185
|
│ │┄ Files identical despite different names
|
3186
|
│ │ --- asciidoc-8.6.10/docbook-xsl/asciidoc-docbook-xsl.txt
|
3187
|
│ ├── +++ asciidoc-py-8.6.10/docbook-xsl/asciidoc-docbook-xsl.txt
|
3188
|
│ │┄ Files identical despite different names
|
3189
|
│ │ --- asciidoc-8.6.10/docbook-xsl/chunked.xsl
|
3190
|
│ ├── +++ asciidoc-py-8.6.10/docbook-xsl/chunked.xsl
|
3191
|
│ │┄ Files identical despite different names
|
3192
|
│ │ --- asciidoc-8.6.10/docbook-xsl/common.xsl
|
3193
|
│ ├── +++ asciidoc-py-8.6.10/docbook-xsl/common.xsl
|
3194
|
│ │┄ Files identical despite different names
|
3195
|
│ │ --- asciidoc-8.6.10/docbook-xsl/epub.xsl
|
3196
|
│ ├── +++ asciidoc-py-8.6.10/docbook-xsl/epub.xsl
|
3197
|
│ │┄ Files identical despite different names
|
3198
|
│ │ --- asciidoc-8.6.10/docbook-xsl/fo.xsl
|
3199
|
│ ├── +++ asciidoc-py-8.6.10/docbook-xsl/fo.xsl
|
3200
|
│ │┄ Files identical despite different names
|
3201
|
│ │ --- asciidoc-8.6.10/docbook-xsl/htmlhelp.xsl
|
3202
|
│ ├── +++ asciidoc-py-8.6.10/docbook-xsl/htmlhelp.xsl
|
3203
|
│ │┄ Files identical despite different names
|
3204
|
│ │ --- asciidoc-8.6.10/docbook-xsl/manpage.xsl
|
3205
|
│ ├── +++ asciidoc-py-8.6.10/docbook-xsl/manpage.xsl
|
3206
|
│ │┄ Files identical despite different names
|
3207
|
│ │ --- asciidoc-8.6.10/docbook-xsl/text.xsl
|
3208
|
│ ├── +++ asciidoc-py-8.6.10/docbook-xsl/text.xsl
|
3209
|
│ │┄ Files identical despite different names
|
3210
|
│ │ --- asciidoc-8.6.10/docbook-xsl/xhtml.xsl
|
3211
|
│ ├── +++ asciidoc-py-8.6.10/docbook-xsl/xhtml.xsl
|
3212
|
│ │┄ Files identical despite different names
|
3213
|
│ │ --- asciidoc-8.6.10/docbook45.conf
|
3214
|
│ ├── +++ asciidoc-py-8.6.10/docbook45.conf
|
3215
|
│ │┄ Files identical despite different names
|
3216
|
│ │ --- asciidoc-8.6.10/examples/website/README-website.txt
|
3217
|
│ ├── +++ asciidoc-py-8.6.10/examples/website/README-website.txt
|
3218
|
│ │┄ Files identical despite different names
|
3219
|
│ │ --- asciidoc-8.6.10/examples/website/asciidoc-website.dict
|
3220
|
│ ├── +++ asciidoc-py-8.6.10/examples/website/asciidoc-website.dict
|
3221
|
│ │┄ Files identical despite different names
|
3222
|
│ │ --- asciidoc-8.6.10/examples/website/build-website.sh
|
3223
|
│ ├── +++ asciidoc-py-8.6.10/examples/website/build-website.sh
|
3224
|
│ │┄ Files identical despite different names
|
3225
|
│ │ --- asciidoc-8.6.10/examples/website/customers.csv
|
3226
|
│ ├── +++ asciidoc-py-8.6.10/examples/website/customers.csv
|
3227
|
│ │┄ Files identical despite different names
|
3228
|
│ │ --- asciidoc-8.6.10/examples/website/favicon.ico
|
3229
|
│ ├── +++ asciidoc-py-8.6.10/examples/website/favicon.ico
|
3230
|
│ │┄ Files identical despite different names
|
3231
|
│ │ --- asciidoc-8.6.10/examples/website/index.txt
|
3232
|
│ ├── +++ asciidoc-py-8.6.10/examples/website/index.txt
|
3233
|
│ │┄ Files identical despite different names
|
3234
|
│ │ --- asciidoc-8.6.10/examples/website/layout1.conf
|
3235
|
│ ├── +++ asciidoc-py-8.6.10/examples/website/layout1.conf
|
3236
|
│ │┄ Files identical despite different names
|
3237
|
│ │ --- asciidoc-8.6.10/examples/website/layout1.css
|
3238
|
│ ├── +++ asciidoc-py-8.6.10/examples/website/layout1.css
|
3239
|
│ │┄ Files identical despite different names
|
3240
|
│ │ --- asciidoc-8.6.10/examples/website/layout2.conf
|
3241
|
│ ├── +++ asciidoc-py-8.6.10/examples/website/layout2.conf
|
3242
|
│ │┄ Files identical despite different names
|
3243
|
│ │ --- asciidoc-8.6.10/examples/website/layout2.css
|
3244
|
│ ├── +++ asciidoc-py-8.6.10/examples/website/layout2.css
|
3245
|
│ │┄ Files identical despite different names
|
3246
|
│ │ --- asciidoc-8.6.10/examples/website/main.aap
|
3247
|
│ ├── +++ asciidoc-py-8.6.10/examples/website/main.aap
|
3248
|
│ │┄ Files identical despite different names
|
3249
|
│ │ --- asciidoc-8.6.10/examples/website/newlists.txt
|
3250
|
│ ├── +++ asciidoc-py-8.6.10/examples/website/newlists.txt
|
3251
|
│ │┄ Files identical despite different names
|
3252
|
│ │ --- asciidoc-8.6.10/examples/website/newtables.txt
|
3253
|
│ ├── +++ asciidoc-py-8.6.10/examples/website/newtables.txt
|
3254
|
│ │┄ Files identical despite different names
|
3255
|
│ │ --- asciidoc-8.6.10/examples/website/plugins.txt
|
3256
|
│ ├── +++ asciidoc-py-8.6.10/examples/website/plugins.txt
|
3257
|
│ │┄ Files identical despite different names
|
3258
|
│ │ --- asciidoc-8.6.10/examples/website/version83.txt
|
3259
|
│ ├── +++ asciidoc-py-8.6.10/examples/website/version83.txt
|
3260
|
│ │┄ Files identical despite different names
|
3261
|
│ │ --- asciidoc-8.6.10/filters/code/code-filter-readme.txt
|
3262
|
│ ├── +++ asciidoc-py-8.6.10/filters/code/code-filter-readme.txt
|
3263
|
│ │┄ Files identical despite different names
|
3264
|
│ │ --- asciidoc-8.6.10/filters/code/code-filter.py
|
3265
|
│ ├── +++ asciidoc-py-8.6.10/filters/code/code-filter.py
|
3266
|
│ │┄ Files 2% similar despite different names
|
3267
|
│ │ @@ -46,15 +46,15 @@
|
3268
|
│ │ http://asciidoc.org/
|
3269
|
│ │
|
3270
|
│ │ COPYING
|
3271
|
│ │ Copyright (C) 2002-2006 Stuart Rackham. Free use of this software is
|
3272
|
│ │ granted under the terms of the GNU General Public License (GPL).
|
3273
|
│ │ '''
|
3274
|
│ │
|
3275
|
│ │ -import os, sys, re, string
|
3276
|
│ │ +import os, sys, re
|
3277
|
│ │
|
3278
|
│ │ VERSION = '1.1.2'
|
3279
|
│ │
|
3280
|
│ │ # Globals.
|
3281
|
│ │ language = None
|
3282
|
│ │ backend = None
|
3283
|
│ │ tabsize = 8
|
3284
|
│ │ @@ -134,20 +134,20 @@
|
3285
|
│ │ blk_comment = (re.escape(block_comments[language][0]),
|
3286
|
│ │ re.escape(block_comments[language][1]))
|
3287
|
│ │ stag,etag = commenttags[backend]
|
3288
|
│ │ in_comment = 0 # True if we're inside a multi-line block comment.
|
3289
|
│ │ tag_comment = 0 # True if we should tag the current line as a comment.
|
3290
|
│ │ line = sys.stdin.readline()
|
3291
|
│ │ while line:
|
3292
|
│ │ - line = string.rstrip(line)
|
3293
|
│ │ - line = string.expandtabs(line,tabsize)
|
3294
|
│ │ + line = line.rstrip()
|
3295
|
│ │ + line = line.expandtabs(tabsize)
|
3296
|
│ │ # Escape special characters.
|
3297
|
│ │ - line = string.replace(line,'&','&')
|
3298
|
│ │ - line = string.replace(line,'<','<')
|
3299
|
│ │ - line = string.replace(line,'>','>')
|
3300
|
│ │ + line = line.replace('&','&')
|
3301
|
│ │ + line = line.replace('<','<')
|
3302
|
│ │ + line = line.replace('>','>')
|
3303
|
│ │ # Process block comment.
|
3304
|
│ │ if blk_comment:
|
3305
|
│ │ if in_comment:
|
3306
|
│ │ if re.match(r'.*'+blk_comment[1]+r'$',line):
|
3307
|
│ │ in_comment = 0
|
3308
|
│ │ else:
|
3309
|
│ │ if re.match(r'^\s*'+blk_comment[0]+r'.*'+blk_comment[1],line):
|
3310
|
│ │ @@ -159,15 +159,15 @@
|
3311
|
│ │ in_comment = 1
|
3312
|
│ │ else:
|
3313
|
│ │ tag_comment = 0
|
3314
|
│ │ if tag_comment:
|
3315
|
│ │ if line: line = stag+line+etag
|
3316
|
│ │ else:
|
3317
|
│ │ if inline_comment:
|
3318
|
│ │ - pos = string.find(line,inline_comment)
|
3319
|
│ │ + pos = line.find(inline_comment)
|
3320
|
│ │ else:
|
3321
|
│ │ pos = -1
|
3322
|
│ │ if pos >= 0:
|
3323
|
│ │ # Process inline comment.
|
3324
|
│ │ line = re.sub(r'\b(?P<word>\w+)\b',sub_keyword,line[:pos]) \
|
3325
|
│ │ + stag + line[pos:] + etag
|
3326
|
│ │ else:
|
3327
|
│ │ @@ -189,43 +189,43 @@
|
3328
|
│ │ 'b:l:ht:v',
|
3329
|
│ │ ['help','version'])
|
3330
|
│ │ if len(args) > 0:
|
3331
|
│ │ usage()
|
3332
|
│ │ sys.exit(1)
|
3333
|
│ │ for o,v in opts:
|
3334
|
│ │ if o in ('--help','-h'):
|
3335
|
│ │ - print __doc__
|
3336
|
│ │ + print(__doc__)
|
3337
|
│ │ sys.exit(0)
|
3338
|
│ │ if o in ('--version','-v'):
|
3339
|
│ │ print('code-filter version %s' % (VERSION,))
|
3340
|
│ │ sys.exit(0)
|
3341
|
│ │ if o == '-b': backend = v
|
3342
|
│ │ if o == '-l':
|
3343
|
│ │ - v = string.lower(v)
|
3344
|
│ │ + v = v.lower()
|
3345
|
│ │ if v == 'c': v = 'c++'
|
3346
|
│ │ language = v
|
3347
|
│ │ if o == '-t':
|
3348
|
│ │ try:
|
3349
|
│ │ tabsize = int(v)
|
3350
|
│ │ except:
|
3351
|
│ │ usage('illegal tabsize')
|
3352
|
│ │ sys.exit(1)
|
3353
|
│ │ if tabsize <= 0:
|
3354
|
│ │ usage('illegal tabsize')
|
3355
|
│ │ sys.exit(1)
|
3356
|
│ │ if backend is None:
|
3357
|
│ │ usage('backend option is mandatory')
|
3358
|
│ │ sys.exit(1)
|
3359
|
│ │ - if not keywordtags.has_key(backend):
|
3360
|
│ │ + if backend not in keywordtags:
|
3361
|
│ │ usage('illegal backend option')
|
3362
|
│ │ sys.exit(1)
|
3363
|
│ │ if language is None:
|
3364
|
│ │ usage('language option is mandatory')
|
3365
|
│ │ sys.exit(1)
|
3366
|
│ │ - if not keywords.has_key(language):
|
3367
|
│ │ + if language not in keywords:
|
3368
|
│ │ usage('illegal language option')
|
3369
|
│ │ sys.exit(1)
|
3370
|
│ │ # Do the work.
|
3371
|
│ │ code_filter()
|
3372
|
│ │
|
3373
|
│ │ if __name__ == "__main__":
|
3374
|
│ │ try:
|
3375
|
│ │ --- asciidoc-8.6.10/filters/graphviz/asciidoc-graphviz-sample.txt
|
3376
|
│ ├── +++ asciidoc-py-8.6.10/filters/graphviz/asciidoc-graphviz-sample.txt
|
3377
|
│ │┄ Files identical despite different names
|
3378
|
│ │ --- asciidoc-8.6.10/filters/graphviz/graphviz-filter.conf
|
3379
|
│ ├── +++ asciidoc-py-8.6.10/filters/graphviz/graphviz-filter.conf
|
3380
|
│ │┄ Files identical despite different names
|
3381
|
│ │ --- asciidoc-8.6.10/filters/graphviz/graphviz2png.py
|
3382
|
│ ├── +++ asciidoc-py-8.6.10/filters/graphviz/graphviz2png.py
|
3383
|
│ │┄ Files 2% similar despite different names
|
3384
|
│ │ @@ -61,15 +61,15 @@
|
3385
|
│ │ Copyright (C) 2008-2009 Gouichi Iisaka.
|
3386
|
│ │ Free use of this software is granted under the terms of
|
3387
|
│ │ the GNU General Public License (GPL).
|
3388
|
│ │ '''
|
3389
|
│ │
|
3390
|
│ │ def __init__(self, argv=None):
|
3391
|
│ │ # Run dot, get the list of supported formats. It's prefixed by some junk.
|
3392
|
│ │ - format_output = subprocess.Popen(["dot", "-T?"], stderr=subprocess.PIPE, stdout=subprocess.PIPE).communicate()[1]
|
3393
|
│ │ + format_output = str( subprocess.Popen(["dot", "-T?"], stderr=subprocess.PIPE, stdout=subprocess.PIPE).communicate()[1] )
|
3394
|
│ │ # The junk contains : and ends with :. So we split it, then strip the final endline, then split the list for future usage.
|
3395
|
│ │ supported_formats = format_output.split(": ")[2][:-1].split(" ")
|
3396
|
│ │
|
3397
|
│ │ if not argv:
|
3398
|
│ │ argv = sys.argv
|
3399
|
│ │
|
3400
|
│ │ self.usage = '%prog [options] inputfile'
|
3401
|
│ │ @@ -109,25 +109,25 @@
|
3402
|
│ │ def systemcmd(self, cmd):
|
3403
|
│ │ if self.options.do_verbose:
|
3404
|
│ │ msg = 'Execute: %s' % cmd
|
3405
|
│ │ sys.stderr.write(msg + os.linesep)
|
3406
|
│ │ else:
|
3407
|
│ │ cmd += ' 2>%s' % os.devnull
|
3408
|
│ │ if os.system(cmd):
|
3409
|
│ │ - raise EApp, 'failed command: %s' % cmd
|
3410
|
│ │ + raise EApp('failed command: %s' % cmd)
|
3411
|
│ │
|
3412
|
│ │ def graphviz2png(self, infile, outfile):
|
3413
|
│ │ '''Convert Graphviz notation in file infile to
|
3414
|
│ │ PNG file named outfile.'''
|
3415
|
│ │
|
3416
|
│ │ outfile = os.path.abspath(outfile)
|
3417
|
│ │ outdir = os.path.dirname(outfile)
|
3418
|
│ │
|
3419
|
│ │ if not os.path.isdir(outdir):
|
3420
|
│ │ - raise EApp, 'directory does not exist: %s' % outdir
|
3421
|
│ │ + raise EApp('directory does not exist: %s' % outdir)
|
3422
|
│ │
|
3423
|
│ │ basefile = os.path.splitext(outfile)[0]
|
3424
|
│ │ saved_cwd = os.getcwd()
|
3425
|
│ │ os.chdir(outdir)
|
3426
|
│ │ try:
|
3427
|
│ │ cmd = '%s -T%s "%s" > "%s"' % (
|
3428
|
│ │ self.options.layout, self.options.format, infile, outfile)
|
3429
|
│ │ @@ -147,15 +147,15 @@
|
3430
|
│ │ sys.stderr.write('OUTFILE must be specified')
|
3431
|
│ │ sys.exit(1)
|
3432
|
│ │ infile = os.path.splitext(self.options.outfile)[0] + '.txt'
|
3433
|
│ │ lines = sys.stdin.readlines()
|
3434
|
│ │ open(infile, 'w').writelines(lines)
|
3435
|
│ │
|
3436
|
│ │ if not os.path.isfile(infile):
|
3437
|
│ │ - raise EApp, 'input file does not exist: %s' % infile
|
3438
|
│ │ + raise EApp('input file does not exist: %s' % infile)
|
3439
|
│ │
|
3440
|
│ │ if self.options.outfile is None:
|
3441
|
│ │ outfile = os.path.splitext(infile)[0] + '.png'
|
3442
|
│ │ else:
|
3443
|
│ │ outfile = self.options.outfile
|
3444
|
│ │
|
3445
|
│ │ self.graphviz2png(infile, outfile)
|
3446
|
│ │ --- asciidoc-8.6.10/filters/latex/latex-filter.conf
|
3447
|
│ ├── +++ asciidoc-py-8.6.10/filters/latex/latex-filter.conf
|
3448
|
│ │┄ Files identical despite different names
|
3449
|
│ │ --- asciidoc-8.6.10/filters/latex/latex2img.py
|
3450
|
│ ├── +++ asciidoc-py-8.6.10/filters/latex/latex2img.py
|
3451
|
│ │┄ Files 3% similar despite different names
|
3452
|
│ │ @@ -54,19 +54,16 @@
|
3453
|
│ │ http://code.google.com/p/latexmath2png/
|
3454
|
│ │
|
3455
|
│ │ COPYING
|
3456
|
│ │ Copyright (C) 2010 Stuart Rackham. Free use of this software is
|
3457
|
│ │ granted under the terms of the MIT License.
|
3458
|
│ │ '''
|
3459
|
│ │
|
3460
|
│ │ -# Suppress warning: "the md5 module is deprecated; use hashlib instead"
|
3461
|
│ │ -import warnings
|
3462
|
│ │ -warnings.simplefilter('ignore',DeprecationWarning)
|
3463
|
│ │ -
|
3464
|
│ │ -import os, sys, tempfile, md5
|
3465
|
│ │ +import os, sys, tempfile
|
3466
|
│ │ +from hashlib import md5
|
3467
|
│ │
|
3468
|
│ │ VERSION = '0.2.0'
|
3469
|
│ │
|
3470
|
│ │ # Include LaTeX packages and commands here.
|
3471
|
│ │ TEX_HEADER = r'''\documentclass{article}
|
3472
|
│ │ \usepackage{amsmath}
|
3473
|
│ │ \usepackage{amsthm}
|
3474
|
│ │ @@ -110,40 +107,40 @@
|
3475
|
│ │ global verbose
|
3476
|
│ │ if verbose:
|
3477
|
│ │ cmd += ' 1>&2'
|
3478
|
│ │ else:
|
3479
|
│ │ cmd += ' 2>%s 1>&2' % os.devnull
|
3480
|
│ │ print_verbose('executing: %s' % cmd)
|
3481
|
│ │ if os.system(cmd):
|
3482
|
│ │ - raise EApp, 'failed command: %s' % cmd
|
3483
|
│ │ + raise EApp('failed command: %s' % cmd)
|
3484
|
│ │
|
3485
|
│ │ def latex2img(infile, outfile, imgfmt, dpi, modified):
|
3486
|
│ │ '''
|
3487
|
│ │ Convert LaTeX input file infile to image file named outfile.
|
3488
|
│ │ '''
|
3489
|
│ │ outfile = os.path.abspath(outfile)
|
3490
|
│ │ outdir = os.path.dirname(outfile)
|
3491
|
│ │ if not os.path.isdir(outdir):
|
3492
|
│ │ - raise EApp, 'directory does not exist: %s' % outdir
|
3493
|
│ │ + raise EApp('directory does not exist: %s' % outdir)
|
3494
|
│ │ texfile = tempfile.mktemp(suffix='.tex', dir=os.path.dirname(outfile))
|
3495
|
│ │ basefile = os.path.splitext(texfile)[0]
|
3496
|
│ │ dvifile = basefile + '.dvi'
|
3497
|
│ │ temps = [basefile + ext for ext in ('.tex','.dvi', '.aux', '.log')]
|
3498
|
│ │ skip = False
|
3499
|
│ │ if infile == '-':
|
3500
|
│ │ tex = sys.stdin.read()
|
3501
|
│ │ if modified:
|
3502
|
│ │ - checksum = md5.new(tex + imgfmt + str(dpi)).digest()
|
3503
|
│ │ + checksum = md5((tex + imgfmt + str(dpi)).encode('utf-8')).digest()
|
3504
|
│ │ md5_file = os.path.splitext(outfile)[0] + '.md5'
|
3505
|
│ │ if os.path.isfile(md5_file) and os.path.isfile(outfile) and \
|
3506
|
│ │ checksum == read_file(md5_file,'rb'):
|
3507
|
│ │ skip = True
|
3508
|
│ │ else:
|
3509
|
│ │ if not os.path.isfile(infile):
|
3510
|
│ │ - raise EApp, 'input file does not exist: %s' % infile
|
3511
|
│ │ + raise EApp('input file does not exist: %s' % infile)
|
3512
|
│ │ tex = read_file(infile)
|
3513
|
│ │ if modified and os.path.isfile(outfile) and \
|
3514
|
│ │ os.path.getmtime(infile) <= os.path.getmtime(outfile):
|
3515
|
│ │ skip = True
|
3516
|
│ │ if skip:
|
3517
|
│ │ print_verbose('skipped: no change: %s' % outfile)
|
3518
|
│ │ return
|
3519
|
│ │ @@ -203,18 +200,18 @@
|
3520
|
│ │ outfile = None
|
3521
|
│ │ imgfmt = 'png'
|
3522
|
│ │ modified = False
|
3523
|
│ │ import getopt
|
3524
|
│ │ opts,args = getopt.getopt(sys.argv[1:], 'D:o:mhvf:', ['help','version'])
|
3525
|
│ │ for o,v in opts:
|
3526
|
│ │ if o in ('--help','-h'):
|
3527
|
│ │ - print __doc__
|
3528
|
│ │ + print(__doc__)
|
3529
|
│ │ sys.exit(0)
|
3530
|
│ │ if o =='--version':
|
3531
|
│ │ - print('latex2img version %s' % (VERSION,))
|
3532
|
│ │ + print(('latex2img version %s' % (VERSION,)))
|
3533
|
│ │ sys.exit(0)
|
3534
|
│ │ if o == '-D': dpi = v
|
3535
|
│ │ if o == '-o': outfile = v
|
3536
|
│ │ if o == '-m': modified = True
|
3537
|
│ │ if o == '-v': verbose = True
|
3538
|
│ │ if o == '-f': imgfmt = v
|
3539
|
│ │ if len(args) != 1:
|
3540
|
│ │ @@ -241,10 +238,10 @@
|
3541
|
│ │ if __name__ == "__main__":
|
3542
|
│ │ try:
|
3543
|
│ │ main()
|
3544
|
│ │ except SystemExit:
|
3545
|
│ │ raise
|
3546
|
│ │ except KeyboardInterrupt:
|
3547
|
│ │ sys.exit(1)
|
3548
|
│ │ - except Exception, e:
|
3549
|
│ │ + except Exception as e:
|
3550
|
│ │ print_stderr("%s: %s" % (os.path.basename(sys.argv[0]), str(e)))
|
3551
|
│ │ sys.exit(1)
|
3552
|
│ │ --- asciidoc-8.6.10/filters/music/music-filter-test.txt
|
3553
|
│ ├── +++ asciidoc-py-8.6.10/filters/music/music-filter-test.txt
|
3554
|
│ │┄ Files identical despite different names
|
3555
|
│ │ --- asciidoc-8.6.10/filters/music/music-filter.conf
|
3556
|
│ ├── +++ asciidoc-py-8.6.10/filters/music/music-filter.conf
|
3557
|
│ │┄ Files identical despite different names
|
3558
|
│ │ --- asciidoc-8.6.10/filters/music/music2png.py
|
3559
|
│ ├── +++ asciidoc-py-8.6.10/filters/music/music2png.py
|
3560
|
│ │┄ Files 5% similar despite different names
|
3561
|
│ │ @@ -46,19 +46,16 @@
|
3562
|
│ │ Written by Stuart Rackham, <srackham@gmail.com>
|
3563
|
│ │
|
3564
|
│ │ COPYING
|
3565
|
│ │ Copyright (C) 2006 Stuart Rackham. Free use of this software is
|
3566
|
│ │ granted under the terms of the GNU General Public License (GPL).
|
3567
|
│ │ '''
|
3568
|
│ │
|
3569
|
│ │ -# Suppress warning: "the md5 module is deprecated; use hashlib instead"
|
3570
|
│ │ -import warnings
|
3571
|
│ │ -warnings.simplefilter('ignore',DeprecationWarning)
|
3572
|
│ │ -
|
3573
|
│ │ -import os, sys, tempfile, md5
|
3574
|
│ │ +import os, sys, tempfile
|
3575
|
│ │ +from hashlib import md5
|
3576
|
│ │
|
3577
|
│ │ VERSION = '0.1.2'
|
3578
|
│ │
|
3579
|
│ │ # Globals.
|
3580
|
│ │ verbose = False
|
3581
|
│ │
|
3582
|
│ │ class EApp(Exception): pass # Application specific exception.
|
3583
|
│ │ @@ -86,38 +83,38 @@
|
3584
|
│ │
|
3585
|
│ │ def run(cmd):
|
3586
|
│ │ global verbose
|
3587
|
│ │ if not verbose:
|
3588
|
│ │ cmd += ' 2>%s' % os.devnull
|
3589
|
│ │ print_verbose('executing: %s' % cmd)
|
3590
|
│ │ if os.system(cmd):
|
3591
|
│ │ - raise EApp, 'failed command: %s' % cmd
|
3592
|
│ │ + raise EApp('failed command: %s' % cmd)
|
3593
|
│ │
|
3594
|
│ │ def music2png(format, infile, outfile, modified):
|
3595
|
│ │ '''Convert ABC notation in file infile to cropped PNG file named outfile.'''
|
3596
|
│ │ outfile = os.path.abspath(outfile)
|
3597
|
│ │ outdir = os.path.dirname(outfile)
|
3598
|
│ │ if not os.path.isdir(outdir):
|
3599
|
│ │ - raise EApp, 'directory does not exist: %s' % outdir
|
3600
|
│ │ + raise EApp('directory does not exist: %s' % outdir)
|
3601
|
│ │ basefile = tempfile.mktemp(dir=os.path.dirname(outfile))
|
3602
|
│ │ temps = [basefile + ext for ext in ('.abc', '.ly', '.ps', '.midi')]
|
3603
|
│ │ skip = False
|
3604
|
│ │ if infile == '-':
|
3605
|
│ │ source = sys.stdin.read()
|
3606
|
│ │ - checksum = md5.new(source).digest()
|
3607
|
│ │ + checksum = md5(source.encode('utf-8')).digest()
|
3608
|
│ │ filename = os.path.splitext(outfile)[0] + '.md5'
|
3609
|
│ │ if modified:
|
3610
|
│ │ if os.path.isfile(filename) and os.path.isfile(outfile) and \
|
3611
|
│ │ checksum == read_file(filename,'rb'):
|
3612
|
│ │ skip = True
|
3613
|
│ │ else:
|
3614
|
│ │ write_file(filename, checksum, 'wb')
|
3615
|
│ │ else:
|
3616
|
│ │ if not os.path.isfile(infile):
|
3617
|
│ │ - raise EApp, 'input file does not exist: %s' % infile
|
3618
|
│ │ + raise EApp('input file does not exist: %s' % infile)
|
3619
|
│ │ if modified and os.path.isfile(outfile) and \
|
3620
|
│ │ os.path.getmtime(infile) <= os.path.getmtime(outfile):
|
3621
|
│ │ skip = True
|
3622
|
│ │ source = read_file(infile)
|
3623
|
│ │ if skip:
|
3624
|
│ │ print_verbose('skipped: no change: %s' % outfile)
|
3625
|
│ │ return
|
3626
|
│ │ @@ -170,18 +167,18 @@
|
3627
|
│ │ format = None
|
3628
|
│ │ outfile = None
|
3629
|
│ │ modified = False
|
3630
|
│ │ import getopt
|
3631
|
│ │ opts,args = getopt.getopt(sys.argv[1:], 'f:o:mhv', ['help','version'])
|
3632
|
│ │ for o,v in opts:
|
3633
|
│ │ if o in ('--help','-h'):
|
3634
|
│ │ - print __doc__
|
3635
|
│ │ + print(__doc__)
|
3636
|
│ │ sys.exit(0)
|
3637
|
│ │ if o =='--version':
|
3638
|
│ │ - print('music2png version %s' % (VERSION,))
|
3639
|
│ │ + print(('music2png version %s' % (VERSION,)))
|
3640
|
│ │ sys.exit(0)
|
3641
|
│ │ if o == '-f': format = v
|
3642
|
│ │ if o == '-o': outfile = v
|
3643
|
│ │ if o == '-m': modified = True
|
3644
|
│ │ if o == '-v': verbose = True
|
3645
|
│ │ if len(args) != 1:
|
3646
|
│ │ usage()
|
3647
|
│ │ @@ -204,10 +201,10 @@
|
3648
|
│ │ if __name__ == "__main__":
|
3649
|
│ │ try:
|
3650
|
│ │ main()
|
3651
|
│ │ except SystemExit:
|
3652
|
│ │ raise
|
3653
|
│ │ except KeyboardInterrupt:
|
3654
|
│ │ sys.exit(1)
|
3655
|
│ │ - except Exception, e:
|
3656
|
│ │ + except Exception as e:
|
3657
|
│ │ print_stderr("%s: %s" % (os.path.basename(sys.argv[0]), str(e)))
|
3658
|
│ │ sys.exit(1)
|
3659
|
│ │ --- asciidoc-8.6.10/filters/source/source-highlight-filter-test.txt
|
3660
|
│ ├── +++ asciidoc-py-8.6.10/filters/source/source-highlight-filter-test.txt
|
3661
|
│ │┄ Files identical despite different names
|
3662
|
│ │ --- asciidoc-8.6.10/filters/source/source-highlight-filter.conf
|
3663
|
│ ├── +++ asciidoc-py-8.6.10/filters/source/source-highlight-filter.conf
|
3664
|
│ │┄ Files identical despite different names
|
3665
|
│ │ --- asciidoc-8.6.10/help.conf
|
3666
|
│ ├── +++ asciidoc-py-8.6.10/help.conf
|
3667
|
│ │┄ Files identical despite different names
|
3668
|
│ │ --- asciidoc-8.6.10/html4.conf
|
3669
|
│ ├── +++ asciidoc-py-8.6.10/html4.conf
|
3670
|
│ │┄ Files 0% similar despite different names
|
3671
|
│ │ @@ -38,24 +38,24 @@
|
3672
|
│ │ template::[pi-blockmacro]
|
3673
|
│ │
|
3674
|
│ │ [image-inlinemacro]
|
3675
|
│ │ <a href="{link}"{role? class="{role}"}>
|
3676
|
│ │ # src attribute must be first attribute for blogpost compatibility.
|
3677
|
│ │ {data-uri%}<img src="{imagesdir=}{imagesdir?/}{target}" style="border-width: 0; vertical-align: text-bottom;" alt="{alt={target}}"{width? width="{width}"}{height? height="{height}"}{title? title="{title}"}>
|
3678
|
│ │ {data-uri#}<img style="border-width: 0; vertical-align: text-bottom;" alt="{alt={target}}"{width? width="{width}"}{height? height="{height}"}{title? title="{title}"}
|
3679
|
│ │ -{data-uri#}{sys:"{python}" -u -c "import mimetypes,base64,sys; print 'src=\x22data:'+mimetypes.guess_type(r'{target}')[0]+';base64,'; base64.encode(sys.stdin,sys.stdout)" < "{eval:os.path.join(r"{indir={outdir}}",r"{imagesdir=}",r"{target}")}"}">
|
3680
|
│ │ +{data-uri#}{sys:"{python}" -u -c "import mimetypes,base64,sys; print(b'src=\x22data:' + mimetypes.guess_type(r'{target}')[0].encode('utf-8') + b';base64,'); base64.encode(sys.stdin,sys.stdout)" < "{eval:os.path.join(r"{indir={outdir}}",r"{imagesdir=}",r"{target}")}"}">
|
3681
|
│ │ {link#}</a>
|
3682
|
│ │
|
3683
|
│ │ [image-blockmacro]
|
3684
|
│ │ <div{align? align="{align}"}{role? class="{role}"}{float? style="float:{float};"}>
|
3685
|
│ │ <a name="{id}"></a>
|
3686
|
│ │ <a href="{link}">
|
3687
|
│ │ {data-uri%}<img src="{imagesdir=}{imagesdir?/}{target}" style="border-width: 0;" alt="{alt={target}}"{width? width="{width}"}{height? height="{height}"}>
|
3688
|
│ │ {data-uri#}<img alt="{alt={target}}"{width? width="{width}"}{height? height="{height}"}
|
3689
|
│ │ -{data-uri#}{sys:"{python}" -u -c "import mimetypes,base64,sys; print 'src=\x22data:'+mimetypes.guess_type(r'{target}')[0]+';base64,'; base64.encode(sys.stdin,sys.stdout)" < "{eval:os.path.join(r"{indir={outdir}}",r"{imagesdir=}",r"{target}")}"}">
|
3690
|
│ │ +{data-uri#}{sys:"{python}" -u -c "import mimetypes,base64,sys; print(b'src=\x22data:' + mimetypes.guess_type(r'{target}')[0].encode('utf-8') + b';base64,'); base64.encode(sys.stdin,sys.stdout)" < "{eval:os.path.join(r"{indir={outdir}}",r"{imagesdir=}",r"{target}")}"}">
|
3691
|
│ │ {link#}</a>
|
3692
|
│ │ <p><b>{caption={figure-caption} {counter:figure-number}. }</b>{title}</p>
|
3693
|
│ │ </div>
|
3694
|
│ │
|
3695
|
│ │ [unfloat-blockmacro]
|
3696
|
│ │ <br clear="all">
|
3697
|
│ │ --- asciidoc-8.6.10/html5.conf
|
3698
|
│ ├── +++ asciidoc-py-8.6.10/html5.conf
|
3699
|
│ │┄ Files 2% similar despite different names
|
3700
|
│ │ @@ -79,25 +79,25 @@
|
3701
|
│ │ </div></div>
|
3702
|
│ │
|
3703
|
│ │ [image-inlinemacro]
|
3704
|
│ │ <span class="image{role? {role}}">
|
3705
|
│ │ <a class="image" href="{link}">
|
3706
|
│ │ {data-uri%}<img src="{imagesdir=}{imagesdir?/}{target}" alt="{alt={target}}"{width? width="{width}"}{height? height="{height}"}{title? title="{title}"}>
|
3707
|
│ │ {data-uri#}<img alt="{alt={target}}"{width? width="{width}"}{height? height="{height}"}{title? title="{title}"}
|
3708
|
│ │ -{data-uri#}{sys:"{python}" -u -c "import mimetypes,base64,sys; print 'src=\x22data:'+mimetypes.guess_type(r'{target}')[0]+';base64,'; base64.encode(sys.stdin,sys.stdout)" < "{eval:os.path.join(r"{indir={outdir}}",r"{imagesdir=}",r"{target}")}"}">
|
3709
|
│ │ +{data-uri#}{sys:"{python}" -u -c "import mimetypes,base64,sys; print(b'src=\x22data:' + mimetypes.guess_type(r'{target}')[0].encode('utf-8') + b';base64,'); base64.encode(sys.stdin,sys.stdout)" < "{eval:os.path.join(r"{indir={outdir}}",r"{imagesdir=}",r"{target}")}"}">
|
3710
|
│ │ {link#}</a>
|
3711
|
│ │ </span>
|
3712
|
│ │
|
3713
|
│ │ [image-blockmacro]
|
3714
|
│ │ <div class="imageblock{style? {style}}{role? {role}}{unbreakable-option? unbreakable}"{id? id="{id}"}{align? style="text-align:{align};"}{float? style="float:{float};"}>
|
3715
|
│ │ <div class="content">
|
3716
|
│ │ <a class="image" href="{link}">
|
3717
|
│ │ {data-uri%}<img src="{imagesdir=}{imagesdir?/}{target}" alt="{alt={target}}"{width? width="{width}"}{height? height="{height}"}>
|
3718
|
│ │ {data-uri#}<img alt="{alt={target}}"{width? width="{width}"}{height? height="{height}"}
|
3719
|
│ │ -{data-uri#}{sys:"{python}" -u -c "import mimetypes,base64,sys; print 'src=\x22data:'+mimetypes.guess_type(r'{target}')[0]+';base64,'; base64.encode(sys.stdin,sys.stdout)" < "{eval:os.path.join(r"{indir={outdir}}",r"{imagesdir=}",r"{target}")}"}">
|
3720
|
│ │ +{data-uri#}{sys:"{python}" -u -c "import mimetypes,base64,sys; print(b'src=\x22data:' + mimetypes.guess_type(r'{target}')[0].encode('utf-8') + b';base64,'); base64.encode(sys.stdin,sys.stdout)" < "{eval:os.path.join(r"{indir={outdir}}",r"{imagesdir=}",r"{target}")}"}">
|
3721
|
│ │ {link#}</a>
|
3722
|
│ │ </div>
|
3723
|
│ │ <div class="title">{caption={figure-caption} {counter:figure-number}. }{title}</div>
|
3724
|
│ │ </div>
|
3725
|
│ │
|
3726
|
│ │ [audio-blockmacro]
|
3727
|
│ │ <div class="audioblock{role? {role}}{unbreakable-option? unbreakable}"{id? id="{id}"}>
|
3728
|
│ │ --- asciidoc-8.6.10/images/highlighter.png
|
3729
|
│ ├── +++ asciidoc-py-8.6.10/images/highlighter.png
|
3730
|
│ │┄ Files identical despite different names
|
3731
|
│ │ --- asciidoc-8.6.10/images/icons/callouts/11.png
|
3732
|
│ ├── +++ asciidoc-py-8.6.10/images/icons/callouts/11.png
|
3733
|
│ │┄ Files identical despite different names
|
3734
|
│ │ --- asciidoc-8.6.10/images/icons/callouts/12.png
|
3735
|
│ ├── +++ asciidoc-py-8.6.10/images/icons/callouts/12.png
|
3736
|
│ │┄ Files identical despite different names
|
3737
|
│ │ --- asciidoc-8.6.10/images/icons/callouts/13.png
|
3738
|
│ ├── +++ asciidoc-py-8.6.10/images/icons/callouts/13.png
|
3739
|
│ │┄ Files identical despite different names
|
3740
|
│ │ --- asciidoc-8.6.10/images/icons/callouts/15.png
|
3741
|
│ ├── +++ asciidoc-py-8.6.10/images/icons/callouts/15.png
|
3742
|
│ │┄ Files identical despite different names
|
3743
|
│ │ --- asciidoc-8.6.10/images/icons/caution.png
|
3744
|
│ ├── +++ asciidoc-py-8.6.10/images/icons/caution.png
|
3745
|
│ │┄ Files identical despite different names
|
3746
|
│ │ --- asciidoc-8.6.10/images/icons/example.png
|
3747
|
│ ├── +++ asciidoc-py-8.6.10/images/icons/example.png
|
3748
|
│ │┄ Files identical despite different names
|
3749
|
│ │ --- asciidoc-8.6.10/images/icons/home.png
|
3750
|
│ ├── +++ asciidoc-py-8.6.10/images/icons/home.png
|
3751
|
│ │┄ Files identical despite different names
|
3752
|
│ │ --- asciidoc-8.6.10/images/icons/important.png
|
3753
|
│ ├── +++ asciidoc-py-8.6.10/images/icons/important.png
|
3754
|
│ │┄ Files identical despite different names
|
3755
|
│ │ --- asciidoc-8.6.10/images/icons/next.png
|
3756
|
│ ├── +++ asciidoc-py-8.6.10/images/icons/next.png
|
3757
|
│ │┄ Files identical despite different names
|
3758
|
│ │ --- asciidoc-8.6.10/images/icons/note.png
|
3759
|
│ ├── +++ asciidoc-py-8.6.10/images/icons/note.png
|
3760
|
│ │┄ Files identical despite different names
|
3761
|
│ │ --- asciidoc-8.6.10/images/icons/prev.png
|
3762
|
│ ├── +++ asciidoc-py-8.6.10/images/icons/prev.png
|
3763
|
│ │┄ Files identical despite different names
|
3764
|
│ │ --- asciidoc-8.6.10/images/icons/tip.png
|
3765
|
│ ├── +++ asciidoc-py-8.6.10/images/icons/tip.png
|
3766
|
│ │┄ Files identical despite different names
|
3767
|
│ │ --- asciidoc-8.6.10/images/icons/up.png
|
3768
|
│ ├── +++ asciidoc-py-8.6.10/images/icons/up.png
|
3769
|
│ │┄ Files identical despite different names
|
3770
|
│ │ --- asciidoc-8.6.10/images/icons/warning.png
|
3771
|
│ ├── +++ asciidoc-py-8.6.10/images/icons/warning.png
|
3772
|
│ │┄ Files identical despite different names
|
3773
|
│ │ --- asciidoc-8.6.10/images/tiger.png
|
3774
|
│ ├── +++ asciidoc-py-8.6.10/images/tiger.png
|
3775
|
│ │┄ Files identical despite different names
|
3776
|
│ │ --- asciidoc-8.6.10/install-sh
|
3777
|
│ ├── +++ asciidoc-py-8.6.10/install-sh
|
3778
|
│ │┄ Files identical despite different names
|
3779
|
│ │ --- asciidoc-8.6.10/javascripts/ASCIIMathML.js
|
3780
|
│ ├── +++ asciidoc-py-8.6.10/javascripts/ASCIIMathML.js
|
3781
|
│ │┄ Files identical despite different names
|
3782
|
│ │ --- asciidoc-8.6.10/javascripts/LaTeXMathML.js
|
3783
|
│ ├── +++ asciidoc-py-8.6.10/javascripts/LaTeXMathML.js
|
3784
|
│ │┄ Files identical despite different names
|
3785
|
│ │ --- asciidoc-8.6.10/javascripts/asciidoc.js
|
3786
|
│ ├── +++ asciidoc-py-8.6.10/javascripts/asciidoc.js
|
3787
|
│ │┄ Files identical despite different names
|
3788
|
│ │ --- asciidoc-8.6.10/javascripts/slidy.js
|
3789
|
│ ├── +++ asciidoc-py-8.6.10/javascripts/slidy.js
|
3790
|
│ │┄ Files identical despite different names
|
3791
|
│ │ --- asciidoc-8.6.10/javascripts/toc.js
|
3792
|
│ ├── +++ asciidoc-py-8.6.10/javascripts/toc.js
|
3793
|
│ │┄ Files identical despite different names
|
3794
|
│ │ --- asciidoc-8.6.10/lang-cs.conf
|
3795
|
│ ├── +++ asciidoc-py-8.6.10/lang-cs.conf
|
3796
|
│ │┄ Files identical despite different names
|
3797
|
│ │ --- asciidoc-8.6.10/lang-de.conf
|
3798
|
│ ├── +++ asciidoc-py-8.6.10/lang-de.conf
|
3799
|
│ │┄ Files identical despite different names
|
3800
|
│ │ --- asciidoc-8.6.10/lang-el.conf
|
3801
|
│ ├── +++ asciidoc-py-8.6.10/lang-el.conf
|
3802
|
│ │┄ Files identical despite different names
|
3803
|
│ │ --- asciidoc-8.6.10/lang-en.conf
|
3804
|
│ ├── +++ asciidoc-py-8.6.10/lang-en.conf
|
3805
|
│ │┄ Files identical despite different names
|
3806
|
│ │ --- asciidoc-8.6.10/lang-es.conf
|
3807
|
│ ├── +++ asciidoc-py-8.6.10/lang-es.conf
|
3808
|
│ │┄ Files identical despite different names
|
3809
|
│ │ --- asciidoc-8.6.10/lang-fi.conf
|
3810
|
│ ├── +++ asciidoc-py-8.6.10/lang-fi.conf
|
3811
|
│ │┄ Files identical despite different names
|
3812
|
│ │ --- asciidoc-8.6.10/lang-fr.conf
|
3813
|
│ ├── +++ asciidoc-py-8.6.10/lang-fr.conf
|
3814
|
│ │┄ Files identical despite different names
|
3815
|
│ │ --- asciidoc-8.6.10/lang-hu.conf
|
3816
|
│ ├── +++ asciidoc-py-8.6.10/lang-hu.conf
|
3817
|
│ │┄ Files identical despite different names
|
3818
|
│ │ --- asciidoc-8.6.10/lang-id.conf
|
3819
|
│ ├── +++ asciidoc-py-8.6.10/lang-id.conf
|
3820
|
│ │┄ Files identical despite different names
|
3821
|
│ │ --- asciidoc-8.6.10/lang-it.conf
|
3822
|
│ ├── +++ asciidoc-py-8.6.10/lang-it.conf
|
3823
|
│ │┄ Files identical despite different names
|
3824
|
│ │ --- asciidoc-8.6.10/lang-ja.conf
|
3825
|
│ ├── +++ asciidoc-py-8.6.10/lang-ja.conf
|
3826
|
│ │┄ Files identical despite different names
|
3827
|
│ │ --- asciidoc-8.6.10/lang-nl.conf
|
3828
|
│ ├── +++ asciidoc-py-8.6.10/lang-nl.conf
|
3829
|
│ │┄ Files identical despite different names
|
3830
|
│ │ --- asciidoc-8.6.10/lang-pl.conf
|
3831
|
│ ├── +++ asciidoc-py-8.6.10/lang-pl.conf
|
3832
|
│ │┄ Files identical despite different names
|
3833
|
│ │ --- asciidoc-8.6.10/lang-pt-BR.conf
|
3834
|
│ ├── +++ asciidoc-py-8.6.10/lang-pt-BR.conf
|
3835
|
│ │┄ Files identical despite different names
|
3836
|
│ │ --- asciidoc-8.6.10/lang-ro.conf
|
3837
|
│ ├── +++ asciidoc-py-8.6.10/lang-ro.conf
|
3838
|
│ │┄ Files identical despite different names
|
3839
|
│ │ --- asciidoc-8.6.10/lang-ru.conf
|
3840
|
│ ├── +++ asciidoc-py-8.6.10/lang-ru.conf
|
3841
|
│ │┄ Files identical despite different names
|
3842
|
│ │ --- asciidoc-8.6.10/lang-sv.conf
|
3843
|
│ ├── +++ asciidoc-py-8.6.10/lang-sv.conf
|
3844
|
│ │┄ Files identical despite different names
|
3845
|
│ │ --- asciidoc-8.6.10/lang-uk.conf
|
3846
|
│ ├── +++ asciidoc-py-8.6.10/lang-uk.conf
|
3847
|
│ │┄ Files identical despite different names
|
3848
|
│ │ --- asciidoc-8.6.10/latex.conf
|
3849
|
│ ├── +++ asciidoc-py-8.6.10/latex.conf
|
3850
|
│ │┄ Files identical despite different names
|
3851
|
│ │ --- asciidoc-8.6.10/main.aap
|
3852
|
│ ├── +++ asciidoc-py-8.6.10/main.aap
|
3853
|
│ │┄ Files identical despite different names
|
3854
|
│ │ --- asciidoc-8.6.10/slidy.conf
|
3855
|
│ ├── +++ asciidoc-py-8.6.10/slidy.conf
|
3856
|
│ │┄ Files identical despite different names
|
3857
|
│ │ --- asciidoc-8.6.10/stylesheets/asciidoc.css
|
3858
|
│ ├── +++ asciidoc-py-8.6.10/stylesheets/asciidoc.css
|
3859
|
│ │┄ Files identical despite different names
|
3860
|
│ │ --- asciidoc-8.6.10/stylesheets/docbook-xsl.css
|
3861
|
│ ├── +++ asciidoc-py-8.6.10/stylesheets/docbook-xsl.css
|
3862
|
│ │┄ Files identical despite different names
|
3863
|
│ │ --- asciidoc-8.6.10/stylesheets/pygments.css
|
3864
|
│ ├── +++ asciidoc-py-8.6.10/stylesheets/pygments.css
|
3865
|
│ │┄ Files identical despite different names
|
3866
|
│ │ --- asciidoc-8.6.10/stylesheets/slidy.css
|
3867
|
│ ├── +++ asciidoc-py-8.6.10/stylesheets/slidy.css
|
3868
|
│ │┄ Files identical despite different names
|
3869
|
│ │ --- asciidoc-8.6.10/stylesheets/toc2.css
|
3870
|
│ ├── +++ asciidoc-py-8.6.10/stylesheets/toc2.css
|
3871
|
│ │┄ Files identical despite different names
|
3872
|
│ │ --- asciidoc-8.6.10/stylesheets/xhtml11-quirks.css
|
3873
|
│ ├── +++ asciidoc-py-8.6.10/stylesheets/xhtml11-quirks.css
|
3874
|
│ │┄ Files identical despite different names
|
3875
|
│ │ --- asciidoc-8.6.10/tests/data/filters-test.txt
|
3876
|
│ ├── +++ asciidoc-py-8.6.10/tests/data/filters-test.txt
|
3877
|
│ │┄ Files identical despite different names
|
3878
|
│ │ --- asciidoc-8.6.10/tests/data/lang-cs-test.txt
|
3879
|
│ ├── +++ asciidoc-py-8.6.10/tests/data/lang-cs-test.txt
|
3880
|
│ │┄ Files identical despite different names
|
3881
|
│ │ --- asciidoc-8.6.10/tests/data/lang-de-test.txt
|
3882
|
│ ├── +++ asciidoc-py-8.6.10/tests/data/lang-de-test.txt
|
3883
|
│ │┄ Files identical despite different names
|
3884
|
│ │ --- asciidoc-8.6.10/tests/data/lang-en-test.txt
|
3885
|
│ ├── +++ asciidoc-py-8.6.10/tests/data/lang-en-test.txt
|
3886
|
│ │┄ Files identical despite different names
|
3887
|
│ │ --- asciidoc-8.6.10/tests/data/lang-es-test.txt
|
3888
|
│ ├── +++ asciidoc-py-8.6.10/tests/data/lang-es-test.txt
|
3889
|
│ │┄ Files identical despite different names
|
3890
|
│ │ --- asciidoc-8.6.10/tests/data/lang-fr-test.txt
|
3891
|
│ ├── +++ asciidoc-py-8.6.10/tests/data/lang-fr-test.txt
|
3892
|
│ │┄ Files identical despite different names
|
3893
|
│ │ --- asciidoc-8.6.10/tests/data/lang-hu-test.txt
|
3894
|
│ ├── +++ asciidoc-py-8.6.10/tests/data/lang-hu-test.txt
|
3895
|
│ │┄ Files identical despite different names
|
3896
|
│ │ --- asciidoc-8.6.10/tests/data/lang-it-test.txt
|
3897
|
│ ├── +++ asciidoc-py-8.6.10/tests/data/lang-it-test.txt
|
3898
|
│ │┄ Files identical despite different names
|
3899
|
│ │ --- asciidoc-8.6.10/tests/data/lang-ja-test.txt
|
3900
|
│ ├── +++ asciidoc-py-8.6.10/tests/data/lang-ja-test.txt
|
3901
|
│ │┄ Files identical despite different names
|
3902
|
│ │ --- asciidoc-8.6.10/tests/data/lang-nl-test.txt
|
3903
|
│ ├── +++ asciidoc-py-8.6.10/tests/data/lang-nl-test.txt
|
3904
|
│ │┄ Files identical despite different names
|
3905
|
│ │ --- asciidoc-8.6.10/tests/data/lang-pt-BR-test.txt
|
3906
|
│ ├── +++ asciidoc-py-8.6.10/tests/data/lang-pt-BR-test.txt
|
3907
|
│ │┄ Files identical despite different names
|
3908
|
│ │ --- asciidoc-8.6.10/tests/data/lang-ro-test.txt
|
3909
|
│ ├── +++ asciidoc-py-8.6.10/tests/data/lang-ro-test.txt
|
3910
|
│ │┄ Files identical despite different names
|
3911
|
│ │ --- asciidoc-8.6.10/tests/data/lang-ru-test.txt
|
3912
|
│ ├── +++ asciidoc-py-8.6.10/tests/data/lang-ru-test.txt
|
3913
|
│ │┄ Files identical despite different names
|
3914
|
│ │ --- asciidoc-8.6.10/tests/data/lang-sv-test.txt
|
3915
|
│ ├── +++ asciidoc-py-8.6.10/tests/data/lang-sv-test.txt
|
3916
|
│ │┄ Files identical despite different names
|
3917
|
│ │ --- asciidoc-8.6.10/tests/data/lang-uk-test.txt
|
3918
|
│ ├── +++ asciidoc-py-8.6.10/tests/data/lang-uk-test.txt
|
3919
|
│ │┄ Files identical despite different names
|
3920
|
│ │ --- asciidoc-8.6.10/tests/data/oldtables.txt
|
3921
|
│ ├── +++ asciidoc-py-8.6.10/tests/data/oldtables.txt
|
3922
|
│ │┄ Files identical despite different names
|
3923
|
│ │ --- asciidoc-8.6.10/tests/data/open-block-test.txt
|
3924
|
│ ├── +++ asciidoc-py-8.6.10/tests/data/open-block-test.txt
|
3925
|
│ │┄ Files identical despite different names
|
3926
|
│ │ --- asciidoc-8.6.10/tests/data/testcases.txt
|
3927
|
│ ├── +++ asciidoc-py-8.6.10/tests/data/testcases.txt
|
3928
|
│ │┄ Files identical despite different names
|
3929
|
│ │ --- asciidoc-8.6.10/tests/data/utf8-examples.txt
|
3930
|
│ ├── +++ asciidoc-py-8.6.10/tests/data/utf8-examples.txt
|
3931
|
│ │┄ Files identical despite different names
|
3932
|
│ │ --- asciidoc-8.6.10/tests/testasciidoc.conf
|
3933
|
│ ├── +++ asciidoc-py-8.6.10/tests/testasciidoc.conf
|
3934
|
│ │┄ Files identical despite different names
|
3935
|
│ │ --- asciidoc-8.6.10/tests/testasciidoc.py
|
3936
|
│ ├── +++ asciidoc-py-8.6.10/tests/testasciidoc.py
|
3937
|
│ │┄ Files 10% similar despite different names
|
3938
|
│ │ @@ -1,8 +1,8 @@
|
3939
|
│ │ -#!/usr/bin/env python
|
3940
|
│ │ +#!/usr/bin/env python3
|
3941
|
│ │
|
3942
|
│ │ USAGE = '''Usage: testasciidoc.py [OPTIONS] COMMAND
|
3943
|
│ │
|
3944
|
│ │ Run AsciiDoc conformance tests specified in configuration FILE.
|
3945
|
│ │
|
3946
|
│ │ Commands:
|
3947
|
│ │ list List tests
|
3948
|
│ │ @@ -22,17 +22,17 @@
|
3949
|
│ │
|
3950
|
│ │
|
3951
|
│ │ import os, sys, re, difflib
|
3952
|
│ │ import time
|
3953
|
│ │
|
3954
|
│ │ if sys.platform[:4] == 'java':
|
3955
|
│ │ # Jython cStringIO is more compatible with CPython StringIO.
|
3956
|
│ │ - import cStringIO as StringIO
|
3957
|
│ │ + import io as StringIO
|
3958
|
│ │ else:
|
3959
|
│ │ - import StringIO
|
3960
|
│ │ + import io
|
3961
|
│ │
|
3962
|
│ │ import asciidocapi
|
3963
|
│ │
|
3964
|
│ │
|
3965
|
│ │ BACKENDS = ('html4','xhtml11','docbook','html5') # Default backends.
|
3966
|
│ │ BACKEND_EXT = {'html4':'.html', 'xhtml11':'.html', 'docbook':'.xml',
|
3967
|
│ │ 'slidy':'.html','html5':'.html'}
|
3968
|
│ │ @@ -41,25 +41,25 @@
|
3969
|
│ │ def iif(condition, iftrue, iffalse=None):
|
3970
|
│ │ """
|
3971
|
│ │ Immediate if c.f. ternary ?: operator.
|
3972
|
│ │ False value defaults to '' if the true value is a string.
|
3973
|
│ │ False value defaults to 0 if the true value is a number.
|
3974
|
│ │ """
|
3975
|
│ │ if iffalse is None:
|
3976
|
│ │ - if isinstance(iftrue, basestring):
|
3977
|
│ │ + if isinstance(iftrue, str):
|
3978
|
│ │ iffalse = ''
|
3979
|
│ │ if type(iftrue) in (int, float):
|
3980
|
│ │ iffalse = 0
|
3981
|
│ │ if condition:
|
3982
|
│ │ return iftrue
|
3983
|
│ │ else:
|
3984
|
│ │ return iffalse
|
3985
|
│ │
|
3986
|
│ │ def message(msg=''):
|
3987
|
│ │ - print >>sys.stderr, msg
|
3988
|
│ │ + print(msg, file=sys.stderr)
|
3989
|
│ │
|
3990
|
│ │ def strip_end(lines):
|
3991
|
│ │ """
|
3992
|
│ │ Strip blank strings from the end of list of strings.
|
3993
|
│ │ """
|
3994
|
│ │ for i in range(len(lines)-1,-1,-1):
|
3995
|
│ │ if not lines[i]:
|
3996
|
│ │ @@ -139,34 +139,34 @@
|
3997
|
│ │ self.title = l[0][1:]
|
3998
|
│ │ else:
|
3999
|
│ │ self.title = l[0]
|
4000
|
│ │ self.description = l[1:]
|
4001
|
│ │ continue
|
4002
|
│ │ reo = re.match(r'^%\s*(?P<directive>[\w_-]+)', l[0])
|
4003
|
│ │ if not reo:
|
4004
|
│ │ - raise (ValueError, 'illegal directive: %s' % l[0])
|
4005
|
│ │ + raise ValueError
|
4006
|
│ │ directive = reo.groupdict()['directive']
|
4007
|
│ │ data = normalize_data(l[1:])
|
4008
|
│ │ if directive == 'source':
|
4009
|
│ │ if data:
|
4010
|
│ │ self.source = os.path.normpath(os.path.join(
|
4011
|
│ │ self.confdir, os.path.normpath(data[0])))
|
4012
|
│ │ elif directive == 'options':
|
4013
|
│ │ self.options = eval(' '.join(data))
|
4014
|
│ │ for i,v in enumerate(self.options):
|
4015
|
│ │ - if isinstance(v, basestring):
|
4016
|
│ │ + if isinstance(v, str):
|
4017
|
│ │ self.options[i] = (v,None)
|
4018
|
│ │ elif directive == 'attributes':
|
4019
|
│ │ self.attributes.update(eval(' '.join(data)))
|
4020
|
│ │ elif directive == 'backends':
|
4021
|
│ │ self.backends = eval(' '.join(data))
|
4022
|
│ │ elif directive == 'name':
|
4023
|
│ │ self.name = data[0].strip()
|
4024
|
│ │ else:
|
4025
|
│ │ - raise (ValueError, 'illegal directive: %s' % l[0])
|
4026
|
│ │ + raise ValueError
|
4027
|
│ │ if not self.title:
|
4028
|
│ │ self.title = self.source
|
4029
|
│ │ if not self.name:
|
4030
|
│ │ self.name = os.path.basename(os.path.splitext(self.source)[0])
|
4031
|
│ │
|
4032
|
│ │ def is_missing(self, backend):
|
4033
|
│ │ """
|
4034
|
│ │ @@ -200,29 +200,29 @@
|
4035
|
│ │ """
|
4036
|
│ │ Generate and return test data output for backend.
|
4037
|
│ │ """
|
4038
|
│ │ asciidoc = asciidocapi.AsciiDocAPI()
|
4039
|
│ │ asciidoc.options.values = self.options
|
4040
|
│ │ asciidoc.attributes = self.attributes
|
4041
|
│ │ infile = self.source
|
4042
|
│ │ - outfile = StringIO.StringIO()
|
4043
|
│ │ + outfile = io.StringIO()
|
4044
|
│ │ asciidoc.execute(infile, outfile, backend)
|
4045
|
│ │ return outfile.getvalue().splitlines()
|
4046
|
│ │
|
4047
|
│ │ def update_expected(self, backend):
|
4048
|
│ │ """
|
4049
|
│ │ Generate and write backend data.
|
4050
|
│ │ """
|
4051
|
│ │ lines = self.generate_expected(backend)
|
4052
|
│ │ if not os.path.isdir(self.datadir):
|
4053
|
│ │ - print('CREATING: %s' % self.datadir)
|
4054
|
│ │ + print(('CREATING: %s' % self.datadir))
|
4055
|
│ │ os.mkdir(self.datadir)
|
4056
|
│ │ f = open(self.backend_filename(backend),'w+')
|
4057
|
│ │ try:
|
4058
|
│ │ - print('WRITING: %s' % f.name)
|
4059
|
│ │ + print(('WRITING: %s' % f.name))
|
4060
|
│ │ f.writelines([ s + os.linesep for s in lines])
|
4061
|
│ │ finally:
|
4062
|
│ │ f.close()
|
4063
|
│ │
|
4064
|
│ │ def update(self, backend=None, force=False):
|
4065
|
│ │ """
|
4066
|
│ │ Regenerate and update expected test data outputs.
|
4067
|
│ │ @@ -242,43 +242,43 @@
|
4068
|
│ │ """
|
4069
|
│ │ if backend is None:
|
4070
|
│ │ backends = self.backends
|
4071
|
│ │ else:
|
4072
|
│ │ backends = [backend]
|
4073
|
│ │ result = True # Assume success.
|
4074
|
│ │ self.passed = self.failed = self.skipped = 0
|
4075
|
│ │ - print('%d: %s' % (self.number, self.title))
|
4076
|
│ │ + print(('%d: %s' % (self.number, self.title)))
|
4077
|
│ │ if self.source and os.path.isfile(self.source):
|
4078
|
│ │ - print('SOURCE: asciidoc: %s' % self.source)
|
4079
|
│ │ + print(('SOURCE: asciidoc: %s' % self.source))
|
4080
|
│ │ for backend in backends:
|
4081
|
│ │ fromfile = self.backend_filename(backend)
|
4082
|
│ │ if not self.is_missing(backend):
|
4083
|
│ │ expected = self.get_expected(backend)
|
4084
|
│ │ strip_end(expected)
|
4085
|
│ │ got = self.generate_expected(backend)
|
4086
|
│ │ strip_end(got)
|
4087
|
│ │ lines = []
|
4088
|
│ │ for line in difflib.unified_diff(got, expected, n=0):
|
4089
|
│ │ lines.append(line)
|
4090
|
│ │ if lines:
|
4091
|
│ │ result = False
|
4092
|
│ │ self.failed +=1
|
4093
|
│ │ lines = lines[3:]
|
4094
|
│ │ - print('FAILED: %s: %s' % (backend, fromfile))
|
4095
|
│ │ + print(('FAILED: %s: %s' % (backend, fromfile)))
|
4096
|
│ │ message('+++ %s' % fromfile)
|
4097
|
│ │ message('--- got')
|
4098
|
│ │ for line in lines:
|
4099
|
│ │ message(line)
|
4100
|
│ │ message()
|
4101
|
│ │ else:
|
4102
|
│ │ self.passed += 1
|
4103
|
│ │ - print('PASSED: %s: %s' % (backend, fromfile))
|
4104
|
│ │ + print(('PASSED: %s: %s' % (backend, fromfile)))
|
4105
|
│ │ else:
|
4106
|
│ │ self.skipped += 1
|
4107
|
│ │ - print('SKIPPED: %s: %s' % (backend, fromfile))
|
4108
|
│ │ + print(('SKIPPED: %s: %s' % (backend, fromfile)))
|
4109
|
│ │ else:
|
4110
|
│ │ self.skipped += len(backends)
|
4111
|
│ │ if self.source:
|
4112
|
│ │ msg = 'MISSING: %s' % self.source
|
4113
|
│ │ else:
|
4114
|
│ │ msg = 'NO ASCIIDOC SOURCE FILE SPECIFIED'
|
4115
|
│ │ print(msg)
|
4116
|
│ │ @@ -332,34 +332,34 @@
|
4117
|
│ │ for test in self.tests:
|
4118
|
│ │ if (not test.disabled or number) and (not number or number == test.number) and (not backend or backend in test.backends):
|
4119
|
│ │ test.run(backend)
|
4120
|
│ │ self.passed += test.passed
|
4121
|
│ │ self.failed += test.failed
|
4122
|
│ │ self.skipped += test.skipped
|
4123
|
│ │ if self.passed > 0:
|
4124
|
│ │ - print('TOTAL PASSED: %s' % self.passed)
|
4125
|
│ │ + print(('TOTAL PASSED: %s' % self.passed))
|
4126
|
│ │ if self.failed > 0:
|
4127
|
│ │ - print('TOTAL FAILED: %s' % self.failed)
|
4128
|
│ │ + print(('TOTAL FAILED: %s' % self.failed))
|
4129
|
│ │ if self.skipped > 0:
|
4130
|
│ │ - print('TOTAL SKIPPED: %s' % self.skipped)
|
4131
|
│ │ + print(('TOTAL SKIPPED: %s' % self.skipped))
|
4132
|
│ │
|
4133
|
│ │ def update(self, number=None, backend=None, force=False):
|
4134
|
│ │ """
|
4135
|
│ │ Regenerate expected test data and update configuratio file.
|
4136
|
│ │ """
|
4137
|
│ │ for test in self.tests:
|
4138
|
│ │ if (not test.disabled or number) and (not number or number == test.number):
|
4139
|
│ │ test.update(backend, force=force)
|
4140
|
│ │
|
4141
|
│ │ def list(self):
|
4142
|
│ │ """
|
4143
|
│ │ Lists tests to stdout.
|
4144
|
│ │ """
|
4145
|
│ │ for test in self.tests:
|
4146
|
│ │ - print '%d: %s%s' % (test.number, iif(test.disabled,'!'), test.title)
|
4147
|
│ │ + print('%d: %s%s' % (test.number, iif(test.disabled,'!'), test.title))
|
4148
|
│ │
|
4149
|
│ │
|
4150
|
│ │ class Lines(list):
|
4151
|
│ │ """
|
4152
|
│ │ A list of strings.
|
4153
|
│ │ Adds eol() and read_until() to list type.
|
4154
|
│ │ """
|
4155
|
│ │ @@ -425,15 +425,15 @@
|
4156
|
│ │ try:
|
4157
|
│ │ number = int(arg)
|
4158
|
│ │ except ValueError:
|
4159
|
│ │ backend = arg
|
4160
|
│ │ if backend and backend not in BACKENDS:
|
4161
|
│ │ message('illegal BACKEND: %s' % backend)
|
4162
|
│ │ sys.exit(1)
|
4163
|
│ │ - if number is not None and number not in range(1, len(tests.tests)+1):
|
4164
|
│ │ + if number is not None and number not in list(range(1, len(tests.tests)+1)):
|
4165
|
│ │ message('illegal test NUMBER: %d' % number)
|
4166
|
│ │ sys.exit(1)
|
4167
|
│ │ if cmd == 'run':
|
4168
|
│ │ tests.run(number, backend)
|
4169
|
│ │ if tests.failed:
|
4170
|
│ │ sys.exit(1)
|
4171
|
│ │ elif cmd == 'update':
|
4172
|
│ │ --- asciidoc-8.6.10/themes/flask/flask.css
|
4173
|
│ ├── +++ asciidoc-py-8.6.10/themes/flask/flask.css
|
4174
|
│ │┄ Files identical despite different names
|
4175
|
│ │ --- asciidoc-8.6.10/themes/volnitsky/volnitsky.css
|
4176
|
│ ├── +++ asciidoc-py-8.6.10/themes/volnitsky/volnitsky.css
|
4177
|
│ │┄ Files identical despite different names
|
4178
|
│ │ --- asciidoc-8.6.10/vim/syntax/asciidoc.vim
|
4179
|
│ ├── +++ asciidoc-py-8.6.10/vim/syntax/asciidoc.vim
|
4180
|
│ │┄ Files identical despite different names
|
4181
|
│ │ --- asciidoc-8.6.10/xhtml11-quirks.conf
|
4182
|
│ ├── +++ asciidoc-py-8.6.10/xhtml11-quirks.conf
|
4183
|
│ │┄ Files identical despite different names
|
4184
|
│ │ --- asciidoc-8.6.10/xhtml11.conf
|
4185
|
│ ├── +++ asciidoc-py-8.6.10/xhtml11.conf
|
4186
|
│ │┄ Files 0% similar despite different names
|
4187
|
│ │ @@ -78,26 +78,26 @@
|
4188
|
│ │ </div></div>
|
4189
|
│ │
|
4190
|
│ │ [image-inlinemacro]
|
4191
|
│ │ <span class="image{role? {role}}">
|
4192
|
│ │ <a class="image" href="{link}">
|
4193
|
│ │ {data-uri%}<img src="{imagesdir=}{imagesdir?/}{target}" alt="{alt={target}}"{width? width="{width}"}{height? height="{height}"}{title? title="{title}"} />
|
4194
|
│ │ {data-uri#}<img alt="{alt={target}}"{width? width="{width}"}{height? height="{height}"}{title? title="{title}"}
|
4195
|
│ │ -{data-uri#}{sys:"{python}" -u -c "import mimetypes,sys; print 'src=\x22data:'+mimetypes.guess_type(r'{target}')[0]+';base64,';"}
|
4196
|
│ │ +{data-uri#}{sys:"{python}" -u -c "import mimetypes,sys; print(b'src=\x22data:' + mimetypes.guess_type(r'{target}')[0].encode('utf-8') + b';base64,');"}
|
4197
|
│ │ {data-uri#}{sys3:"{python}" -u -c "import base64,sys; base64.encode(sys.stdin,sys.stdout)" < "{eval:os.path.join(r"{indir={outdir}}",r"{imagesdir=}",r"{target}")}"}" />
|
4198
|
│ │ {link#}</a>
|
4199
|
│ │ </span>
|
4200
|
│ │
|
4201
|
│ │ [image-blockmacro]
|
4202
|
│ │ <div class="imageblock{style? {style}}{role? {role}}{unbreakable-option? unbreakable}"{id? id="{id}"}{align? style="text-align:{align};"}{float? style="float:{float};"}>
|
4203
|
│ │ <div class="content">
|
4204
|
│ │ <a class="image" href="{link}">
|
4205
|
│ │ {data-uri%}<img src="{imagesdir=}{imagesdir?/}{target}" alt="{alt={target}}"{width? width="{width}"}{height? height="{height}"} />
|
4206
|
│ │ {data-uri#}<img alt="{alt={target}}"{width? width="{width}"}{height? height="{height}"}
|
4207
|
│ │ -{data-uri#}{sys:"{python}" -u -c "import mimetypes,base64,sys; print 'src=\x22data:'+mimetypes.guess_type(r'{target}')[0]+';base64,'; base64.encode(sys.stdin,sys.stdout)" < "{eval:os.path.join(r"{indir={outdir}}",r"{imagesdir=}",r"{target}")}"}" />
|
4208
|
│ │ +{data-uri#}{sys:"{python}" -u -c "import mimetypes,base64,sys; print(b'src=\x22data:'+mimetypes.guess_type(rb'{target}')[0]+';base64,'); base64.encode(sys.stdin,sys.stdout)" < "{eval:os.path.join(r"{indir={outdir}}",r"{imagesdir=}",r"{target}")}"}" />
|
4209
|
│ │ {link#}</a>
|
4210
|
│ │ </div>
|
4211
|
│ │ <div class="title">{caption={figure-caption} {counter:figure-number}. }{title}</div>
|
4212
|
│ │ </div>
|
4213
|
│ │
|
4214
|
│ │ [unfloat-blockmacro]
|
4215
|
│ │ <div style="clear:both;"></div>
|