bash-tutorial/tutorial/pandoc.org

27 lines
589 B
Org Mode
Raw Normal View History

2022-07-18 14:23:28 +02:00
#+options: toc:nil num:nil author:nil
* Convert files using pandoc
Use pandoc with "-s" flag to produce a standalone document and "-o" to redirect
output to a file.
In the example a file "foo" is converted from ~odt~ to ~org~
2022-09-02 22:58:09 +02:00
#+begin_example bash
2022-07-18 14:23:28 +02:00
pandoc -s -o foo.org foo.odt
2022-09-02 22:58:09 +02:00
#+end_example
2022-07-18 14:23:28 +02:00
Check the manual for more information:
#+begin_example bash
man pandoc
2022-09-02 22:58:09 +02:00
#+end_example
** Convert multiple files using 'xarg'
Convert all ~odt~ files to ~emacs-org~:
#+begin_example bash
find . -type f -name '*.odt' -print0 | xargs -0 -n2 -P2 pandoc {} -f odt -o {}.org
#+end_example