Вы находитесь на странице: 1из 9

Python Docx

A bullshit-free way to
create, edit, and read MS Word documents
@mikemaccana
github.com/mikemaccana/python-docx

Friday, 19 February 2010


Previous Approaches
Approach Using Shitty Old Technology

Calling Java Apache POI Java

Automating OpenOffice PyUNO OpenOffice

Automating MS Office COM COM

MS OpenXML SDK IronPython Windows

Friday, 19 February 2010


Making Documents
Paragraphs
Bullets/Numbering
Headings Stuff for screen readers
Tables Document Properties
Images
Section and Page Breaks
Friday, 19 February 2010
Reading Documents

Extract plain text of document


Originally I intended this for Python programmers
Has since found popularity with ANGRY UNIX GUYS.
And document properties too.

Friday, 19 February 2010


Manipulating Existing Docs

Add and delete items anywhere within the document


Search + replace

Friday, 19 February 2010


Serving Suggestions

Python LinkedIn API - auto-build a Word doc whenever some


old recruiting dude asks for one.
Lamson - transparently fuck with people’s email
attachments.
NLTK - pass content to NLTK for logical inference, identifying
people / org relationships, etc.

Friday, 19 February 2010


Future

I’m going to fucking have to do styles at some point.


Fuckity fuck fuck fuck.

Friday, 19 February 2010


Join us!

<1000 lines - lxml does all the heavy lifting


nose (currently 100% coverage)
Example code for everything
MIT licensed

Friday, 19 February 2010


Thankyou

github.com/mikemaccana/python-docx
@mikemaccana

Friday, 19 February 2010

Вам также может понравиться