exportmd: Embed images en docx, rtf, epub
This commit is contained in:
parent
5960280976
commit
c6c4c6b201
1 changed files with 4 additions and 2 deletions
|
@ -59,8 +59,10 @@ if test "$format" = epub -o "$format" = rtf -o "$format" = docx; then
|
|||
#if which pandoc >/dev/null; then
|
||||
# pandoc --reference-doc=$HOME/template.docx -s -o "$output" "$htmlfile"
|
||||
if which libreoffice >/dev/null; then
|
||||
echo libreoffice --headless --writer --convert-to "$format" "$htmlfile"
|
||||
libreoffice --headless --writer --convert-to "$format" "$htmlfile"
|
||||
embed_dir="$(mktemp -d)"
|
||||
libreoffice --headless --writer --convert-to "html:HTML (StarWriter):EmbedImages" --outdir "$embed_dir" "$htmlfile"
|
||||
libreoffice --headless --writer --convert-to "$format" "$embed_dir"/*
|
||||
rm -r "$embed_dir"
|
||||
else
|
||||
echo "No tengo libreoffice para convertir a $format."
|
||||
rm "$htmlfile"
|
||||
|
|
Loading…
Reference in a new issue