ODFドキュメント生成ツール

    From The Document Foundation Wiki
    This page is a translated version of the page Documentation/ODF documents generation tools and the translation is 62% complete.
    Other languages:

    開発リソース

    TDF開発者ポータル: https://wiki.documentfoundation.org/Development

    ODFドキュメント生成ツール

    Python

    odfpy
    odpdown
    odsgenerator
    • last release: 2021-05-05

    Java

    ODF Toolkit

    TDF公式プロジェクト。Apacheとコラボレーションしています

    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.

    JavaScript

    WebODF

    HTMLとCSSを利用してODFドキュメントをレンダリングするためのJavaScriptライブラリ。KO GmbHによって開発が始められました。

    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

    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.