My first gramplet - "Historical Context" for gramps 5.2

Was counting on removing the custom file from the git when we go into production
No matter, what we call it, it will overwrite what the users has put in it.
So for non beta testers, they will have to make do with the READ.me file.

Right. I was (ineffectively) trying to say: the wiki could instruct users to
copy the custom_v1_0. csv to custom_v1_0. txt and modify it.

With this method, including a custom_v1_0. csv in the installer package file becomes OK. Updates could overwrite without loss of the custom_v1_0. txt file. Since the system includes all .txt files by default, unless the MANIFEST has a single file exclusion, I do not see another option to provide a sample and not overwrite something valuable during updates.

The docs could also suggest setting a Media object to be equal to the .gramps/gramps52/plugins/HistContext/custom_v1_0. txt file. That would make it to easy to locate and edit. And it would ensure that the custom Historical Context is (.gpkg) archived with the Tree.

2 Likes

We usually use an undocked Gramplet to illustrate the wiki documentation. And select a good representative in the example.gramps to illustrative the features. (This reminds people there is a Help button. It provides them data conditions that they can easily replicate when troubleshooting installation problems.)

The is the Historical Context for Blanco, Daniel (1752-1805)
The file would be named HistoricalContext-gramplet-example-52.png on the wiki.

1 Like

I dont think this is a good idea, as different OSes put the folder in different places. And even within an OS, it depends on whether you upgraded from a previous version or not (XDG changes recently). For instance, on my Mac it is in

~/Library/Application Support/gramps/gramps52/plugins

Its the same old problem locating the Gramps User Directory on different OSes. I think we’re prepared to handle that.

I guess I have a silly question. Why are you including these images in the user install download? Are these png images used by the gramplet? If they are just part of the help system, why install them on the local user system? The help system should use the wiki help system, shouldn’t it?

When I look at it, you don’t need a MANIFEST since you don’t need any extra files added to the install for users. Or am I missing something?

For instance, you are including the README.md file in the MANIFEST. Why? No other gramplet has ever done that. The pngs are only referenced from the md file, so should likewise not be part of the user install. That should remove the need for a MANIFEST.

GitHub prods everyone to have a README.md for their repositories. And it is fairly common to have images for their documentation.

If Gramps ever makes a .md GitHub markdown viewer, using the README.md instead of the Wiki for the Help makes a lot of sense. The documentation would travel with the Addon and there would not be a need to browse to an external domain.

Unfortunately, there is a browser bug viewing local markdown files. Some server-side rendering is expected. Instead the browser spawns a new tab for the file. And the cycle repeats. Firefox suffers from this problem.

Until those local markdown files no longer create problems, you’re right, they should be omitted from our addons’ compressed install files.

The “Filter string” configuration option works differently than I had expected.

It EXCLUDES rows where the Text column value starts with that exact (case-sensitive) string.

I expected it to (case-insensitive INCLUDE) filter to rows that contain that “Filter string” in the Text Column.

The history behind the filter:
In Denmark the census’es have been irregular, and when I do my research I cannot remember which census’es cover the person I am researching. So I have put the years with census in the data file. And when done with the census’es I do not want the to clutter the view - so I invented the filter to make them go away :grin:
Remember: When I started the gramplet it was to fulfill my own needs, and it has grown a lot since

1 Like

several addons use the readme. Perhaps not gramplets:
DescendantBooks/README HistContext/README.md.bak PrerequisitesCheckerGramplet/README.md
DetId/README.md HtreePedigreeView/README.md RelID/README.md
HistContext/README.md PlaceUpdate/README.md TMGimporter/README.md

Thanks - I have been looking for that help button

1 Like

Forget all my comments on MANIFEST and README.md.
I confused what we have in the repo, with what the users get installed.
“I am still confused -but now on a higher level” (Old joke, has run i my family for many many years)
I will remove the MANIFEST file, as @GaryGriffin pointed out - there is no need for it.

OK, so we have had a lot of discussions, and I have learned a lot.
I think I am done now, only 4 bullets I need to address (more will probably come)
But I think they can wait to next revision.

  1. A consistent way of accessing options across all gramplets.
  2. A better way to select colors - like what @emyoulation suggested
  3. A better text for the filter - to point out that it filters out, what you dont want to see
  4. Adding a custom CSV which has to be copied/moved to custom_v1_0.txt
2 Likes

@emyoulation I think the wiki needs to be updated, since the addon has been released.

I have entered the unsolved bullets to the bug tracker, and has been promoted to developer-

2 Likes

Please run Black reformatter on the .gpr.py file.

Also the Description string defines the term by using the term.

         description = _("Displaying a historical context"),

Could you improve it to something like:

    description=_("Lists relevant historical events during the lifetime of a Person"),

Done, but PR waiting for the rest of the features.

Assigned it to myself

2 Likes

The Historical Context addon has been added to the Addon List and the wiki page has been improved (still needs more work)

3 Likes

Can you explain the cascade of Event files?

  • default_data_v1_0.txt - combined list of historic events
  • pandemi_v1_0.txt - list of Pandemic Events (after 1500 CE)
  • da_DK_data_v1_0.txt- list of Dansk historical events
  • en_US_data_v1_0.txt - list of USA Presidential terms
  • uk_UA_data_v1_0.txt - list of Ukrainian historical events

And users can have a personal Events file (which can also be used to link your favorite online source for researching records about that event)

  • custom_v1_0.txt

Does HistContext naturally include more than 1 reference file? i.e., does it collate the default, pandemic, native locality and Custom (if it exists) and use them for the HistContext event list? Or does it uses just one?