Codebase list asciidoc / e22fff4
New upstream version 10.1.1 Leon Marz 2 years ago
9 changed file(s) with 95 addition(s) and 197 deletion(s). Raw diff Collapse all Expand all
6767 - run: coverage xml
6868
6969 - run: time python tests/testasciidoc.py run
70 - run: git clean -x -f doc tests/data
71
72 - name: Configure make
73 run: |
74 autoconf
75 ./configure
76
77 - run: make install
78 - run: sudo make docs
79
80 - name: Print versions
81 run: |
82 asciidoc --version
83 a2x --version
84
85 - run: asciidoc --version
86 - run: asciidoc --filter list
8770
8871 - uses: codecov/codecov-action@v2
8972
10386
10487 - run: python -m asciidoc.asciidoc --doctest
10588 - run: python tests/testasciidoc.py run --number 6
89
90 make:
91 needs: lint
92 runs-on: ubuntu-latest
93 env:
94 python-version: 3.5
95
96 steps:
97 - uses: actions/checkout@v2
98
99 - name: Set up Python ${{ env.python-version }}
100 uses: actions/setup-python@v2
101 with:
102 python-version: ${{ matrix.python-version }}
103
104 - name: Install apt dependencies
105 run: |
106 sudo apt-get install -y --no-install-recommends \
107 docbook-xml \
108 docbook-xsl \
109 dvipng \
110 dvisvgm \
111 graphviz \
112 imagemagick \
113 libxml2-utils \
114 lilypond \
115 source-highlight \
116 texlive-latex-base \
117 xsltproc
118
119 - run: pip install -U pytest pytest-mock
120
121 - name: Configure make
122 run: |
123 autoconf
124 ./configure
125
126 - run: make test
127
128 - run: make install
129 - run: sudo make docs
130
131 - name: Print versions
132 run: |
133 asciidoc --version
134 a2x --version
135
136 - run: asciidoc --version
137 - run: asciidoc --filter list
11 ==================
22
33 :website: https://asciidoc-py.github.io/
4
5 Version 10.1.1 (2021-12-20)
6 ---------------------------
7 .Bug fixes
8 - Fix RuntimeWarning when executing asciidoc or a2x within repository
9 - Fix index out of range error in a2x (thanks @osmith42)
10
411
512 Version 10.1.0 (2021-12-17)
613 ---------------------------
+0
-169
INSTALL.adoc less more
0 AsciiDoc Installation
1 =====================
2
3 NOTE: The current version of AsciiDoc requires *Python 3.5 or later*
4 to run. If you don't already have an up-to-date version of Python
5 installed it can be downloaded from the official Python website
6 http://www.python.org/.
7
8
9 Prerequisites
10 -------------
11 See the link:README.html[README] page.
12
13
14 Installing from the GitHub repository
15 -------------------------------------
16 The AsciiDoc repository is hosted by https://github.com[GitHub].
17 To browse the repository go to https://github.com/asciidoc/asciidoc-py3.
18 You can install AsciiDoc from the repository if you don't have an up to
19 date packaged version, or you want to get the latest version from the master
20 branch:
21
22 - Make sure you have https://git-scm.com/[Git]
23 installed; you can check with:
24
25 $ git --version
26
27 - Go to the directory you want to install AsciiDoc into and download
28 the repository. This example gets the {revnumber} tagged release:
29
30 [subs="attributes"]
31 $ cd ~/bin
32 $ git clone https://github.com/asciidoc/asciidoc-py3 asciidoc-{revnumber}
33 $ git checkout {revnumber}
34
35 You now have two choices: you can run asciidoc locally from your
36 repository or you can use 'autoconf(1)' and 'make(1)' to perform a
37 system-wide install.
38
39 Running asciidoc from your local copy
40 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
41 Create a symlink to the AsciiDoc script in a search `PATH` directory
42 so it's easy to execute `asciidoc` from the command line, for example:
43
44 [subs="attributes"]
45 $ ln -s ~/bin/asciidoc-{revnumber}/asciidoc.py ~/bin/asciidoc
46 $ ln -s ~/bin/asciidoc-{revnumber}/a2x.py ~/bin/a2x
47
48 Use the git `pull` command to update your local AsciiDoc repository.
49
50 Installing asciidoc for all users
51 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
52 Create `configure` using 'autoconf(1)'; use `configure` to create the
53 `Makefile`; run 'make(1)'; build the man pages; install:
54
55 ---------------------------------------------
56 $ autoconf
57 $ ./configure
58 $ make
59 $ sudo make install
60 ---------------------------------------------
61
62 To uninstall:
63
64 ---------------------------------------------
65 $ sudo make uninstall
66 ---------------------------------------------
67
68
69 [[X1]]
70 Distribution tarball installation
71 ---------------------------------
72 The distribution source tarballs can be downloaded from GitHub
73 releases page https://github.com/asciidoc/asciidoc-py3/releases.
74
75 If your flavor of UNIX or Linux does not have a packaged AsciiDoc
76 distribution or if you prefer to install the latest AsciiDoc version
77 from source, use the `configure` shell script in the tarball root
78 directory.
79
80 The `autoconf(1)`-generated `configure` script creates a `Makefile`
81 that is tailored for your system. To install:
82
83 [subs="attributes"]
84 $ tar -xzf asciidoc-{revnumber}.tar.gz
85 $ cd asciidoc-{revnumber}
86 $ ./configure
87 $ sudo make install
88
89 To install the documentation:
90
91 $ sudo make docs
92
93 To uninstall AsciiDoc:
94
95 $ sudo make uninstall
96
97 If Vim is installed on your system the AsciiDoc Vim syntax highlighter
98 and filetype detection are already installed as built into the vim runtime.
99
100
101 [[X3]]
102 Microsoft Windows installation
103 ------------------------------
104 AsciiDoc is developed and tested on Linux but there seem to be quite a
105 few people using it on Windows. To install AsciiDoc on Windows unzip
106 the distribution zip file contents:
107
108 [subs="attributes"]
109 $ unzip asciidoc-{revnumber}.zip
110
111 This will create the folder +asciidoc-{revnumber}+ containing the
112 `asciidoc.py` and `a2x.py` executables along with configuration files
113 and documentation.
114
115 To generate DocBook based outputs (e.g. PDFs) you will also need a
116 working DocBook toolchain. Installing and configuring a DocBook
117 toolchain on Windows can be a challenge -- this blog post explains
118 http://blog.rainwebs.net/2010/02/25/how-to-create-handsome-pdf-documents-without-frustration/[How
119 to Create Handsome PDF Documents Without Frustration] using
120 http://www.cygwin.com/[Cygwin],
121 http://dblatex.sourceforge.net/[dblatex] and AsciiDoc.
122
123
124 Testing your installation
125 -------------------------
126 Test out asciidoc by changing to the AsciiDoc application directory
127 and converting the User Guide document (`./doc/asciidoc.txt`) to XHTML
128 (`./doc/asciidoc.html`):
129
130 $ python3 asciidoc.py doc/asciidoc.txt
131
132 The link:testasciidoc.html[testasciidoc] tool offers a more extensive set of
133 conformance tests. You can run the tests by executing this command:
134
135 $ python3 ./tests/testasciidoc.py run
136
137 A full battery of tests can be run from the `Makefile` script in the
138 distribution root directory:
139
140 $ make test
141
142
143 [[X2]]
144 Prepackaged AsciiDoc installation
145 ---------------------------------
146 The following platform-specific AsciiDoc packages are available:
147
148 *Fedora Linux*::
149 AsciiDoc is included in Fedora Extras, which is available in
150 the default Fedora installation. To install asciidoc, execute the
151 following command:
152
153 $ yum install asciidoc
154
155 *Ubuntu / Debian*::
156 AsciiDoc is included in Ubuntu / Debian package manager. To install,
157 execute the following command:
158
159 $ apt install asciidoc
160
161 *macOS Homebrew*::
162 AsciiDoc has been packaged in homebrew and is installable using the
163 following command:
164
165 $ brew install asciidoc
166
167 See also link:userguide.html#X38[Packager Notes] in the 'AsciiDoc User
168 Guide'.
148148 ## test: run the asciidoc test suite
149149 .PHONY: test
150150 test:
151 python3 ./asciidoc/asciidoc.py --doctest
151 python3 -m asciidoc.asciidoc --doctest
152 python3 -m pytest
152153 python3 tests/testasciidoc.py run
2727 package manager for your OS or by downloading it from the official Python
2828 website http://www.python.org.
2929
30 Additionally, you wil need:
31
32 * DocBook XSL Stylesheets 1.76.1
33 * xsltproc (libxml 20706, libxslt 10126 and libexslt 815).
34 * w3m 0.5.2
35 * dblatex 0.3
36 * FOP 0.95
37
38 to enable the full AsciiDoc.py toolchain.
39
3040 ## Obtaining AsciiDoc.py
3141
3242 Documentation and installation instructions are on the AsciiDoc.py website
3646 pip3 install asciidoc
3747 ```
3848
49 ## Contributing
50
51 To contribute and test your changes, you will need to install:
52 * flake8
53 * pytest
54 * pytest-mock
55
56 To lint the codebase: `python3 -m flake8`
57
58 AsciiDoc.py has the following types of tests:
59 1. doctests: `python3 -m asciidoc.asciidoc --doctest`
60 1. unit tests: `python3 -m pytest`
61 1. integration tests: `python3 tests/testasciidoc.py`
62
3963 ## LICENSE
4064
4165 Copyright (C) 2002-2013 Stuart Rackham.
00 """asciidoc module"""
11
2 from .api import AsciiDocAPI
3 from .asciidoc import execute, cli
2 import sys
43 from .__metadata__ import VERSION, __version__
54
6 __all__ = ['AsciiDocAPI', 'execute', 'cli', 'VERSION', '__version__']
5 __all__ = ['VERSION', '__version__']
6
7 # If running as a script, we avoid these imports to avoid a circular
8 # RuntimeWarning, which is fine as we don't use them in that case.
9 if "-m" not in sys.argv:
10 from .api import AsciiDocAPI
11 from .asciidoc import execute, cli
12 __all__ += ['AsciiDocAPI', 'execute', 'cli']
00 """Module containing metadata about asciidoc."""
11
2 VERSION = (10, 1, 0)
2 VERSION = (10, 1, 1)
33
44 __version__ = '.'.join(map(str, VERSION))
675675 options.append(('-a', 'a2x-format=%s' % self.format))
676676 options.append(('--out-file', docbook_file))
677677
678 verbose("executing: asciidoc {} {}".format(
679 ' '.join(map(lambda x: "{}{}".format(x[0], " " + x[1] if x[1] else ""), options)),
680 self.asciidoc_file
681 ))
678 verbose("executing: asciidoc {}".format(options))
682679
683680 asciidoc.cli(flatten(['asciidoc'] + options + [self.asciidoc_file]))
684681 if not self.no_xmllint and XMLLINT:
0 AC_INIT(asciidoc, 10.1.0)
0 AC_INIT(asciidoc, 10.1.1)
11
2 AC_SUBST([PACKAGE_DATE], ['17 December 2021'])
2 AC_SUBST([PACKAGE_DATE], ['20 December 2021'])
33
44 AC_CONFIG_FILES(Makefile)
55