How to convert HTML to AsciiDoc with Pandoc

If you ever need to convert HTML to AsciiDoc, I just used this Pandoc command and it seems to work well:

pandoc --wrap=none -f html -t asciidoc myfile.html > myfile.adoc

The wrapping part of that command isn’t 100% necessary, but if you don’t use it, Pandoc will wrap the plain paragraph text, which I don’t like because I’ll be editing the resulting AsciiDoc text.

Here’s some of the AsciiDoc text that this command generated:


The Scala Build Tool (SBT) doesn’t include a command to create a new[Scala] project, and you’d like to quickly and easily create the directory structure for a new project.


Use either a shell script or a tool like Giter8 to create your project’s directory structure. Both approaches are shown here.

Use a shell script

There may be a way to control what sort of AsciiDoc tags are emitted — such as using == instead of ~~~ — but I haven’t looked into that yet.