Home > Blockchain >  pandoc docx to md with images conversion problem
pandoc docx to md with images conversion problem

Time:03-14

pandoc docx to md batch conversion with images but it's not correctly converting. here is my command

for item in *.docx; do pandoc "$item" -o "${item%.docx}.md" --extract-media=. "$item" ; done

document link(dropbox)

CodePudding user response:

found the soultion docx2md.sh code edited to pandoc -f docx -t markdown -w gfm --extract-media="." -o "$1.md" "../$1.docx" avoid img tag and name conflict. Run

for item in *.docx; do file=${item::-5}; ./docx2md.sh "$file" ; done
  • Related