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. This is why people who are working with non-graphical headless systems could not use Tp-Note efficiently: in general, these systems offer no clipboard. With version 1.7, Tp-Note comes with a new feature making it interesting for system administrators and console lovers: instead of injecting data into the templates via the clipboard, Tp-Note also reads the standard I/O input stream stdin. This way Tp-Note offers its full functionality on headless systems.

Hint: If you are new to Tp-Note, you may want to watch the introductory video about Tp-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. Here some typical workflows 1:

  • Document a downloaded file:

    Download the file i3-extensions.zip:

    wget "http://blog.getreu.net/_downloads/i3-extensions.zip"
    

    Document from where you downloaded the file:

    echo  "[download](http://blog.getreu.net/_downloads/i3-extensions.zip)" | tp-note i3-extensions.zip
    

    This creates the file i3-extensions.zip--URL.md with the following content:

    ---
    title:      "i3-extensions.zip"
    subtitle:   "URL"
    author:     "getreu"
    date:       "2020-09-03"
    lang:       "en_GB.UTF-8"
    revision:   "1.0"
    ---
    
    [i3-extensions.zip](i3-extensions.zip)
    
    [download](http://blog.getreu.net/_downloads/i3-extensions.zip)
    
  • Download a webpage, convert it to Markdown and insert the result into a Tp-Note file. The note's title is the name of the first hyperlink found in the webpage.

    curl 'https://blog.getreu.net' | pandoc -f html -t markdown_strict | tp-note
    
  • The same as above, but the note's title is the same as the webpage's title:

    curl 'https://blog.getreu.net' | pandoc --standalone -f html -t markdown_strict+yaml_metadata_block | tp-note
    

    creates the note file 20200910-Jens\ Getreu\'s\ blog.md with the webpage's content.

  • Generate note for a given content with YAML header:

    echo -e "---\ntitle: Todo\nfile_ext: mdtxt\n---\n\nnothing" | tp-note
    

    creates the file 20200910-Todo.mdtxt with the content:

    ---
    title:      "Todo"
    subtitle:   ""
    author:     "getreu"
    date:       "2020-09-13"
    lang:       "en_GB.UTF-8"
    revision:   "1.0"
    file_ext:   "mdtxt"
    ---
    
    nothing
    
  • Reformat the header of a note file:

    mv "20200921-My Note.md" "20200921-My Note-(1).md"
    cat "20200921-My Note-(1).md" | tp-note --batch
    

    creates the file 20200921-My Note.md with a rearranged header and the same body.

  • Launch, for once, a different file editor.
    The external file editor, Tp-Note uses, is defined in the configuration file and can be changed there. If you want to use a different file editor just for one-shot, type:

    nvim "$(tp-note --batch)"
    
  • Create a new note overwriting the template's default for subtitle:

    cd dev
    echo -e "---\nsubtitle: Draft\n---\n# Draft" | tp-note
    

    creates the note file 20200925-dev--Draft.md with the content:

    ---
    title:      "dev"
    subtitle:   "Draft"
    author:     "getreu"
    date:       "2020-09-25"
    lang:       "en_GB.UTF-8"
    revision:   "1.0"
    ---
    
    # Draft
    
  • Synchronize filename with header of all note files in the current directory:

    find . -type f -name "*.md" -exec tp-note --batch {} \; >/dev/null
    
1

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

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.