Difference between revisions of "OpenTemplate Client"
m (→Register templates from Basic)
|Line 32:||Line 32:|
Revision as of 18:31, 9 March 2008
The opentemplate client is an addon that will work as a downloader and browser of the recent cliparts, extensions and templates of the OpenTemplate.org 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 Opentemplate.org 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.
So far there are some useful snippets written in OOoBasic to help us get most out of the content.
Register templates from Basic
com.sun.star.frame.DocumentTemplates service can be used to do that. http://api.openoffice.org/docs/common/ref/com/sun/star/frame/DocumentTemplates.html For instance.
oDocTemplates = CreateUnoService("com.sun.star.frame.DocumentTemplates")
bResult = oDocTemplates.addTemplate("group","templ","file:///C:/usr/1.ott")
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.