创建/操作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 Guava:是否可能不使用多重映射映射所有条目。索引()?   java转换键值对作为JSON响应的对象?   java读取一个文本文件,然后计算字母频率,并从高到低列出它们   java Apache CXF为客户提供SEI   java如何在SQL查询中“转义”整个字符串   将JavaServlet定义为主网页servlet注释不起作用   运行jar文件时发生java FileNotFoundException   java有两种加载FXML的方法;为什么一个比另一个更受欢迎?   java无法切换到timeofindia站点页面中的帧   java Firebase Firestore在连接丢失后需要很长时间才能重新连接   java使用来自SQLite的通用数据填充RecyclerView/ListView   当我使用offer和poll独占访问它时,java是LinkedList线程安全的吗?   如何使用包含Java命名空间的XPath检索XML数据?   Spring Boot的java Elasticsearch Searchguard配置   java数组中的数组值赋值?   java保存成功,但更新失败使用Jointable的多对多Spring JPA和额外列   kotlin什么是java。构造器。单()?   简单解析例程的java问题