The template based note-taking tool Tp-Note was originally designed as desktop application: Before creating a new note, the user copies interesting bits of text into the clipboard. When Tp-Note starts, it analyses the clipboard's content and fills out some template to create a new note. As Tp-Note makes extensive use of the clipboard, it mainly targets desktop systems running a graphical environment. But also when working on the console Tp-Note can be useful with its built-in clipboard simulation: Instead of copying the content into your clipboard, pipe it into Tp-Note 1:

echo  "Some clipboard content" | tp-note

Tip: If you are new to Tp-Note, you may want to watch the introductory video about Tp-Note.

One of the advantages of taking notes as files, is the possibility to annotate artefacts in the file system and place the note next to them. This brings us to the use case I present you here: Take a note about the origin of a downloaded file. How to do this on the desktop is described here. But also on the console, when administrating a system through an SSH connection, this workflow is very common and involves several steps and tools:

  1. Production: Take a note

    1. Download a file (wget)

    2. Document the URL in a note (tp-note, vim)

  2. Retrieval: Search the file system for the note

    1. Browse note files / full text search (Midnight Commander mc)
  3. Consummation: Read the note and follow its hyperlinks

    1. Render the note file (tp-note)

    2. Open and read the rendition (lynx)

    3. Follow hyperlinks (lynx)

Hereby is the Production stage 1. supported since Tp-Note version 1.8 already. The current version 1.10 offers some new features targeting the support of the Retrieval stage 2. and the Consummation stage 3. The following examples work with the full featured version of Tp-Note as well as with the --no-default-features console-only version.

Production: Take notes

  1. Download a file (wget)

    Download the file

    wget ""
  2. Document the URL in a note (tp-note, vim)

    echo  "[download](<>)" | tp-note

    Hint: you do not need to type the URL twice. The cursor key [↑] takes you back through Bash's history. Just go back to line with the URL, edit and press [Enter].

This creates the note file with the following content:

title:      ""
subtitle:   "URL"
author:     "getreu"
date:       "2020-09-03"
lang:       "en-GB"



Retrieval: Search the file system for the note

The Ncurses library based file manager MidnightCommander mc enjoys great popularity among people working on the console. As Tp-Note stores the note's content in UTF-8 encoded plain text, mc can be used for full text searches in all note files of a directory. Start the full text search with the keys [Esc] [?].

The following instructions configure mc's [F3]-key to open .md files for viewing. This is where Tp-Note generates the HTML rendition of the note file and opens the rendition with the Lynx web browser. The [Enter]-key runs Tp-Note in editing mode.

  1. First install the Midnight Commander and the Lynx web browser:

    sudo apt install mc lynx
  2. Edit mc's configuration file /etc/mc/mc.ext:

    sudo nano /etc/mc/mc.ext
  3. Replace the line default/* with:

        Open=tp-note %f
        View=if HTML=`tp-note -b -n -x - %f`; then (echo $HTML | lynx --stdin); else less    %f; fi
  4. Restart all instances of mc :

    sudo killall mc

To test the configuration, navigate to some .md note file and press [F3] or [Enter]. For full text search type [Esc] [?].

When no graphical environment is available, Tp-Note disables the viewer feature with its internal HTTP server. However, in order to follow comfortably hyperlinks in you notes, you can always use Tp-Note's HTML export function --export or shorter -x.

If you have configured the Midnight Commander mc as described in the previous section, just navigate to the note file and press [F3]. This renders the note's content and starts Lynx. Alternatively, you can invoke Tp-Note and Lynx without mc:

  1. Install the text-based web browser lynx:

    sudo apt install lynx
  2. Convert the existing note into HTML and open the rendition with lynx:

    tp-note -x - '' | lynx --stdin

The above also works in case Tp-Note was compiled with --no-default-features --features renderer which is recommended for headless systems.

Read more

A good start is Tp-Note's project page or the introductory video. 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.


More examples can be found in Tp-Note's user manual.