34 stable releases
1.25.1 | Jan 5, 2025 |
---|---|
1.24.12 | Dec 25, 2024 |
1.24.10 | Nov 9, 2024 |
1.24.7 | Jul 16, 2024 |
0.0.0 | Apr 9, 2022 |
#25 in Template engine
399 downloads per month
600KB
10K
SLoC
# Tp-Note: Markup enhanced granular note-taking
Save and edit your clipboard content as a note file
Tp-Note is a note-taking-tool and a template system - freely available for Windows, MacOS and Linux - that consistently synchronizes the note’s meta-data with its filename. Tp-Note's main design goal is to convert some input text - usually provided by the system's clipboard - into a Markdown note file with a descriptive YAML header and a meaningful filename. Tp-Note collects various information about its environment and the clipboard and stores them in variables. New notes are created by filling these variables in predefined and customizable Tera-templates. TP-Note's default templates are written in Markdown and can be easily adapted to any other markup language if needed. After creating a new note, TP-Note launches the system's text editor and connects the default web browser to Tp- Note's internal Markdown/RestructuredText renderer and web server. The viewer detects note file changes and updates the rendition accordingly.
On Tue, 2023-12-19 at 12:58 +1100, Dev Rain wrote:
Found Tp-Note awhile back and it has become part of my daily workflow, and indeed part of my daily note-taking life. I wanted to extend my thanks; so thank you. dev.rain
Read more in Tp-Note’s user manual, Download Tp-Note or visit the project page: Tp-Note - Minimalistic note-taking.
Documentation
User documentation:
-
Introductory video
-
Project page:
Tp-Note's project page, which you are reading right now, lists where you can download Tp-Note and gives an overview of Tp-Note's resources and documentation.
-
User manual:
The user manual showcases how to best use use Tp-Note and how to integrate it with your file manager.
-
Unix man-page:
The Unix man-page is Tp-Note's technical reference. Here you learn how to customize Tp-Note's templates and how to change its default settings.
Developer documentation:
-
API documentation
Tp-Note's program code documentation targets mainly software developers. The code is split into a library tpnote-lib and the command line application tpnote. The advanced user may consult the Tp-Note's config module documentation which explains the default templates and setting. Many of them can be customized through Tp-Note's configuration file.
Source code
Repository:
Distribution
Download installer packages and binaries
Tp-Note Microsoft Windows installer package
-
Installer package for Windows:
As this early version of the Windows installer is not signed yet, Windows will show the error message “Windows protected your PC”. As a work-around, when you click on the link “More info”, a ”Run anyway” button will appear allowing you to continue the installation process. In general, regardless of where a program comes from, I recommend checking every installable file with VirusTotal.
Tp-Note Debian/Ubuntu installer package
-
Package compiled for Debian/Ubuntu:
Various binaries for Windows, MacOS and Linux
-
Binaries for Ubuntu-Linux 18.04, Windows, MacOS:
-
Open the latest release.
-
Open assets.
-
Download the packed executable for your operating system.
-
Installation: see below.
-
Executable for Windows:
-
Linux binary (compiled with Debian):
-
The following "musl" version also works on a headless system.
-
Binaries for Raspberry Pi (32 bit):
-
Binaries for Raspberry Pi (64 bit):
Tp-Note in official package repositories
Tp-Note on NetBSD
-
An official package is available on NetBSD and other "pkgsrc" supported platforms.
To install Tp-Note on NetBSD, simply use the native package manager:
pkgin install tpnote
Tp-Note on NixOS
-
An official package is available on NixOS:
environment.systemPackages = [ pkgs.tpnote ];
Get Tp-Note with the Nix package manager
-
First install the Nix package manager available for Linux, MacOS and Windows (WSL2). Alternatively, for Linux there are also prebuilt Deb/Pacman/Rpm Nix installers available.
Once you have the Nix package manager installed on your system, try out Tp-Note with:
nix-shell -p tpnote
or follow installation instructions here: NixOS packages - tpnote
Other resources
-
Copy the Unix man-page to
/usr/local/share/man/man1
: -
Copy Tp-Note's icon to
/usr/local/share/icons/
:
Installation
Depending on the availability of installer packages for your operating system, the installation process is more or less automated. For Windows users the fully automated installation package tpnote-latest-x86_64.msi is available. For more information, please consult the Distribution section above and the Installation section in Tp-Note's manual.
Upgrading
While upgrading Tp-Note, new features may cause a change in Tp-Notes's configuration file structure, e.g.:
*** ERROR:
Can not load or parse the (merged) configuration file(s):
---
invalid length 3, expected fewer elements in array in `viewer.served_mime_types`
Note: this error may occur after upgrading Tp-Note due to some incompatible
configuration file changes.
Tp-Note renames and thus disables the last sourced configuration file.
Additional technical details:
* Command line parameters:
tpnote -b
* Sourced configuration files:
/home/joe/.config/tpnote/tpnote.toml
Mote, the configuration file backup is stored in the same directory as the last
sourced configuration file, e.g. /home/joe/.config/tpnote/
.
If Tp-Note sources more than one configuration file, consider the possibility
of syntax errors in any of these files (cf. Customization section of
Tp-Note's man-page).
Building
If the above precompiled binaries do not suite you, you can compile Tp-Note yourself.
-
Download, compile and install Tp-Note:
Building on Linux
cargo install tpnote sudo cp ~/.cargo/bin/tpnote /usr/local/bin # Download icon cd /usr/local/share/icons sudo wget https://blog.getreu.net/projects/tp-note/assets/tpnote.svg
On Linux, Tp-Note displays errors and debug messages as notifications. This requires a Linux/BSD based desktop environment that follows the XDG specification, e.g. KDE, Gnome, XFCE, LXDC, Mate (and most others).[^no-message-box]
[^no-message-box]: In case an XDG desktop environment is not available, you can opt out notifications and message boxes by omitting the
message-box
feature by adding--no-default-features --features lang-detection,read-clipboard,renderer,viewer
tocargo install tpnote
. Now, all error messages are dumped on the console from where you started Tp-Note intostderr
.Recommended Linux console and server version
The full-featured version of Tp-Note depends on GUI libraries like Xlib which might not be available on a headless system. Either download the Musl version x86_64-unknown-linux-musl/release/tpnote or compile Tp-Note yourself without default features:
cargo install --no-default-features \ --features lang-detection,renderer tpnote sudo cp ~/.cargo/bin/tpnote /usr/local/bin
If Tp-Note's binary size if of concern, omit the
lang-detection
feature in thecargo
invocation above. Thelang-detection
feature causes 95% of the final binary size because of its extensive language models.Building on Windows and macOS
Build the full-featured version[^win] with:
cargo install tpnote
[^win]: When building for Windows or macOS, it does not make sense to exclude the
message-box
feature, because - under Windows and macOS - it does not rely on the notification library. Instead, it uses direct OS-API calls for popping up alert boxes. As these calls have no footprint in binary size or speed, always keep themessage-box
feature compiled in.
Cross compilation
Debian makes it easy to cross-compile for foreign architectures. Here are some examples:
-
Target Musl:
rustup target add x86_64-unknown-linux-musl sudo apt install musl-tools cargo build --target x86_64-unknown-linux-musl --release
-
Target Raspberry Pi (32 bit):
rustup target add armv7-unknown-linux-gnueabihf sudo apt install crossbuild-essential-armhf CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER=/usr/bin/arm-linux-gnueabihf-gcc \ cargo build --target armv7-unknown-linux-gnueabihf --release
-
Target Raspberry Pi (arm64, 64 bit):
rustup target add aarch64-unknown-linux-gnu sudo apt install crossbuild-essential-arm64 CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=/usr/bin/aarch64-linux-gnu-gcc \ cargo build --target aarch64-unknown-linux-gnu --release
-
Target Windows:
rustup target add x86_64-pc-windows-gnu sudo apt install binutils-mingw-w64 mingw-w64 cargo build --target x86_64-pc-windows-gnu --release
This project follows Semantic Versioning.
About
Author:
- Jens Getreu
Copyright:
- Apache 2 license or MIT license.
Dependencies
~13–54MB
~895K SLoC