0

Currently, I'm trying to move a docx to a mediawiki file and preserve the proper filenames in the [[Image:]] tags. For some reason, the proper image file gets swallowed (ie, normally it'd be media/image4.jpg, but instead it's just empty).

I've tried extracting the docx and looking at docx/word/_rels/document.xml.rels but I have no idea how to figure out what images are duplicated. I made a simple script to do some find/replace, but in one file I have 130 [[Image:]] tags and only 105 images.

As such, I would like to have the MediaWiki filter output the proper image name when doing this:

soffice --headless --convert-to txt:MediaWiki myfile.docx

I'm on ubuntu 14.10.

Is this possible?

svick
  • 236,525
  • 50
  • 385
  • 514
Seiyria
  • 2,112
  • 3
  • 25
  • 51
  • Why can't you just embed the images in the document file? (Personally I'd also use a proper document format like OpenDocument odt.) – Nemo Oct 17 '15 at 08:06
  • Because this was a corporate task, converting lots of old docs to mediawiki format. They had to be taken as-is and converted correctly, which I eventually managed (see my answer). – Seiyria Oct 17 '15 at 14:29
  • Ah. From both question and answer it's not *so* clear that you are converting the documents to wikitext pages. – Nemo Oct 17 '15 at 15:35
  • @Nemo I had suspected that "convert from docx to mediawiki" would have been plainly descriptive there. – Seiyria Oct 17 '15 at 15:36

1 Answers1

0

This doesn't appear to be possible, but I have written a workaround found here that solves it. The long and short of it is that I convert the file and manage uploading / linking of images manually.

Seiyria
  • 2,112
  • 3
  • 25
  • 51