In order to begin my own research gramplet I am learning and doing some testing. Very basic stuff, can’t even get that to work. So what am I soing wrong.
file: tester.py
import gramps.gen.plug as plug
class TestGramplet(plug.PlugIn):
def run(self):
print("Test Gramplet is running!")
def register():
return TestGramplet()
Put this file in C:\Program Files\GrampsAIO64-6.0.3\gramps\plugins\gramplet
Started Gramps, but can’t find it anywhere, what did I miss?
GrampsAIO64-6.0.3 win 11pro (me still very much a novice here!)
It dives deeper into the Hello World example and the Gramps Plugin Registration options.
More importantly, it explains how to control when your gramplet refreshes or responds to changes to the tree data and GUI record selections. (The callback and signals are important information.)
Thanks you both. The example worked. But trying to read some stuff I feel so far out of my depth. Need to think long and hard if I even want to invest in this to the point where plug-in would do all the work I require from it.
My starting point was tweaking some existing plugins. (Tiny things like refining text or layout. And making the Registration data more helpful… with better descriptions or pointing the Help buttons to more useful URLs.)
When it came to functional plugins, deferring the interface seems like a good choice. Work on making the code do something in SuperTool (or one of the query language tools) before structuring a plugin around it.
It is very tedious restarting Gramps (to register the the changed plugin) and navigating the GUI back to where you can re-test. So make the basic function work first.
After you wrap it in interface, you’ll still do endless tweaks and restarts. But you are less likely to abandon your project if you can see some results.