typora / typora-issues

Bugs, suggestions or free discussions about the minimal markdown editor — Typora
https://typora.io
1.53k stars 56 forks source link

Support importing embedded media with PDF/pandoc import/export #2074

Open jayjlawrence opened 5 years ago

jayjlawrence commented 5 years ago

See #1725 which is incorrectly closed. The issue is IMPORT of DOC to Typora, not EXPORT of Typora to DOC.

You say:

--extract-media is not needed for docx export

If the source format is a binary container (docx, epub, or odt), the media is extracted from the container and> the original filenames are used. Otherwise the media is read from the file system or downloaded, and new filenames are constructed based on SHA1 hashes of the contents. Its means Pandoc will fetch the image automatically. If not work, please upgrade Typora to latest version first.

While this may be true when writing a DOCX file using Pandoc it is not true when generating MD content. The author of Pandoc explicitly states that Pandoc will only write content that is specified when invoking it. So, without they "extract-media" option being explicitly supplied Pandoc will NOT write image files associated to the MD being generated.

You necessarily must add the "--extract-media" option to Typora's invocation of Pandoc when IMPORTING a DOCX file.

This is such a roadblock for me that I even posted a bounty for it! This is a quick-win issue to resolve!

tradetheplandan commented 4 years ago

Thanks for bringing this up, @jayjlawrence. I wasted about 3 or 4 hours trying to figure out how to make it happen, since we have the import and export feature with Pandoc, I just naturally assumed that meant we could import full documentation-style Word Docs with images, etc. This is a major roadblock for me, as well.

I'd gladly pay someone to make the importing of Word Docs with images into Typora via Pandoc function properly. I'm not 100% sure what else it would take to achieve this functionality, but what jayjlawrence wrote, above, about adding the "extract-media" radio button (and destination folder, etc) sure sounds like it might not be that much trouble to add. Is there someone I could pay to do this? I know you guys may not be bringing in revenue with Typora just yet (my favorite app, now; well-done!) so I'm definitely willing to pay for the time involved in pulling this off.

I have so many 30 - 60-page documents with tons of images that doing it all manually would be such a waste of time. Having it all unified in a wiki-style Typora folder and file tree will be so nice. I imagine that many will appreciate this feature when you guys launch and go live - with everyone moving to Typora from some other system, likely a huge percentage coming over from MS Word, surely big numbers of people will need exactly this. Clicking a button, setting the path, and watching Typora/Pandoc recreate all of my instructional Word docs with images/videos/art from the doc all inline and ready to polish would be so cool.

If you're interested, give me a quote and let's get this thing in there!

So glad you guys have made such an awesome product in Typora.

Daniel

tomcarlson commented 1 month ago

I note this issue is from 2019. It is now 2024. I assume that means it is harder to do than the OP suggested? I would also like to get the images from .epub when importing.