创建/操作opendocumentformat文件的python包。
ezodf2的Python项目详细描述
摘要
^ {STR 1 } $ EZODF2<强>是一个Python包,用于创建新的或现有的OpenOptoCube (ODF)用于提取、添加、修改或删除文档数据的文件。
一个简单的例子:
from ezodf2 import newdoc, Paragraph, Heading, Sheet odt = newdoc(doctype='odt', filename='text.odt') odt.body += Heading("Chapter 1") odt.body += Paragraph("This is a paragraph.") odt.save() ods = newdoc(doctype='ods', filename='spreadsheet.ods') sheet = Sheet('SHEET', size=(10, 10)) ods.sheets += sheet sheet['A1'].set_value("cell with text") sheet['B2'].set_value(3.141592) sheet['C3'].set_value(100, currency='USD') sheet['D4'].formula = "of:=SUM([.B2];[.C3])" pi = sheet[1, 1].value ods.save()
有关更多示例,请参见:/examples folder
持续集成状态
[![生成状态](https://travis-ci.org/iwschris/ezodf2.png)](https://travis-ci.org/iwschris/ezodf2.png)
依赖关系
- lxml<;http://codespeak.net/lxml/>;用于带前缀的无痛序列化 根元素中的声明(xlmns:prefix=“global:namespace:specifier”)。 也可以声明未使用的前缀。
目标平台是:Python2.7、3.2和3.3。
安装
使用pip:
pip install ezodf2
或来源:
python setup.py install
历史记录
这个包最初由manfred moitzi创建,名为ezodf(https://bitbucket.org/mozman/ezodf)
更改
版本0.2.10-2013年7月
- Alpha version
- Changed to MIT License
- tested: on Ubuntu 12.10 and 13.04 with python 2.7, 3.2, and 3.3
版本0.2.9-2013年7月
- Alpha version
- Updated setup.py to be compatible with setuptools or distutils
- Removed unecessary requirements
- tested: on Ubuntu 12.10 and 13.04 with python 2.7, 3.2, and 3.3
版本0.2.8-2013年7月
- Alpha version
- Updated setup.py to use setuptools
- Updated setup.py requirements to use install_requires
- Added distribute as a requirement
- Fixed the lxml install problem
- tested: on Ubuntu 12.10 and 13.04 with python 2.7, 3.2, and 3.3
版本0.2.4-2012年6月
- Alpha version
- can open tables with many repeated rows/cols, 3 opening strategies are supported
- tested: on Windows7 32 Bit with CPython 2.7 and CPython 3.2
版本0.2.3-2012年1月
- Alpha version
- tested: on Windows7 32 Bit with CPython 2.7 and CPython 3.2
版本0.2.2-2011年3月
- Alpha version
- Spreadsheet: added cell-span management
- tested with Python 3.2 - OK
- added tobytes() method to all document classes
- opendoc() accept the zip-file content as ‘bytes’ instead of the filename as parameter ‘filename’
- newdoc() accept the zip-file content as ‘bytes’ instead of the filename as parameter ‘template’
版本0.2.1-2011年2月6日
- Alpha version
- added basic spreadsheet support
- Spreadsheet: added sheet, row, column and cell management
版本0.2.0-2011年1月18日
- Alpha version
- create new empty odt, ods, odp, odg file
- added template support - can create ott, ots, otp, otg files
- open documents - ezodf2.opendoc(filename)
- create new documents - ezdof.newdoc(doctype, filename, template)
- Text: added Paragraph, Heading, Span, Hyperlink, List, Section objects
版本0.1.0-2011年1月2日
- Pre-Alpha version
- open/saveas ODF documents
- modify meta data