Crate tp_note[][src]

Tp-Note is a note taking tool and a template system, that consistently synchronizes the note’s metadata with its 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. In case <path> points to an existing Tp-Note-file, the note’s metadata is analysed and, if necessary, its filename is modified. For all other file types, Tp-Note creates a new note that annotates the file <path> points to. If <path> is a directory (or, when omitted the current working directory), a new note is created in that directory. After creation, Tp-Note launches an external editor of your choice. Although the note’s structure follows Pandoc’s conventions, it is not tied to any specific Markup language.

Modules

alert_service

Receives strings by a message channel, queues them and displays them one by one in popup alert windows.

config

Collects Tp-Note’s configuration from a configuration file, the command line parameters. It also reads the clipboard.

content

Deals with the note’s content string.

error

Custom error types.

file_editor

Launch the user’s favourite file editor.

filename

Helper functions that deal with filenames.

filter

Extends the built-in Tera filters.

logger

Prints error messages and exceptional states.

note

Creates a memory representations of the note by inserting Tp-Note’s environment data in some templates. If the note exists on disk already, the memory representation is established be reading the note file with its front matter.

process_ext

Module extending the process handling.

viewer

Modules implementing the note content renderer and viewer feature.

workflow

High level program logic implementing the whole workflow.

Macros

note_error_tera_template

Macro to construct a NoteError::TeraTemplate from a Tera::Error` .

Constants

AUTHOR

(c) Jens Getreu

MIN_CONFIG_FILE_VERSION

Set the minimum required config file version that is compatible with this Tp-Note version.

VERSION

Use the version number defined in ../Cargo.toml.

Functions

main

Print some error message if run() does not complete. Exit prematurely if the configuration file version does not match the program version.