admin-shell-io / word2asciidoc Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
First of all, there is a very small error in the image conversion script.
The loop header for image_name, image_path in images_to_convert
needs to be replaced with for image_name, image_path in images_to_convert.items():
else python throws an error. For this I will create a pull, but there is a more important issue with image conversion.
Unlucky for us the word documents include EMF files, which are non-universal and quite a bad choice for documentation purposes. This a proprietary file format from microsoft and is not an image per se, but rather as the name suggests, it is a meta file. It is a set of instructions as to how to construct an image.
We are doing the right thing by converting these into the universal png format. But here, the conversion requires the use of libraries that are to the best of my knowledge limited to windows only. Under other computer operating systems such as Mac OS
or GNU/Linux
or Chrome OS
, opening a EMF file in python will result in the following error:
no decode delegate for this image format `EMF'
.
Viewing the images works fine on these OS'es, but working with them is quite the hastle, which includes opening them in python. On these operating systems, there are ways to manually do the conversion from emf to png. There are several third party tools and libraries that work on Mac OS and Linux that I have tested.
I suggest the following changes:
I am going to create a pull request. If you would like to address this in another way please let me know. Waiting for feedback before creating the pull.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.