Ask Your Question
2

Did you know that you could also use APSO to Organize your Python scripts within LibreOffice?

asked 2017-05-21 22:33:07 +0200

librebel gravatar image

updated 2017-06-19 11:51:08 +0200

In 2012, the original code for the "Alternative Python Script Organizer" ( APSO ) was written by Hanya. Some adjustments to the code were made at that time by @karolus. In 2016, Hubert Lambert adapted the original script and made it into an .oxt extension. The APSO extension is available on the French OpenOffice Forum, with an introduction text in French.

EDIT 2017-06-19 11:27 As of today the APSO extension can also be downloaded from the LibreOffice Extensions repository: APSO - Alternative Script Organizer for Python ( Thanks Jean-Marc Zambon and @Ratslinger ). END OF EDIT 2017-06-19 11:27

i tried to translate the original introduction text from Hubert Lambert into English: ( please forgive any errors in the translation that might have occurred, and correct where necessary.. )

______________ Start of translation

Managing Scripts in Python by Hubert Lambert » 09 Nov 2016 17:49

Good day to all,

[To follow up on [this thread](https://forum.openoffice.org/fr/forum/viewtopic.php?f=8&t=52689), and in particular the suggestion by Dude, i post here a part of the original message.]

Hanya, one of the most brilliant and effective contributors of the sections "Macros and API" on the English-language forum, has in 2012 proposed a script ( Alternative Python Script Organizer ) that enormously simplifies the management of Python scripts on OpenOffice or LibreOffice. I think this script deserves a far better visibilty.

To make it easier to use, i have adapted it as follows :

 - French translation of the commands and menu-items ;
 - Added two commands "Embed in document" and "Export" from an existing document ( the code is but a variation of the original code by Hanya ) ;
 - ( Very elementary ) implementation of the option "Edit" through which the script can be modified by the default system editor ;
 - Packaging into an extension to facilitate the installation.

Once this extension is installed ( and the program is restarted just to make sure ), a new menu-item "Organise python scripts..." will appear in the submenu "Macros" of the menu "Tools".

[APSO_menu.png]

This new menu-item opens a dialog box listing the scripts and proposing various actions :

[APSO_dialogue.png]

The button "Execute" allows you to launch the selected macro.

The available actions from the button "Menu" vary according to the selection, and they are :

 - Create a library or a module if the selection is a container ( "user", "share" or "document" ) ;
 - Edit*, rename, delete a module or a library ;
 - Copy a module from the application ( "user" or "share" ) to the current document ;
 - Replace a module that is embedded in a document by a module that is located on the computer ;
 - Export a module that is embedded in a document.
 [* The option "Edit" only opens the module with the text-editor associated by default to the extension ".py". It doesn't work for scripts that are embedded inside a document.]

This version 0.2, compatible with OpenOffice and LibreOffice, also includes the following elements :

 - internationalization of the extension ( currently French and English ) ;
 - Added a default keyboard shortcut ( Shift + Alt + F11 ) for quick launch ;
 - a mini-library to facilitate development ...
(more)
edit retag flag offensive close merge delete

Comments

@librebel The version on the French site is the same - v0.8.3. It it definitely worth mentioning that APSO provides an easy mechanism to embed Python scripts into documents.

Ratslinger gravatar imageRatslinger ( 2017-05-21 22:46:04 +0200 )edit

Merci @Ratslinger, i added that last line as a precaution in case a newer version might become available in the future, in case when this thread is not updated with the newest version, and the French site is. A propos... the APSO functionality should be integrated into LibreOffice.

librebel gravatar imagelibrebel ( 2017-05-21 23:04:14 +0200 )edit

Very useful. Using it now.

peterwt gravatar imagepeterwt ( 2017-05-29 17:55:15 +0200 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2017-06-19 05:32:21 +0200

Ratslinger gravatar image

APSO, and any future updates, is now available in LO extensions - here.

edit flag offensive delete link more

Comments

This is great, i updated the original post to include the new download link, and removed the old link to version 0.8.3.

librebel gravatar imagelibrebel ( 2017-06-19 11:55:20 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-05-21 22:33:07 +0200

Seen: 99 times

Last updated: Jun 19