
Security News
Bun 1.2.19 Adds Isolated Installs for Better Monorepo Support
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
########### Python docx ###########
The docx module creates, reads and writes Microsoft Office Word 2007 docx files.
These are referred to as 'WordML', 'Office Open XML' and 'Open XML' by Microsoft.
These documents can be opened in Microsoft Office 2007 / 2010, Microsoft Mac Office 2008, Google Docs, OpenOffice.org 3, and Apple iWork 08.
They also validate as well formed XML <http://validator.w3.org/check>
_.
The module was created when I was looking for a Python support for MS Word .docx files, but could only find various hacks involving COM automation, calling .Net or Java, or automating OpenOffice or MS Office.
The docx module has the following features:
Features for making documents include:
.. image:: http://github.com/mikemaccana/python-docx/raw/master/screenshot.png
Thanks to the awesomeness of the lxml module, we can:
Just download python docx <http://github.com/mikemaccana/python-docx/tarball/master>
_.
Use pip or easy_install to fetch the lxml and PIL modules.
Then run::
example-makedocument.py
Congratulations, you just made and then modified a Word document!
If you just want to extract the text from a Word file, run::
example-extracttext.py 'Some word file.docx' 'new file.txt'
Ideas & To Do List
- Further improvements to image handling
- Document health checks
- Egg
- Markdown conversion support
We love forks, changes and pull requests!
Want to talk? Need help?
Email python-docx@googlegroups.com
License
~~~~~~~
Licensed under the `MIT license <http://www.opensource.org/licenses/mit-license.php>`_
Short version: this code is copyrighted to me (Mike MacCana), I give you
permission to do what you want with it except remove my name from the credits.
See the LICENSE file for specific terms.
FAQs
The docx module creates, reads and writes Microsoft Office Word 2007 docx files
We found that docx demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
Security News
Popular npm packages like eslint-config-prettier were compromised after a phishing attack stole a maintainer’s token, spreading malicious updates.
Security News
/Research
A phishing attack targeted developers using a typosquatted npm domain (npnjs.com) to steal credentials via fake login pages - watch out for similar scams.