![]() To run a macro in LibreOffice, the scripting file must be in a special system folder or embedded into the document. dev.py will have some useful scaffolding methods that we want to call on while we are developing the code. Our production macros will go into scriptlight.py which we will later embed into our document. And after the project is delivered we can easily archive the folder. So, the first step is to set up a project folder where we can edit, build, test and deploy our code. With any project we like to have our code under version control so we can collaborate and roll back to earlier versions. So, here is what we learned: Set up a project folder It was also a challenge to find good examples of how to code against the extensive API. ![]() However, it was difficult to find information on how to set up a development environment. Python was our favourite in that bunch and once you get going it is a very powerful and productive stack to work with. We could have gone with JavaScript, Basic, Python and the Java-like BeanShell scripting languages. With LibreOffice’s UNO (Universal Network Objects) component model, which has bindings to many programming languages, we were quite spoiled for choice. We were recently asked to automate some editing tasks for the Spotlight English editors who use LibreOffice Writer to prepare their episode copy. ![]() If you have any comments on this Gist please poke me here on Twitter, otherwise, I might miss your comments. You may find OneSheep here on Twitter and Jannie Theunissen here on StackOverflow. Also, the parts regarding the macOS are updated according to this post. However, the website has been down for a while and this a clone from the backup. This tutorial was originally written by Jannie Theunissen on. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |