LibreOffice/OpenOffice.org - non coding extensions

1,511 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,511
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

LibreOffice/OpenOffice.org - non coding extensions

  1. 1. Building community around non codingextensions, create and deploy non codingextensions Kálmán “KAMI” Szalai LibreOffice Conference Paris, France 14 October, 2011 1 LibreOffice Paris 2011 Conference - Non coding extensions
  2. 2. About → Kami OpenOffice.org contributor since 2003 LibreOffice contributor since 2010 Extension development ● Non-coding extensions (OxygenOffice templates, galleries) ● SmART (ex Diagram) [with Tibor Hornyák] ● Barcode [with Dániel Darabos] ● Validator [with Tibor Hornyák] ● WatchWindow [with Tibor Hornyák] Other Free Software activities: Mozilla, Ubuntu System Administrator at a mobile phone monitoring company – http://www.synaptel.com/ 2 LibreOffice Paris 2011 Conference - Non coding extensions
  3. 3. What is LibreOffice Extension? Extending LibreOffice capabilities One file with „.oxt” extension Easy to install and remove Effective update mechanism ● Build-in into LibreOffice Easy entry point for ● Programmers ● Content developers 3 LibreOffice Paris 2011 Conference - Non coding extensions
  4. 4. Levels of extension deployment Shared extension installation ● Installed by the LibreOffice itself or by the system administrator ● User cant add, update or remove it ● System administrator can manage it via CLI, „Package Manager” or replace the extensions dir ● Available for all users 4 LibreOffice Paris 2011 Conference - Non coding extensions
  5. 5. Levels of extension deployment Per-user extension installation ● Installed and managed by the user ● User can manage it via CLI or „Package Manager” ● Available for that user only who installed it 5 LibreOffice Paris 2011 Conference - Non coding extensions
  6. 6. Type of Extensions There are two types of extensions ● Code extension ● Non-coding extensions 6 LibreOffice Paris 2011 Conference - Non coding extensions
  7. 7. Code extension Implements UNO Component ● This is what we use as „Extension” in general ● Integrates into the UI: menu elements and toolbars Calc Add-Ins ● Create one or more Calc function 7 LibreOffice Paris 2011 Conference - Non coding extensions
  8. 8. Non-coding extensions Contains Open Document Format files or special LibreOffice files: ● Templates („.ott”, „.ots”, „.otp”, „.otd”) ● Dictionaries ● Galleries ● AutoCorrect ● AutoTexts ● Databases ● Settings 8 LibreOffice Paris 2011 Conference - Non coding extensions
  9. 9. Structure of extensions „.oxt” files are ZIP files Structured set of files and directories ● META-INF/manifest.xml ● description/* ● licenses/* ● readmes/* ● Paths.xcu ● description.xml ● gallery/*, autotext/*, template/* 9 LibreOffice Paris 2011 Conference - Non coding extensions
  10. 10. META-INF/manifest.xml<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE manifest:manifest PUBLIC "-//OpenOffice.org//DTD Manifest1.0//EN" "Manifest.dtd"><manifest:manifest xmlns:manifest="http://openoffice.org/2001/manifest"> <manifest:file-entry manifest:media-type="application/vnd.sun.star.configuration-data" manifest:full-path ="Paths.xcu"/> <manifest:file-entry manifest:media-type="application/vnd.sun.star.package-bundle-description" manifest:full-path="description/description_en-US.txt" /> <manifest:file-entry manifest:media-type="application/vnd.sun.star.package-bundle-description;locale=de" manifest:full-path="description/description_de-DE.txt" /></manifest:manifest> 10 LibreOffice Paris 2011 Conference - Non coding extensions
  11. 11. Paths.xcu<?xml version=1.0 encoding=UTF-8?><oor:component-data oor:package="org.openoffice.Office"oor:name="Paths" xmlns:install="http://openoffice.org/2004/installation"xmlns:oor="http://openoffice.org/2001/registry"xmlns:xs="http://www.w3.org/2001/XMLSchema"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <node oor:name="Paths"> <node oor:name="Gallery" oor:op="fuse"> <node oor:name="InternalPaths"> <node oor:name="%origin%/gallery" oor:op="fuse"/> </node> </node> </node></oor:component-data> 11 LibreOffice Paris 2011 Conference - Non coding extensions
  12. 12. description.xml (1 of 2)<?xml version="1.0" encoding="UTF-8"?><description xmlns="http://openoffice.org/extensions/description/2006"xmlns:d="http://openoffice.org/extensions/description/2006" xmlns:xlink="http://www.w3.org/1999/xlink"> <identifier value="net.sf.ooop.oxygenoffice.accessories" /> <version value="2.8.0.0" /> <dependencies> <OpenOffice.org-minimal-version value="2.0" d:name="OpenOffice.org 2.0"/> </dependencies> <update-information> <src xlink:href="http://ooop.sourceforge.net/update/extensions.xml" /> </update-information> <registration> <simple-license accept-by="admin" default-license-id="en-US" suppress-on-update="true" > <license-text xlink:href="licenses/license_de-DE.txt" lang="de-DE" /> <license-text xlink:href="licenses/license_en-US.txt" lang="en-US" license-id="en-US" /> </simple-license> </registration> 12 LibreOffice Paris 2011 Conference - Non coding extensions
  13. 13. description.xml (2 of 2) <extension-description> <src xlink:href="description/description_en.txt" lang="en" /> <src xlink:href="description/description_de.txt" lang="de" /> </extension-description> <release-notes> <src xlink:href="readme/readme_en.txt" lang="en" /> <src xlink:href="readme/readme_de.txt" lang="de" /> </release-notes><publisher><name xlink:href="http://ooop.sf.net/" lang="en">OxygenOffice Professional Team</name></publisher><icon><default xlink:href="App1.png" /></icon></description> 13 LibreOffice Paris 2011 Conference - Non coding extensions
  14. 14. Update information Additional update information on the server<?xml version="1.0" encoding="UTF-8"?><descriptionxmlns="http://openoffice.org/extensions/update/2006" xmlns:xlink="http://www.w3.org/1999/xlink"> <identifier value="net.sf.ooop.oxygenoffice.accessories"/> <version value="2.0" /> <update-download> <srcxlink:href="http://ooop.sourceforge.net/download/extension.oxt"/> </update-download></description> 14 LibreOffice Paris 2011 Conference - Non coding extensions
  15. 15. Extension builder scripts You can build extensions easily Example scripts ● https://ooop.svn.sourceforge.net/svnroot/ooop/trunk/utils/ 15 LibreOffice Paris 2011 Conference - Non coding extensions
  16. 16. Templates: Language (in)dependent Use common/* directory for language independent templates ● Feature Request: localizable template names in common section Language dependent templates only visible when the template language = UI language ● Feature Request: language selector @ „Templates and Documents” dialog 16 LibreOffice Paris 2011 Conference - Non coding extensions
  17. 17. Templates: Languages Paths.xcu ● Language independent – <node oor:name="%origin%/template" oor:op="fuse"/> – Files under: template/<categories>/ or template/<other_dir>/ using the trick ● Language dependent – <node oor:name="%origin%/template/$(vlang)" oor:op="fuse"/> – Files under: template/<language id>/<categories>/ or template/<other_dir>/ using the trick 17 LibreOffice Paris 2011 Conference - Non coding extensions
  18. 18. Templates: Built in categories officorr → “Business Correspondence” offimisc → “Other Business Documents” personal → “Personal Correspondence and Documents” forms → “Forms and Contracts” finance → “Finances” educate → “Education” layout → “Presentation Backgrounds” presnt → “Presentations” misc → “Miscellaneous” common → “Language independent” 18 LibreOffice Paris 2011 Conference - Non coding extensions
  19. 19. Templates: Small trick Redefine directory names for templates ● Filename: .nametranslation.tableencoding="UTF-8"[TRANSLATIONNAMES]Docs=DokumentációkProj=Projekt tervek 19 LibreOffice Paris 2011 Conference - Non coding extensions
  20. 20. Templates: Missing functionality Search Tagging Multiple level subdirs ● Second level sub-directories are simply invisible in LibreOffice Template name localization ● For language independent templates – For example templates in common/ folder 20 LibreOffice Paris 2011 Conference - Non coding extensions
  21. 21. Galleries: Building it by hand Embedded elements ● Open: Tools → Gallery ● Select the object and hold the button until „+” sign appearor ● Select the object and CTRL+hold the button ● Drag it to the gallery Linked elements ● Select theme (in Gallery) → Properties → Files → Add 21 LibreOffice Paris 2011 Conference - Non coding extensions
  22. 22. Galleries: Automated way Gengal – easy way to add linked gallery elements ● Not packed with LibreOffice 3.4 (BUG?) Dia filter importer ● https://fedorahosted.org/openoffice.org-diafilter/ 22 LibreOffice Paris 2011 Conference - Non coding extensions
  23. 23. Galleries: Missing functionality Localization (gallery themes, elements) Search Tagging XML based files (still using binary files) BUG: Themes with same name override each other BUG: Linked elements cannot be seen or inserted – wrong path for %origin% variable 23 LibreOffice Paris 2011 Conference - Non coding extensions
  24. 24. Galleries: Localization Not trivial and not possible without rebuilding Gallery code lives in: /svx/ ● source/gallery2/galtheme.src ● Inc/galtheme.hrc Useful environment variables ● GALLERY_ENABLE_ID_DIALOG – Assign to L10n name ● GALLERY_SHOW_PRIVATE_TITLE – L10n name ● AVOID_BURN_IN_FOR_GALLERY_THEME – Do not force color setting (not need in general) No L10n for elements only for themes not for every gallery elements 24 LibreOffice Paris 2011 Conference - Non coding extensions
  25. 25. Setting-override with extension Two step-by-step guide ● http://blogs.oracle.com/kkoll/entry/using_extensions_to_c hange_openoffice ● http://wiki.services.openoffice.org/wiki/Documentation/Ad ministration_Guide/Deactivating_Registration_Wizard 25 LibreOffice Paris 2011 Conference - Non coding extensions
  26. 26. AutoText & Autocorr Create the required AutoTexts and Auto Corrections Copy ● autotext/<name>.bau or ● autocorr/acor_<lang>.datto the extension 26 LibreOffice Paris 2011 Conference - Non coding extensions
  27. 27. Deliver extensions to our users Extensions & Templates site ● Currently in beta test stage – http://extensions-test.libreoffice.org/ – http://templates-test.libreoffice.org/ ● Need more extensions and templates ● Status update about LibreOffice Extensions & Templates site: – 15th of October, morning, La Cantine:Status and Future of the LibreOffice Extension and TemplateRepository by Andreas Mantke 27 LibreOffice Paris 2011 Conference - Non coding extensions
  28. 28. Corporate Extension deployment Shared folder + login script ● Simply copy the extension to the right directory – Shared: /opt/libreoffice3.4/share/extensions/<EXT>/ ● CLI – Shared: unopkg add --shared <EXT> – User: unopkg add <EXT> Use Tools → Extension manager ● User ● Shared (run LO as root :o( ) 28 LibreOffice Paris 2011 Conference - Non coding extensions
  29. 29. Idea: Distribute templates in Extensions Provide collection of templates for categories and/or languages ● Templates for (Hungarian) lawyers ● Templates for kids ● Hungarian templates „On-the-fly” template extension generation ● Users select or search templates (categories, languages, quality)→ They can download it as an extension Easier to install for long-term usage Automatic updates 29 LibreOffice Paris 2011 Conference - Non coding extensions
  30. 30. Call for Template Workgroup Tasks ● Create high quality templates ● Fix and sort already available templates ● Discuss related topics – „Templates and Documents” dialog redesign ● http://wiki.services.openoffice.org/wiki/Feature_-_Templates – Define categories (they are hardcoded in the source) ● LibreOffice brand new template site uses lots more categories ● Unite template creators ● Build community around template localization – Design and build localization workflow for template L10n ● Using dedicated sites or apps like OmegaT 30 LibreOffice Paris 2011 Conference - Non coding extensions
  31. 31. Ideas around templates Possibility of multi-languages templates ● Same layout for every language – Smart script, or – ODF changes Store templates in a repository for template development ● Using version management (GIT) – Commit in uncompressed form (flat file) – Store the base template plus the language dependent content for each language ● Or use document management system 31 LibreOffice Paris 2011 Conference - Non coding extensions
  32. 32. An offer (you cant refuse) Use already collected templates and galleries as a base of further work Huge collection of templates and gallerieshttps://ooop.svn.sourceforge.net/svnroot/ooop/trunk/extras/source/ Licenses – all files are available under free licenseshttps://ooop.svn.sourceforge.net/svnroot/ooop/trunk/documents/license/ 32 LibreOffice Paris 2011 Conference - Non coding extensions
  33. 33. Are you a volunteer? Review the templates and gallery elements Fix possible problems (design, spelling, etc.) Localize the templates Upload to our brand new template site ● Still beta: http://templates-test.libreoffice.org/ Move the selected templates to a official LibreOffice repository Discuss the best possible solution 33 LibreOffice Paris 2011 Conference - Non coding extensions
  34. 34. Are you a developer? Fix the bugs and add feature for ● Gallery ● Templates Documents and Templates dialog redesign ● http://wiki.services.openoffice.org/wiki/Feature_-_Templates – Rather old page – Lets start the brainstorming again 34 LibreOffice Paris 2011 Conference - Non coding extensions
  35. 35. Links Extensionshttp://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Extensions/Extensions Non-code extensionshttp://wiki.services.openoffice.org/wiki/Non-code_extensions LibreOffice Template & Extensions ● http://templates-test.libreoffice.org/ ● http://extensions-test.libreoffice.org/ Our Templates and Galleries collection → LibreOfficehttps://ooop.svn.sourceforge.net/svnroot/ooop/trunk/extras/source/ 35 LibreOffice Paris 2011 Conference - Non coding extensions
  36. 36. Thank you for your attention Building community around non coding extensions, create and deploy non coding extensions Any questions, ideas ● kami911@gmail.com Kálmán “KAMI” Szalai LibreOffice Conference Paris, France 14 October, 2011 36 LibreOffice Paris 2011 Conference - Non coding extensions

×