Skip to content
Snippets Groups Projects
Commit c049be4f authored by Albert Gräf's avatar Albert Gräf
Browse files

Add a simple bookmark facility to the help browser.

The Ctrl+D keyboard command in the help browser adds a bookmark for the
current browser directory, Shift+Ctrl+D removes it again. Note that the
same directory can be bookmarked multiple times (using Ctrl+D), in which
case the same number of delete commands (Shift+Ctrl+D) are required to
delete all instances of the bookmark again; at any time, the oldest
instance will be removed first.

This also provides a (really simplistic) way to reorder bookmarks, since
you can re-add an existing bookmark and delete its older instance
afterwards, which effectively moves the bookmark to the end of the
bookmarks section. It goes without saying that this becomes rather
laborious if you have to manage a lot of bookmarks, so in that case you
might prefer to just edit the bookmarks file (see below) in your
favorite text editor instead.

Bookmarks are shown in their own "Bookmarks" section at the bottom of
the toc, after the built-in toc sections. The "Bookmarks" section title
will be visible only if there are any bookmarks. As with the built-in
toc items, clicking on the title of a bookmark takes you to the
corresponding directory, which may be in the doc or extra hierarchy, or
anywhere else on your hard disk. If a <dir>-meta.pd file in pddp format
is present in the bookmarked directory, the browser will try to extract
title and description from the NAME and DESCRIPTION tags in that file,
otherwise it simply uses the basename of the directory as title and
leaves the description empty.

The bookmarks are stored permanently on disk as a JSON file in the users
home directory, named .purr-data/bookmarks.json on Linux and the Mac,
and AppData/Roaming/Purr-Data/bookmarks.json on Windows. This file is
read each time the help browser opens, so the bookmarks persist across
program invocations, and you can even edit the file manually and reopen
the help browser to make it pick up your changes while Purr Data keeps
running.
parent 6f7189ab
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment