vendredi 15 juillet 2011

Fodt parsing

I'm extracting the differents files you find in the odt format from the fodt format (content.xml, styles.xml,...) with the xml.dom.minidom library (a Python standard library).

I have modified the ODT parsing method and I still have some errors.
This is the link with modifications and advices from my mentor.

I think I will not continue with the xml.dom.minidom. I will use the lxml library as my mentor recommends me.

jeudi 26 mai 2011

RELATORIO examples ODT/FODT

On the website of RELATORIO you have some examples of how RELATORIO works.

I have take basic.odt which is proposed on here (if you install RELATORIO, you have all files you need on your computer) and I have openned this file with the archive manager and this is what I have:
-4 repositories: Configurations2, META-INF, Pictures and Thumbnails
-5 files: content.xml, meta.xml, mimetype, settings.xml, styles.xml
On fr.wikipedia.org, I have learn the role of the different parts of a ODT file (more details here).

I have also save this file with the .fodt extension.

Files content.xml, settings.xml, styles.xml and meta.xml are exactly in the fodt file (with little changements for content.xml because of pictures)

In fodt files, pictures are represented by binary data but in the odt you only have a link to this one and the it's stored in the pictures repository.

Now I know exactly the connection beetween this two type file. But I still have some problems to determine how RELATORIO deals with odt files it is why I have to ask my mentors some questions.


I'm on my examination session (of the end of the year) during three weeks so I will be not very productive but if I fall behind I will immediatly recover my losted time after my session because I will be on holiday.

ODT and FODT definitions

The ODT format is a collection of several subdocuments within a package, each of which stores part of the complete document.

The FODT format (Flat ODT which is a Flat XML) is not widely used but is a format which is really comprehensible by a computer scientist, you see directly what it contains.

Source: wikipedia.org

mercredi 4 mai 2011

First approach

First of all, thanks to trust in me for this project! I really enjoy to take part in this type of activity. I will do everything I can to achieve objectives.

I have met my mentors and I am analyzing the FODT format.
I have to know how RELATORIO uses ODT format and its source files and try to find how I could make RELATORIO able to use FODT format and its source files. Then I will modify RELATORIO source code.

vendredi 22 avril 2011

Project Definition

Introduction :

The objective of this project is firstly make Relatorio able to use the FODT format as it is a flat-XML. Afterwhile, add support of embed opendocument in frame as you can do with image. And finally is to make Relatorio able to allow templating on data source of graph from spreadsheet opendocument.


The Purpose (Mission) :
  • Make relatorio able to use the FODT format as it is a flat-XML.
  • Add support of embed opendocument in frame on Relatorio.
  • Make relatorio able to allow templating on data source of graph from spreadsheet opendocument.
      
    Description of the project :

    Tryton uses Relatorio for the templating of reports. The format wich is used is ODT. The trick is this files are zip files and to work with this format with a source control as mercurial is possible but ODT files are considered as binary files. The use of Flat ODT overcomes the problem.

    These are the targets we want to meet :
    • Studying and learning softwares.
    • learning new code (XML).
    • Integrate FODT to Relatorio.
    • Integrate the necessary changements to Tryton.
    • Integrate some others formats to Tryton.
        
      This is how our organisation will gain :

      The First project is really independant from other and the method of resolution looks simple.
      I will have to:
      1. To detect if we use a zipped file or not.
      2. Depending on the detection, changing the behavior of loading of Relatorio (thereby Relatorio will continue to do the same job as now).
      The second project and the third project are quite similar because somewhere libreoffice graphics are documents like other. So the third project is a sort of subcase from the second one.
      This is how I will proceed:

      1. To find or to make a syntax with wich Relatorio templates can specify: "I insert here such document".
      2. To make some manually documents to understand the format used by OpenDocument.
      3. Finally I will make sure that the syntax I chose is able to generate this format to xml.
      I will adapt this method to allow templating on data source of graph from spreadsheet opendocument.

      One special point of attendion should be the interaction between the FODT part of the project and the "include other document part".


      Objectives :
      • Start of Program (May 24)
        I have to learn softwares and also to learn XML(I already know Python). I'll also inquire about FODT format to know the best way to integrate FODT to Relatorio. 
      • Midterm Evaluation (July 12)
        To have achieved the first objective wich is to make Relatorio able to use the FODT format and also have a clear structure of how to code the second objective (add support of embed opendocument in frame as you can do with image).
      • Final Evaluation (Aug 16)
        To have integrated Relatorio to tryton with other templates then odt and also have achieved support of FODT for Relatorio.