Thursday, March 22, 2018

LibreOffice Help pages can now download example files

Following the introduction of You Tube videos in our help pages, I have enabled the capability of storing OpenDocument files in the help system.

Help authors can now add <object> elements with type="application/vnd.oasis.opendocument.*" where the "*" means "text", "spreadsheet", "drawing", "presentation", "math" and "database".

Since our help pages are mostly textual, it is not the best way to show how a given feature works. By having a real opendocument file available to download directly from the Help is a step to see a real example working.

The implementation of a opendocument object is simple. Just insert an <object> tag specifying the file location in the data attribute, the right type as a valid opendocument MIME type and an id that is a random string.
<object data="media/files/scalc/imtrigon.ods"


type="application/vnd.oasis.opendocument.spreadsheet" /> 

The result in the rendered page is an icon with a link to donwload the page:

just click on the icon to donwload and open the file. If your browser has the right MIME type settings, it can open the file directly in LibreOffice. The file in this example (imtrigon.ods) is a simple Calc file that can be updated easily with LibreOffice.

The intent of adding multimedia and other objects files is complimentary to the precise but often cumbersome textual description. Both are important in a help page. The textual description is a way to describe how a feature does work and the object file is the implementation of the description. When there is a discrepancy, then either the software has a bug, or the page needs a description update.

The OpenDocuments inserted in the help system work in either offline and online version of the new Help pages.

Happy open documenting!