On 29 July 2012 00:10, Mason Kramer <[email protected]> wrote: > I'm trying to install asciidoc on Mac OS X Lion. I'm getting conflicting > reports on whether certain backends are installed, e.g. html. > > Following the example given at > http://www.methods.co.nz/asciidoc/INSTALL.html, I've cloned the source with > hg and symlinked the executables to my path. > > The problem is that the backends which are supposedly built-in don't seem to > exist according to some tools, but if I pass the backend directly to > asciidoc, it seems to work. > > Here's how it happened, with my thought process at each step. > > [Sat Jul 28 09:44:17: /usr/local/bin/asciidoc-8.6.8] asciidoc --backend list > <no output>
Hi, You have consistently ignored the word "plugin" that occurs throughout much of the description of the use of --backend. If you have not installed any plugins, you only have the built-in backends, and since they are not plugins they do not list. > > I would have expected to see the built-in backends listed here... > > Ok, let's try the tests. > > [Sat Jul 28 09:43:24: /usr/local/bin/asciidoc-8.6.8] python > ./tests/testasciidoc.py run > 1: Test cases > SOURCE: asciidoc: tests/data/testcases.txt > SKIPPED: html4: tests/data/testcases-html4.html > SKIPPED: xhtml11: tests/data/testcases-xhtml11.html > SKIPPED: docbook: tests/data/testcases-docbook.xml > SKIPPED: wordpress: tests/data/testcases-wordpress.html > SKIPPED: html5: tests/data/testcases-html5.html > > ... snip > > TOTAL SKIPPED: 174 > > They're all skipped, presumably because the backends aren't installed. I don't know why they didn't run, but that isn't the reason. > > Well, let's just try it. > > a2x --backend html --destination-dir blah/ --format xhtml --icons-dir > thirdparty/asciidoc-icons asciidoc.txt > a2x: ERROR: missing html backend html is a --format not a --backend since it isn't a plugin. > > Ok, now I'm convinced that html is not installed. Does anything work? Let's > re-run without passing a backend, and let it default to something. > a2x --destination-dir blah/ --format xhtml --icons-dir > thirdparty/asciidoc-icons asciidoc.txt > > a2x: ERROR: "/usr/local/bin/asciidoc-8.6.8/asciidoc.py" --backend docbook -a > "a2x-format=xhtml" --out-file "blah/asciidoc.txt" "asciidoc.txt" returned > non-zero exit status 1 You need to run a2x with the -v verbose option to find out why it failed rather than assuming the reason. > > What! That's strange. It looks like a2x is using the docbook backend by > default, and it's actually outputting a docbook for me (with errors). But I > thought asciidoc --backend list has told me that I don't have any backends > installed. Looks like I'm getting some conflicting information: according to > what I've seen so far, docbook shouldn't be working at all. For built-ins a2x always converts to docbook then runs various toolchains to convert to different outputs, see the documentation. An a2x backend and an asciidoc backend may or may not be the same thing since a2x runs extra tools as well. And an a2x backend plugin could run asciidoc with any asciidoc backend and then process the result into any format it wishes. > > Well, if docbook works when directly passed in, does html? > > asciidoc --backend html --out-file "web/htdocs/static/build/asciidoc.xml" > "web/htdocs/static/asciidoc.txt" > > Success! > > So I guess my question is, why do a2x and asciidoc --backend list see "html" > as a missing backend, but asciidoc have no problem with it? Because --backend list lists *plugins* not built-ins. How do I tell > a2x to pass --backend html to asciidoc? What's the difference between a > --format and a --backend? In a2x --format is one of the built-in backends, --backend is plugins only In asciidoc there is no --format and --backend specifies the asciidoc backend which as you saw may be different to the a2x backend/format. The overlap of backend and format is not ideal, but it has grown up that way and would break all the users build scripts if it was changed now. Cheers Lex > > Best regards, > > Mason > > -- > You received this message because you are subscribed to the Google Groups > "asciidoc" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/asciidoc/-/Xnl13pTnDPwJ. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/asciidoc?hl=en. -- You received this message because you are subscribed to the Google Groups "asciidoc" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/asciidoc?hl=en.
