Markdown viewer (no editing) addon

Many of the Addons developed in the GitHub repositories include readme.md markdown files. A tool that leveraged these markdown files would give a system that allows documentation to in sync WITH the add-ons

Could a viewer gramplet or quickview for the GitHub dialect of markdown be created? Then the Plugin Manager could build a list of readme.md files for registered add-ons to dynamically link Help.

And a Gramplet markdown viewer (maybe with the ability to be called to front in the bottombar while being passed the UNC/URL) would allow use the Sidebar and bottombar in sync.

It would need an extra protocol for like the way Notes handle the “gramps://” protocol for calls within the application. (Although a that seems to be exclusively for opening Object Editors. Shouldn’t there also be support Doing a Navigator function, where a view mode goes active with a particular record active? Or with the current active record in the last used view mode of that category view, if no record or view mode is specified.)

This could be leveraged to supersede the “Welcome to Gramps!” dashboard gramplet with content that does not require a programmer to fix grammar or linkrot. And could be smart enough to support language variable filenames. And a fall-forwards (as opposed for fallback) feature that looks for the equivalent filename within a specifically named addon folder. This would enable the “Welcome to Gramps!” text to improve through the add-on management system. If an .ini functionality was included, the progressive lessons might be served with Gramps keeping track of the user’s progress.

An alternate fall-forwards option might be to look for a specifically ID’d object of “markdown” type in the Notes collection to feed Tree-specific “Welcome to Gramps!” content. A person could distribute their Tree with a Guided Tour note. (I’ve done something similar with the “ToDo” dashboard gramplet. But it is not a default Gramplet on a fresh install. So newbies may never find my Guided Tours.)

1 Like

There are a couple other related threads:

When I google this, I see several Python markdown viewers that translate markdown files to HTML, and then either call a browser to display that, or use WebKit for that. Does that help?

I remember seeing some old code for a simple Python based HTML editor that used WebKit, and reading that WebKit made this less portable than we’d want to. Is that still true?

I feel a bit lazy today, so I can’t give more details.

An HTML conversion might be a shortcut. There’s already a Gramps HTML viewer that was a precursor to the Geography view.

OK, nice. Please forget what I wrote about WebKit, because that’s old code for Python 2 only.

Without further testing, I think that this might be a good choice:

And here’s a tutorial that makes use of this version:

2 Likes

@Nick-Hall is doing a 2nd generation Addon Manager for the 5.2 release. One of the things it will include is expanding help_url in the Gramps Plugin Registration to all plugins, not just Gramplets. This will allow building a addon-list that includes the a pointer to the documentation and offering users the opportunity to explore an add-on’s docs before deciding whether to install.

The majority of GitHub Repositories now include README.md files, which are installed when addon plugins are installed.

Maybe a bottombar Markdown viewer add-on could be built that looks at the active tab of sidebar plugin and displays the README.md that exists in that plugin’s folder. (It could ignore undocked since they have a ‘help’ button.)

A similar viewer section/button could be added to the toolbar Tool & Report dialogs. (For Reports, if the README.md consistently started with a report thumbnail, there would be a visual prompt in the dialog that helps user narrow their choices.)