Transform other markup languages into asciidoc using pandoc

In all use cases I used pandoc. Together with bash or powershell CLI is possible to convert multiple files.

Here’s the Pandoc command to convert from the command line

If you would like to convert simple markdown file into org-mode file you can use pandoc.

pandoc -f markdown -t org -o newfile.org original-file.markdown

Pandoc can convert between multiple document formats.

To convert a bunch of Markdown files to org-mode:

  for f in `ls *.md`; do
    pandoc -f markdown -t org -o ${f}.org ${f};
  done

Migrate from org file (without emacs)

Export fmr .org to asciidoc or markdown (little step back)

  iconv -t utf-8 .\file-it-other-encoding.org | pandoc -f org -t asciidoc | iconv -f utf-8 > .\file-in-utf8.org

Export org (orgmode) to html from vscode

  pandoc atelier.org -o atelier.html

Convert multiple files

Using recursive version of ls command.

for f in `ls -R *.org | awk '/:$/&&f{s=$0;f=0}/:$/&&!f{sub(/:$/,"");s=$0;f=1;next}NF&&f{ print s"/"$0 }'`; do pandoc -f org -t asciidoc -o ${f}.adoc ${f}; done
Michal Slovík
Michal Slovík
Java developer and Cloud DevOps

My job interests include devops, java development and docker / kubernetes technologies.