ODFドキュメント生成ツール
TDF LibreOffice Document Liberation Project Community Blogs Weblate Nextcloud Redmine Ask LibreOffice Donate
開発リソース
TDF開発者ポータル: https://wiki.documentfoundation.org/Development
ODFファイルについて学ぶには、ODFマークアップについての記事をご覧ください。
ODFドキュメント生成ツール
Python
odfdo
- https://github.com/jdum/odfdo
- https://pypi.org/project/odfdo/
- 活発にメンテナンスされています
- 最終リリース日: 2024-05-26
- サンプル: https://github.com/jdum/odfdo/tree/master/recipes
- odfdoはlpod-pythonプロジェクトから派生しています。
odfpy
- https://github.com/eea/odfpy
- https://github.com/eea/odfpy/wiki
- https://pypi.org/project/odfpy/
- 活発にメンテナンスされています (ですが、リリースはあまりありません)
- 最終リリース: 2020-01-18
- サンプル: https://github.com/eea/odfpy/tree/master/examples
- not specifically provided for merging but may do so, examples could be provided
odsgenerator
- https://github.com/jdum/odsgenerator
- https://pypi.org/project/odsgenerator/
- 活発にメンテナンスされています
- 最終リリース日: 2024-01-28
- .json または .yaml ファイルから OpenDocument形式の .ods ファイルを生成します。
odpdown
- https://github.com/thorstenb/odpdown
- メンテナンスされてません
- 最終リリース: 2015-03-13
Java
ODF Toolkit
TDF公式プロジェクト。Apacheとコラボレーションしています
- https://github.com/tdf/odftoolkit
- https://odftoolkit.org/index.html
- 活発にメンテナンスされています
- 最終リリース日: 2019-10-06
PHP
PHPOffice
Third party project, actively maintained. The main developer (Franck Lefevre) had contacted the French-speaking community of LibreOffice through his Twitter account in order to ask questions to an ODF guru. Contacting Svante Schubert, working for CIB, was recommended to him.
- https://github.com/PHPOffice/
- PhpSpreadSheet
- PhpWord
- PhpPresentation, PhpProject & PhpVisio
- 活発にメンテナンスされています
- 最終リリース: 2019-12-02
OpenTBS
Active project, plugin for TinyButStrong but usable without TinyButStrong. Very easy to use, no installation, only two php files containing the classes are needed. Based on user-defined templates.
- https://www.tinybutstrong.com/opentbs.php?doc
- 活発にメンテナンスされています
- 最終リリース: 2019-06-17
JavaScript
WebODF
HTMLとCSSを利用してODFドキュメントをレンダリングするためのJavaScriptライブラリ。KO GmbHによって開発が始められました。
- https://github.com/webodf/WebODF https://webodf.org/
- メンテナンスされていません
- 最終リリース: 2015-09-04
- 最終更新: 2019-02-08
XmlRPC
Nexedi cloudooo
- active maintenance (although few releases)
- last update: 2020-01-02
- no examples
- not specifically provided for merging but may do so
- used by Libriciel for WEBDELIB (generation of deliberations for local governments)
Http
NDCODFAPI Project
- active maintenance
- last release: 2019-09-05
- documentation: https://github.com/NDCODF/ndcodfapi_service/blob/master/Developer_Guide.md
- The documentation is not fully translated into English.
LibreOffice
It is also possible to generate ODF documents running LibreOffice on a server. A LibreOffice process will be able to execute a macro which will itself generate one or more documents, for example via a merge. To call a macro on a Linux server for execution without a GUI :
libreoffice --nofirststartwizard --norestore --headless --invisible "macro:///bibliothèque.module.macro(arg1,arg2...)"
標準的なPythonパッケージを利用して一般的に扱う方法
The ODF standard consists in making a compressed file (by ZIP), which contains various data, most of them in XML format. There is no reason why a generic tool for handling XML should be discarded. Of course, this assumes that the person writing a script knows what XML is, what trees, subtrees, nodes, attributes, etc. are. A good way to work is to start from a template file, which already contains the constant parts of the document to be generated, with the right styles, and a suitable structure, and then create a lightweight script next to it that retrieves data from elsewhere, and uses the DOM tree of the template to generate an elaborate document. Thus, one easily separates the form (in the template) from the content (the data processing).
zipファイル パッケージ
The Python zipfile package allows you to open .odt, .ods, .odg, etc. files and to access their contents, in particular the content.xml file that encodes the content of the document, the Pictures directory that contains the images, etc.
xml.dom.minidom パッケージ
With the minidom class, it is easy to open the content.xml file and analyze its contents in the form of a syntax tree (the DOM tree). When you have this tree, you can find a particular branch, delete it, or modify it, or make copies of it and graft them to the tree before or after another branch.