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

Aus Open Source Ecology - Germany
Zur Navigation springen Zur Suche springen
(Die Seite wurde neu angelegt: „<syntaxhighlight lang="bash"> soffice --headless --convert-to txt:MediaWiki "Word-Dokument.doc" </syntaxhighlight> Englische Beschreibung aus <code>soffice -…“)
 
 
(4 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
 +
Zum Umwandeln von Textformaten ist das Werkzeug <code>pandoc</code> (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:
 +
 +
<syntaxhighlight lang="bash">
 +
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;
 +
</syntaxhighlight>
 +
 +
 +
== Markdown-Dokumente ==
 +
 +
<syntaxhighlight lang="bash">
 +
pandoc --to gfm 'LibreOffice-Text-Datei.odt' --output 'LibreOffice-Text-Datei.odt.md'
 +
</syntaxhighlight>
 +
 +
== Word-Dokumente ==
 +
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
soffice --headless --convert-to txt:MediaWiki "Word-Dokument.doc"
 
soffice --headless --convert-to txt:MediaWiki "Word-Dokument.doc"
 
</syntaxhighlight>
 
</syntaxhighlight>
 
   
 
   
Englische Beschreibung aus <code>soffice --help</code>
+
Englische Beschreibung übersetzt aus <code>soffice --help</code>
 
   
 
   
  --convert-to OutputFileExtension[:OutputFilterName] \                       
+
  --convert-to AusgabeDateiErweiterung[:AusgabeFiltername] \                       
     [--outdir output_dir] [--convert-images-to]                               
+
     [--outdir verzeichnis_der_ausgabe] [--convert-images-to]                               
     Batch convert files (implies --headless). If --outdir   
+
     Stapelkonvertierung von Dateien (impliziert --headless). Wenn --outdir   
     isn't specified, then current working directory is used
+
     nicht angegeben wird, dann wird das derzeitige Arbeitsverzeichnis
     as output_dir. If --convert-images-to is given, its      
+
     als verzeichnis_der_ausgabe verwendet. Wenn --convert-images-to angegeben wird, wird sein      
     parameter is taken as the target filter format for *all*
+
     Beiwert als Zielfilterformat für *alle* Bilder verwendet, die in das
     images written to the output format. If --convert-to is
+
     Bilderausgabeformat geschrieben. Wenn --convert-to  
     used more than once, the last value of                  
+
     mehr als einmal verwendet wird, wird der letzte Wert von                  
     OutputFileExtension[:OutputFilterName] is effective. If
+
     AusgabeDateiErweiterung[:AusgabeFiltername] wirksam. Wenn
     --outdir is used more than once, only its last value is
+
     --outdir mehr als einmal verwendet wird, ist nur der letzte Wert
     effective. For example:                                 
+
     wirksam. Zum Beispiel:                                 
 
  --convert-to pdf *.odt                                       
 
  --convert-to pdf *.odt                                       
 
  --convert-to epub *.doc                                     
 
  --convert-to epub *.doc                                     

Aktuelle Version vom 11. Dezember 2023, 13:08 Uhr

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