Tree maintenance utilities checklist -> Obsidian

Hello,
I would like to feed a logbook regarding the administration of a Gramps family tree using an external Obsidian note-taking application (which I am discovering …)

  1. I did not find any documentation or tutorial on this possibility on the web (French language) Do you have other references? … Has anyone considered and implemented it
    Nb: I have no particular computer skills
  2. The first difficulty (for me …) being initially to list the tools natively offered by Gramps (Utilities, Simple Filters, Reports) to ensure the consistency of the database (I am thinking for example of Individuals incomplete, Undeclared media, Objects without reference, Notes to be made, …)
  3. If such possibilities exist, how to export these results in the form of notes in Obsidian _Syntaxe Markdown undoubtedly obliges?
    Nb: For the moment, I have only succeeded in exporting the textual report generated by the “Report to do”
    3a) From the .txt file → Kate text editor → Find / Replace with Regex → rename .txt to .md
    3b) From the .html file → open in Firefox → select all → WebClipperMarkdown extension → Copy → Creation of the note file in Markdown (with Yaml metada) But it was from a text file (txt, html) When will he start exploiting other requests?

Thank you for your advice and help
Jean Claude
Linux Kubuntu 20.4
Gramps 5.4.1

1 Like

There is a script that convert each line in a csv file to markdown with YAML.

So if you want a markdown file for each object in your Gramps database, you can export to csv from gramps and split the resulting csv file to multiple csv files, then run this script for each csv file

In the script you can define what should be YAML, what should be folders etc.

Then you can link each of the md files to your objects in Gramps as media files, and you will always have up to date “Research Logs” or "Research Notes linked to any of your Gramps Objects.
And if you use one “main” Research Log file, and embed other Notes and Documents to that “Main Note”, You will always have an up to date Research Log attached to your Gramps Object and only need to link one Note for a Research Task, even if you have 10 different Notes for that single research.

Another way of doing this is to export to xml, import the xml file to Excel , LibreOffice, Panda or any other software for editing data tables (there is actually some plugins for VS Code that might be possible to use), map the xml object to columns in different tables, then export each sheet to a csv file.

If you know how, you can also create a VBA app in Excel, LO or Python that add the path of each md file back to the Gramps xml file and links it to the correct Gramps Objects…

It should also be a relatively simple case to change any of the html or text reports (or any report using Pandoc) to write md files instead, but someone with knowledge would need to create that gramplet or make those changes.

A gramplet that creates a markdown or text file in a given path for either all objects or the active object in Gramps, and links that file as media to the correct Gramps Object, would be a great and useful Gramplet…
Especially if it was possible to select fields for the YAML frontmatter etc.


I use Foam and Obsidian for all my Research Notes, the information that can be found in a network graph like the graph in Obsidian, and the timelines and map views that can be made with some of the plugins have given me multiple findings of relations I wouldn’t have found with a normal hierarchical graph (read familytree), just by adding wiki-links to both unstructured and structured text from documents and other sources I have found.
I also use Zotero for my sources, multiple network graph software (specially Constellation is interesting) for analyzes of data, Aeon Timeline 3 and The Timeline Project (Timeline) for visual timeline graphs and research.
I add links to my markdown files to any objects/items in any of the software I use, so my Markdown Research Notes is like a “hub” for all my research.

I have a Collection Structure in Zotero that I have mirrored to a Folder Structure for my Notes, Media and Sources, and that file structure reflects a complete workflow from the creation of a research log to the registration of data in e.g. Gramps, and until any publication of the information I have collected.


Both FOAM and Obsidian (and other software of same type) is also great for writing reports, blogs, articles etc., and there is a lot of addons/plugins for both Obsidian and VS Code (FOAM), or other markdown editors, that can be really useful for research and analyzes of data.

Writing a report addon which generates a markdown file with a checkbox list is easy, so no further converting steps are needed.

More difficult is which database consistency could be added to the report, since there are so many ways for users to save the same data. For example the “cause of death” can be saved as:

  • a cause of death event
  • a death event attribute
  • a person attribute
  • a person note
  • an event note
  • a death event description

1- Thank you for all these suggestions and in particular the existence of this script which could help me to retrieve the return of certain requests when using filter → Export to display → csv → Md
I will read the rest of your comments carefully.
Not being a computer scientist, I have not assimilated everything because even if I call on a “second brain” the first is no longer very young.
2- I would have liked to have domiciled this research log in the Dashboard view but I do not see how?
Besides maybe creating a main note thanks to the Gramplet “To Do” …
3- The association of an MD media file could be replaced by Obsidian URL link (obsidian: //)

Lots of things to discover !!! And not necessarily of my level

Just write it the same way as a gedcom get written…
or a html file, or whatever other text report is constructed…

It’s only a problem if you look for problems instead of solutions.

It’s as simple as creating a Note for every Main Gramps Object (Person, Family, Event, Place etc.) with any Gramps Attribute for those objects as YAML keypair. The user can then rearrange the markdown files as she/he like.
Or create variables for any value and let the user create a markdown template to use for each Gramps Main Object Types. that is how the markdown export from for example Zotero is done.


My answer was never ment as a discussion point, so I am out of this “discussion” before it starts. I only answered Jean that it was possible to do this in different ways and that it is at least one user using the same software in their research.


Personally I don’t use the Reports in Gramps, I extract everything I want from the XML in Excel and write it to markdown automatically as I want to have it structured with VBA in Excel.
Changing the json or sqlite export to write MD formatted text would most likely be easier, so maybe I will take a look at that if I need it…

Problem with this is if you start to use another Markdown Editor, all your URL links would be broken.

But you could use the “file://” URL, it’s nearly the same on Linux as on Windows, but on Windows it would look like this “file://R:\Genealogy - Tests\Historical Research & Genealogy\900. Archives & Sources\900.0047. NOR - Norway\Newspapers\Norges Handel og Sjøfartstidende\1922-08-17 - Norges Handels og Sjøfartstidende\1922-08-17 - Norges Handels og Sjøfartstidende, torsdag 17. august 1922 - Page 07.md”".
While on Linux you have the path written with forward slashes “file:///some path/some path/filename.md”

Problem using any of this links in a Gramps Note is that if you need to move your markdown storage, you need to reconnect any links you have ever made, while if you add them as media, you can use the “media finder” tool (never remember the actual name for it).

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.