Pelican Plugin for AsciiDoc3 available
Published: 2018-12-25
The Python-driven blog software Pelican https://getpelican.com now understands AsciiDoc3!
The required plugin asciidoc3_reader is waiting to be merged: https://github.com/getpelican/pelican-plugins/pull/1081 You can also find the sources here: https://github.com/asciidoc3/pelican-plugins/tree/asciidoc3_reader/asciidoc3_reader
The news need the extension ad3 (as in mytext.ad3) to be recognized by pelican - the very page you are reading just now is successfully produced in this way.
Xmas sprint
Published: 2018-12-14
The time from this weekend until the beginnig of 2019 there will be our first AsciiDoc3 coding sprint. We’d like to improve/start two things:
-
PyPI (especially Windows-User);
-
a simple GUI.
Revisit our website soon to check out the progress.
AsciiDoc3 Downloads are Rising
Published: 2018-11-03
The last two weeks we monitored an increasing number of downloads. Since we cannot count the access to GitLab and PyPI by users the real quantity is even greater. We see at laest two reasons:
-
AsciiDoc3 is stable, it works simply;
-
AsciiDoc3 uses Python3, probably (in my opinion) at the moment the most popular uand recommended language.
However, we should not rest on our laurels. There is work to do (see here), and we’ll do it.
This Blog uses AsciiDoc3
Published: 2018-10-23
New Start New Blog
Welcome everybody to the "new" AsciiDoc3-blog here on asciidoc3.org. The css isn’t very viewy at this time, I confess, but apparently it works… The blog software "getPelican" is powered by Python3 - this was one reason to leave the WordPress driven precursor.
This Post is processed by AsciiDoc3
And a second reason to switch to getPelican: this very first post is written as a text file "post.ad3" and afterwards computed by AsciiDoc3. To do so, I used a self-written plugin "asciidoc3_reader" (based on the existing "asciidoc_reader"). This plugin will be released asap - you’ll find it at Pelican’s home on GitHub.
AsciiDoc3 debuts on PyPI
Published: 2018-10-19
It was a huge effort but now you can test the result by yourself: AsciiDoc3 is available on PyPI to be installed via pip.
To rule out any imponderables it is tagged as beta, but it passes all tests …
See here for more detailed information.
AsciiDoc3 speeds up 15-20% with @functools.lru_cache
Published: 2018-09-26
AsciiDoc3 is fast, but it’s getting even faster. No tricks needed, just making use of Python’s "included batteries". Read more about my tuning of AsciiDoc3’s core asciidoc3.py. (Feel free to follow the steps and try yourself!)
The first step is to gather some information about the behavior of asciidoc3.py before we start the tuning procedure. We use module cProfile in a quick dirty way (output shortened):
pc:~/.asciidoc3/doc$ python3 -m cProfile ../asciidoc3.py userguide.txt 8979863 function calls (8952700 primitive calls) in 13.708 seconds Ordered by: standard name ncalls tottime percall cumtime percall filename:lineno(function) 41 0.000 0.000 0.000 0.000 frozen importlib._bootstrap:103(release) 41 0.000 0.000 0.000 0.000 frozen importlib._bootstrap:143(__init__) 41 0.000 0.000 0.000 0.000 frozen importlib._bootstrap:147(__enter__) 41 0.000 0.000 0.000 0.000 frozen importlib._bootstrap:151(__exit__) 41 0.000 0.000 0.000 0.000 frozen importlib._bootstrap:157(_get_module_lock) \... 46 0.000 0.000 0.000 0.000 abc.py:9(abstractmethod) 3961 0.009 0.000 0.020 0.000 asciidoc3.py:101(items) 2122 0.024 0.000 0.372 0.000 asciidoc3.py:4253(subs) 1599 0.006 0.000 0.096 0.000 asciidoc3.py:4263(isnext) 2648 0.008 0.000 0.027 0.000 asciidoc3.py:427(dovetail) 910823 1.635 0.000 2.364 0.000 asciidoc3.py:4276(match) 1924 0.022 0.000 0.110 0.000 asciidoc3.py:4295(extract_passthroughs) 1924 0.003 0.000 0.004 0.000 asciidoc3.py:4304(restore_passthroughs) \...
We are interested only in functions of asciidoc3.py (see column "filename"), not in system calls like frozen importlib._bootstrap. I tried out some of the shown functions, but in the end I got stuck with this candidate in "class Macros, def match(…)"
910823 1.635 0.000 2.364 0.000 asciidoc3.py:4276(match)
We’re talking about more than 900,000 calls and 2.3 seconds cumtime - about 18% of the entire run-time: "def match(…)" deserves some acceleration. Let’s start (asciidoc3.py - edited lines are bold #):
from decimal import Decimal, ROUND_HALF_UP from functools import lru_cache ##### from io import StringIO as io_StringIO class Macros: ... def isnext(self): """Return matching macro if block macro is next on reader.""" reader.skip_blank_lines() line = reader.read_next() if line: for m in self.macros: if m.prefix == '#': if m.reo.match(line): self.current = m return m return False @lru_cache() ##### def match(self, prefix, name, text): """Return re match object matching 'text' with macro type 'prefix', macro name 'name'.""" for m in self.macros: if m.prefix == prefix: mo = m.reo.match(text) if mo: if m.name == name: return mo if re.match(name, mo.group('name')): return mo return None def extract_passthroughs(self, text, prefix=''): def asciidoc3(backend, doctype, confiles, infile, outfile, options): ... else: if document.attributes.get('DoNotUse') == 'AndDoNotEdit': Ad3Codec.fixed_encoding = False else: Ad3Codec.fixed_encoding = True # to ensure encoding in subprocess and conf-files: Ad3Codec.add_encoding_for_compatibility() if 'quirks' in document.attributes: message.verbose('No quirks-mode in AsciiDoc3 any more!') writer.newline = config.newline try: writer.open(outfile, reader.bom) try: document.translate(has_header) # Generate the output. finally: writer.close() finally: reader.closefile() # inspect cache use ##### print(macros.match.cache_info()) ##### except KeyboardInterrupt: raise except Exception as e: # Cleanup ...
The output looks very interesting:
CacheInfo(hits=885758, misses=25065, maxsize=128, currsize=128) 7205035 function calls (7177872 primitive calls) in 10.923 seconds ... 25065 0.046 0.000 0.075 0.000 asciidoc3.py:4275(match)
Trying other values for maxsize in steps of 2**x
@lru_cache(131072) 2**17 CacheInfo(hits=889588, misses=21235, maxsize=131072, currsize=21235) 7196631 function calls (7169468 primitive calls) in 10.912 seconds @lru_cache(65536) 2**16 CacheInfo(hits=889588, misses=21235, maxsize=65536, currsize=21235) 7196631 function calls (7169468 primitive calls) in 10.915 seconds
BTW, the output-file "userguide.html" is binary identical in all cases.
Wow! We see (13.708 - 10.915) / 0.13708 = ~20% less time.
But beware, we have to keep in mind, AsciiDoc3 should run with any version of Python3, and @functools.lru_cache was implemented in Python 3.2. So we have to edit asciidoc3.py avoiding uncatched exceptions:
from decimal import Decimal, ROUND_HALF_UP try: ##### from functools import lru_cache ##### except (NameError, ModuleNotFoundError, ImportError): ##### pass ##### from io import StringIO as io_StringIO ... def match(self, prefix, name, text): """Return re match object matching 'text' with macro type 'prefix', macro name 'name'.""" #print("y") for m in self.macros: if m.prefix == prefix: mo = m.reo.match(text) if mo: if m.name == name: return mo if re.match(name, mo.group('name')): return mo return None try: ##### #lru_cache not implemented in Python < 3.3 ##### match = lru_cache(65536)(match) # 2**16 = 65536 ##### except (NameError, ModuleNotFoundError, ImportError): ##### pass #####
and remove the "# inspect cache use #print(macros.match.cache_info())" statements.
The mentioned ~20% are also seen for other input files.
The edited "asciidoc3.py" will be part of the next version AsciiDoc3-3.0.3, coming asap!
Summary:
@functools.lru_cache saves about 20% of my developing time!
No Substantial New Findings
Published: 2018-09-09
The renegotiation about the license of AsciiDoc3 (started by @ArneBab) brings no substantial new findings to me … read more: https://github.com/asciidoc3/asciidoc3/issues/3#issuecomment-419718677
README Update
Published: 2018-08-25
The README.md file on https://gitlab.com/assciidoc3/asciidoc3 was updated.
The same holds for https://gitlab.com/assciidoc3/asciidoc3-website. There you can find the sources of https://asciidoc3.org, including build-website.sh, which uses AsciiDoc3 to produce all the HTML-files.
Homepage Revision
Published: 2018-08-16
Our homepage https://asciidoc3.org was somewhat updated. No big deal, only proofreading and typos.
Tests are available again …
Published: 2018-08-11
Take a look at https://gitlab.com/asciidoc3/asciidoc3
You’ll see there new files in directory tests: standard tests suitable for AsciiDoc3 are available again. Nothing spectacular at this moment, but it is a good start and there are more in the pipeline.
Current Activities: Tests and Webpage
Published: 2018-07-30
What is going on about AsciiDoc3? First we are working on an advanced test-suite: so you can "in a flash" screen if your new version of asciidoc3.py produces the binary identical output compared with the previous version. Release date is scheduled the first week of Aug '18 (gitlab.com/asciidoc3/asciidoc3).
Second is the careful modification of the website https://asciidoc3.org towards a responsive layout. Some steps are already made, we have no fixed timetable here.
Up-to-date Repo on GitLab
Published: 2018-07-16
The former repo on GitHub github.com/asciidoc3/asciidoc3 is still there. But from now on it serves as a starting point to the up-to-date repo on GitLab https://gitlab.com/asciidoc3/asciidoc3. Please use the new location for all your comments/issues/merge-requests.
asciidoc3port
Published: 2018-07-10
There is a new page on asciidoc3.org: https://asciidoc3.org/asciidoc3port.html
There you can find information about the process of porting AsciiDoc to AsciiDoc3 (Python3). Not mandatory when using AsciiDoc3 of course, but - as I think - interesting for those, who want understand more about the details of the program.
AsciiDoc3 moves to GitLab
Published: 2018-07-09
In consequence of the MicroSoft/GitHub deal AsciiDoc3 migrates to GitLab (see: https://about.gitlab.com/2018/06/03/movingtogitlab/) You can find us here:
https://gitlab.com/asciidoc3/asciidoc3
The repo on GitHub is still open for comments, but all further development will be on GitLab.
Tests Change Location
Published: 2018-07-08 (updated 2018-9-7)
see AsciiDoc3 moves to GitLab
... But if you are interested in the existing and forthcoming (unit-)tests, take a look at GitLab (yes, not GitHub): gitlab.com/asciidoc3/asciidoc3
This repo contains AsciiDoc3 plus the tests in branch test. So the former test-repo became redundant and was deleted.
asciidoc3.org is now responsive (… nearly)
Published: 2018-07-06
The hitherto existing layout was subtle revised: the main menu is now found underneath the banner. In addition the new layout fulfilled some terms of responsive design - not perfect yet, of course. We do hope that you like it!
Sources are available: https://gitlab.com/asciidoc3/asciidoc3-website
Minor Commits Regex
Published: 2018-07-04
To avoid deprecation warnings (when Python3.7 is used) some *.conf and *.py files have been edited. In module re (?u) is the default, so this is removed; (?su) becomes (?s), and (?msu) is now (?ms).
The new files can be found here: https://github.com/asciidoc3/asciidoc3
AsciiDoc3 in Part on GitLab
Published: 2018-07-03
From now on you can find two sections of the AsciiDoc3 project on GitLab:
The sources of asciidoc3.org: https://gitlab.com/asciidoc3/asciidoc3-website and some tests (the normal user doesn’t need this stuff …) https://gitlab.com/asciidoc3/asciidoc3-tests
The core of AsciiDoc3 remains on GitHub: https://github.com/asciidoc3/asciidoc3
Contact Form Switched Off
Published: 2018-06-22
Due to an increasing amount of spam we decided to switch off the contact form. Please use your favorite mail-client:
info ~at~ asciidoc3.org.
Site Update and GitLab
Published: 2018-06-17
The site asciidoc3.org was updated: broken links, minor text rearrangements et al.
You can find the "tests" from now on at https://gitlab.com/asciidoc3/asciidoc3-tests
(GitLab, not GitHub!) - still work in process. The asciidoc3-repo stays as before: https://github.com/asciidoc3/asciidoc3
New Release: AsciiDoc3-3.0.2
Published: 2018-06-15
AsciiDoc3-3.0.2 is ready to download. Some highlights: all GPLv2+, enhanced documentation, bug fixing, eliminating typos …
AsciiDoc3-3.0.2 is coming soon
Published: 2018-06-09
... and what’s in the new release?
-
Some license issues will be adjusted,
-
some minor bugs will be fixed,
-
some documentation will be added,
-
… (cont.).
More information asap.
2 weeks - 60 AsciiDoc3
Published: 2018-06-02
Two weeks have gone since the going online of the latest release AsciiDoc3-3.0.1
We count about 60 downloads of the tarball here on asciidoc3.org - no information is on hand about github.com/asciidoc3/asciidoc3. I think, this is acceptable. Thx!
v3.0.1 on GitHub
Published: 2018-05-18
The source on https://github.com/asciidoc3/asciidoc3 is now tagged as:
v3.0.1 … have fun with AsciiDoc3 using Python3!
30 downloads since yesterday
Published: 2018-05-17
The first real release with installer/uninstaller, (almost) complete manual and many other enhancements went public 24h ago. Since just now, the server counts 24 downloads of the tarball - neat! Thank you!
New version released: AsciiDoc3-3.0.1
Published: 2018-05-16
At last: today (2018-5-16) the new version AsciiDoc3-3.0.1 will be released.
Compared with the release-candidate there are many improvements: An installer let you to start asciidoc3 or a2x3 from the command line (an uninstaller is provided, too …). Typos are corrected, documentation completed and so on …
AsciiDoc3 becomes GPLv3
Published: 2018-05-11
I encounter some kind of ‚shitstorm‘ since my statement about choosing the AGPLv3.
All right, I do not insist on AGPL, the forthcoming release of AsciiDoc3 will be ‚GPLv3 or later‘ …
AGPLv3 revisited
Published: 2018-05-10
... started a question at Stackexchange and asked a ‚well-established‘ lawyer off the record. Both answers confirmed my resolution to choose the AGPLv3.
The trick is in my words: there was never a software under GPLv3 until now, AsciiDoc is GPLv2 or later. There is no ‚switching from GPLv3 to AGPLv3‘, because there is/was no GPLv3! So, according to the ‚compatibility matrix‘, you may upgrade from GPLv2 to AGPLv3. All right.
Adding github tag
Published: 2018-05-07
Added a tag "3.0.1-release candidate" at github-repo.
That’s only effective for a few days, because the "3.0.1 release" is in the starting blocks …
Adding topics on github/asciidoc3
Published: 2018-05-06
I added the following "topics" to https://github.com/asciidoc3/asciidoc3:
-
asciidoc3
-
python3
-
asciidoc
-
python3-port
I do hope, this will help spreading AsciiDoc3 all over the world …
GPLv2 or later upgrade to AGPLv3
Published: 2018-05-05
Started a question at Stackexchange:
I modify open source software that is under ‚GPLv2 or later‘. I will upgrade to GPLv3 or later – that‘s of cause no problem at all. Not looking for advice in this case, but is it possible to upgrade to AGPLv3, too? The info provided at gnu.org/licenses/ are not clear for me. In short: GPLv2 or later → AGPLv3, possible, yes or no?
Next Steps
Published: 2018-05-03
Hi all,
-
the installer for POSIX-systems is ready to start
-
I was not satisfied with the aap/makefile procedure, so for the present the script will be implemented in Python. Perhaps later we’ll use make again.
-
The same holds for the uninstall-script.
Other upcoming changes:
-
Typos in userguide.txt and conf-files (nothing dangerous …).
-
Adding a documentation of porting to Python3.
-
Adding some testcases.
-
etc.
-
(not definitely decided about changing license from AGPLv3 to GPLv3).
-
Eliminate the issues reported by validator.w3.org (nothing dangerous, 3 warnings). The very next update isn’t a release candidate any more; it will come very soon …
asciidoc3.org now uses https
Published: 2018-04-25
Hi all,
a simple step to make asciidoc3.org more secure and better to find by Tante Gugel (aunt gugel as we say occasionally in German): I have added an Let’s Encrypt certificate to make use of the https-protocol.
Release Candidate AsciiDoc3 is out now!
Published: 2018-04-17
AsciiDoc3 starts!
Yesterday I deactivated the login block for this website and added the first bundle of files at github.com/asciidoc3/asciidoc3.
A first mail came in only a few minutes later saying "well done" - Thx! But there is work to do …
Asciidoc3 starts very soon!
Published: 2018-04-13
Hello everybody out there,
I am just preparing to release the first AsciiDoc3 release candidate. This will take a few days: writing the missing texts to be published on the website, edit github/asciidoc3 and other things. There are more things to do than expected - and they costs more time as expected …