giuspen / cherrytree

cherrytree
https://www.giuspen.net/cherrytree/
Other
3.41k stars 461 forks source link

Feature request: Scripting/Plugin support #393

Open PNBRQK opened 6 years ago

PNBRQK commented 6 years ago

It would be great if the app supports scripting because that allows the user to create macros or so.

Particularly I could expect scripting the app with Python since the app itself is written in Python.

ForeverRainbow commented 4 years ago

I like the idea of plugins. For the C++ version there is: https://developer.gnome.org/glib/stable/glib-Dynamic-Loading-of-Modules.html which looks good. Only problem is plugins would have to be written in C (or at least the interface).

Also there is the question of what API cherrytree would actually expose. What would plugins have access to, what would they be able to do, etc.

I think a prime target for plugins at least to start would be importing/exporting. There is a clear input/output process which could be handled by a plugin and it would allow new formats to be supported in a more modular fashion.

keppelerj commented 3 years ago

Any updates on this?

giuspen commented 3 years ago

I won't have time for this for a while

chadfurman commented 3 years ago

Note https://github.com/giuspen/cherrytree/issues/828#issuecomment-661207459

GPL warning, but has a link to a plugin architecture

chadfurman commented 3 years ago

For reference:

Interesting. So it uses a C interface and passes function pointers across the ABI gap, then exposes a struct which provides information like name, and what its shortcuts are?

Also seems to have an event system and such, sigc++ may provide an easier way to implement these than by hand but I'm just thinking out loud now :p

from https://github.com/giuspen/cherrytree/issues/828#issuecomment-661251678