OpenTemplate Client

From Apache OpenOffice Wiki
Jump to: navigation, search

The opentemplate client is an addon that will work as a downloader and browser of the recent cliparts, extensions and templates of the site. The user will be able to get the latest templates from OT (OpenTemplates) and even filter the retrieval to just get a specific category.

This addon will be able to connect to the API and retrieve the data, parse it and store into a listbox. Once the user decide what he want's it will submit the URI and retrieve the content (using cURL). The add-on itself will provide with filters on combolist so that the retrieval can be filtered out before hand.

The main challenges are:

  • the ideal widget would be a grid application as opposed to listbox.
  • Retrieving an image might be challenging.
  • Good OS detection and path manipulation (localization).
  • Load images into a image component.
  • Codewise detect and register each of the types of extensions into OOo.

Ot uml.png

How it works?

The Opentemplate client is composed of different parts, the client would need to be accesible to the users. The next step is to define the retrieval of the webservice on the OpenTemplate API.

The OpenTemplate API is based on a REST-inspired web service where it has some authentication process in order to use it. You can access the service through your account or through a valid ip.

The next step is to interact with the API and filter the content, the client would need to.

Code snippets

So far there are some useful snippets written in OOoBasic to help us get most out of the content.

Register templates from Basic service can be used to do that. For instance.

[oobas] oDocTemplates = CreateUnoService("") bResult = oDocTemplates.addTemplate("group","templ","file:///C:/usr/")

Retrieve data online


Parse XML from Basic

Currently just a SAX model was found. I would want to see miniDom or DOM parsing for REST.

Personal tools