This short note describes how Tp-Note's internal viewer renders Asciidoc hyperlinks, allowing to open and to follow quickly hyperlinks in Asciidoc formatted note files.

In essence, Tp-Note is a note taking template system and as such it is Markup language agnostic. Its default templates mostly deal with the YAML header (the meta data) of new notes - and do not contain, with one exception, any Markup language specific code at all. This is why changing the Markup language boils down to change only 2 lines in Tp-Note's configuration file. After creating a new note, Tp-Notes opens the users favourite text editor. Today, most modern text editors can render lightweight markup, so for most people there is no need for a second rendering engine for editing.

The situation is different when you do not want to edit the note file, but instead just view its content in order to follow some hyperlink to the web. This is where Tp-Note's internal viewer comes into play: after opening the file editor 1, it continues watching the file and renders its content into HTML. The HTML rendition is then displayed with the user's default web browser.

While Markdown and reStructuredText viewer are available for a while now, Tp-note version v1.9.2 comes with an additional universal markup source text renderer, hereafter called Atext2html: it is based on the Parse Hyperlinks library, especially designed for Tp-Note. Opposed to the Markdown and reStructuredText renderers described above, this renderer does not know anything about text markup. For example, it does not recognize headings or lists, but instead, it parses hyperlinks and resolves link references written in Markdown, reStructuredText, HTML and Asciidoc.

Tp-note's viewer with Asciidoc

As Tp-Note does not have a built-in native Asciidoc renderer, the Atext2html renderer is default for .adoc files. This feature is not meant to replace a real Asciidoc renderer like Asciidoctor, but it allows to quickly open and follow an Asciidoc formatted note file and to follow some hyperlinks in there.

Read more

A good start is Tp-Note's project page, the introductory video or other blog posts about Tp-Note. The source code is available on GitHub - getreu/tp-note and some binaries and packages for Linux, Windows and Mac can be found here. To fully profit of Tp-Note, I recommend reading Tp-Note's user manual. When you like Tp-Note, you probably soon want to customize it. How to do so, is explained in Tp-Note's manual page.


If you do not want to edit the file, you can launch Tp-Note in viewer-only-mode with tp-note --view or tp-note -v.