From: "Róbert Nagy" <rnagy.monguz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Docx extract media as original filenames
Date: Wed, 25 Nov 2015 01:52:52 -0800 (PST) [thread overview]
Message-ID: <c81870bc-fd16-4d2c-95b8-5dda5937f10c@googlegroups.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 1950 bytes --]
Hello everyone!
I want to covert a docx to a docbook file with --extract-media, so i can
upload the pictures automatically into a database.
Is there any "hack" to keep the original filename for the extracted
picture's name + imegaobject fileref's value?
For example...
I have a file what has been pasted into the docx file with this name ->
picture_upload.png. I want to extract into the /media folder as
'picture_upload.png', and set the docbook's imegamedia fileref's value to
'picture_upload.png' or './media/picture_upload.png'.
In the <file>/word/document.xml there is this block, what contains the
original filename:
<pic:pic xmlns:pic=
"http://schemas.openxmlformats.org/drawingml/2006/picture">
<pic:nvPicPr>
<pic:cNvPr id="0" name="picture_upload.png"/>
<pic:cNvPicPr/>
</pic:nvPicPr>
<pic:blipFill>
<a:blip r:embed="rId21"/>
<a:stretch>
<a:fillRect/>
</a:stretch>
</pic:blipFill>
...
Its reference is in the <file>/word/_rels/document.xml:
Target="media/image110.png"/><Relationship Id="rId21" Type=
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image"
And the docbook output is:
<imagedata fileref="./media/image110.png" />
The file's name in the './media' folder is the same as the "Target" value.
Any idea will help :)
Thank you.
--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/c81870bc-fd16-4d2c-95b8-5dda5937f10c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
[-- Attachment #1.2: Type: text/html, Size: 7443 bytes --]
next reply other threads:[~2015-11-25 9:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-25 9:52 Róbert Nagy [this message]
[not found] ` <c81870bc-fd16-4d2c-95b8-5dda5937f10c-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-11-25 19:49 ` Jesse Rosenthal
[not found] ` <m137vtuaeh.fsf-4GNroTWusrE@public.gmane.org>
2015-11-26 8:10 ` Róbert Nagy
2019-10-14 19:39 ` Daniel Fuchs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c81870bc-fd16-4d2c-95b8-5dda5937f10c@googlegroups.com \
--to=rnagy.monguz-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).