创建/操作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

依赖关系

  • lxml<;http://codespeak.net/lxml/>;用于带前缀的无痛序列化 根元素中的声明(xlmns:prefix=“global:namespace:specifier”)。 也可以声明未使用的前缀。

目标平台是:Python2.7、3.2和3.3。

安装

使用pip:

pip install ezodf2

或来源:

python setup.py install

文档

http://github.com/iwschris/ezodf2(目前,这将很快改变。)

chris@britecore.com发送反馈

Ezodf2可以在github上找到:

http://github.com/iwschris/ezodf2

历史记录

这个包最初由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

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
为Java排序一个好的排序列表   java如何识别最后一行,然后单击Add按钮。。根据人们给出的建议,点击第二行想要点击最后一行任何潜在客户吗   收集器(.stream()。独特的()。collect(Collectors.toList());)在java中从eclipse成功运行并从命令提示符运行?   java致命异常:安卓的后台任务。数据库sqlite。SQLiteException:没有这样的表   java如何创建生成随机特殊字符的方法   java SQL只插入到特定列中   java Hibernate 5.2混合本机和JPA API   在Android应用程序中使用Java获取特定的XML标记文本   java之间的通道差异。addPeer()和channel。joinPeer()   java关闭对serialVersionUID的检查   java如何在不设置Id的情况下处理新的实体对象?   用于afterJob(JobExecution JobExecution)的java Spring批处理将参数从编写器传递到侦听器   java如何通过OSGi声明性服务声明hasa依赖关系?   java Android捕获在警报对话框中启动的OnFocusChange或Recents   Java刽子手游戏(主要关注输出)   java消息在OpenMQ中超时后丢失   Java方法在父级中的占位符用于子级   Java AWT列表框   来自http get请求的java“格式错误的JSON”