textbrowser / biblioteq

Archive and catalog the world for today's and tomorrow's generations! Awesome and everyware.
https://textbrowser.github.io/biblioteq/
Other
217 stars 46 forks source link

Customizable Menu #278

Closed meteos77 closed 1 year ago

meteos77 commented 1 year ago

Allow to integrate little extras without having to leave BQ.

Have a "plugins" menu where the user can launch his own complementary programs (for me python scripts for statistics)

it would be necessary to have access to a variable that will give the current database (with path) to retrieve it in the scripts.

textbrowser commented 1 year ago

Would a terminal option work? From a terminal, one would be able to start other programs. As for a variable, perhaps setting an environment variable prior to launching the terminal would suffice. For example, BIBLIOTEQ_CURRENT_SQLITE_FILE.

meteos77 commented 1 year ago

do you offer this? launch with ./biblioteq --programs=prog1.py prog2.py prog3.sh

and a menu would display "SupplementaryMenu/prog1 "SupplementaryMenu/prog2" "SupplementaryMenu/prog3"

meteos77 commented 1 year ago

python example (pyqt5 request) Statistique-Dxx-Python.tar.gz

textbrowser commented 1 year ago

When BQ launches the program, how should it pass arguments to the command(s)? Other Options requires an External Commands section.

Program Executable Path | Arguments /path/to/prog1.py --sqlite-path %1

If programs are defined, an External Commands menu becomes available in the main window.

meteos77 commented 1 year ago

If BQ can create environment variables like BIBLIOTEQ_CURRENT_SQLITE_FILE with python no problem to get the value

script.py.tar.gz

meteos77 commented 1 year ago

If for example I change my database through the graphical interface of BQ (Menu / File / Connect ... ) the variable BIBLIOTEQ_CURRENT_SQLITE_FILE will be updated ?

meteos77 commented 1 year ago

Typing error

in the ticket I put #278 but it is the item_278 of the TODO file not the ticket number on github

textbrowser commented 1 year ago

Completed. See official documentation and commit text for details. :)

meteos77 commented 1 year ago

Thank you very much. it works well, now I just need to make my personal statistics panels.