Benutzer:Andreas Plank/Hilfe – Textumwandlung (HTML, Markdown, Wiki, Text usw.)

Aus Open Source Ecology - Germany
Zur Navigation springen Zur Suche springen

Zum Umwandeln von Textformaten ist das Werkzeug pandoc (https://pandoc.org) sehr hilfreich, es kann die meisten üblichen Textformate umwandeln, und die möglich verfügbaren Eingabeformate und Ausgabeformate erfragt man wie folgt:

pandoc --list-input-formats

# biblatex; bibtex; commonmark; commonmark_x; creole; csljson; csv; docbook; docx; dokuwiki; endnotexml; epub; fb2; gfm; haddock; html; ipynb; jats; jira; json; latex; man; markdown; markdown_github; markdown_mmd; markdown_phpextra; markdown_strict; mediawiki; muse; native; odt; opml; org; ris; rst; rtf; t2t; textile; tikiwiki; tsv; twiki; vimwiki;

pandoc --list-output-formats

# asciidoc; asciidoctor; beamer; biblatex; bibtex; chunkedhtml; commonmark; commonmark_x; context; csljson; docbook; docbook4; docbook5; docx; dokuwiki; dzslides; epub; epub2; epub3; fb2; gfm; haddock; html; html4; html5; icml; ipynb; jats; jats_archiving; jats_articleauthoring; jats_publishing; jira; json; latex; man; markdown; markdown_github; markdown_mmd; markdown_phpextra; markdown_strict; markua; mediawiki; ms; muse; native; odt; opendocument; opml; org; pdf; plain; pptx; revealjs; rst; rtf; s5; slideous; slidy; tei; texinfo; textile; typst; xwiki; zimwiki;


Markdown-Dokumente

pandoc --to gfm 'LibreOffice-Text-Datei.odt' --output 'LibreOffice-Text-Datei.odt.md'

Word-Dokumente

soffice --headless --convert-to txt:MediaWiki "Word-Dokument.doc"

Englische Beschreibung übersetzt aus soffice --help

--convert-to AusgabeDateiErweiterung[:AusgabeFiltername] \                      
    [--outdir verzeichnis_der_ausgabe] [--convert-images-to]                               
    Stapelkonvertierung von Dateien (impliziert --headless). Wenn --outdir   
    nicht angegeben wird, dann wird das derzeitige Arbeitsverzeichnis 
    als verzeichnis_der_ausgabe verwendet. Wenn --convert-images-to angegeben wird, wird sein     
    Beiwert als Zielfilterformat für *alle* Bilder verwendet, die in das
    Bilderausgabeformat geschrieben. Wenn --convert-to 
    mehr als einmal verwendet wird, wird der letzte Wert von                  
    AusgabeDateiErweiterung[:AusgabeFiltername] wirksam. Wenn 
    --outdir mehr als einmal verwendet wird, ist nur der letzte Wert 
    wirksam. Zum Beispiel:                                 
--convert-to pdf *.odt                                      
--convert-to epub *.doc                                     
--convert-to pdf:writer_pdf_Export --outdir /home/user *.doc
--convert-to "html:XHTML Writer File:UTF8" \             
            --convert-images-to "jpg" *.doc              
--convert-to "txt:Text (encoded):UTF8" *.doc