1
1
Fork
You've already forked notesbash
0
Mirror of the original repo which has been moved to https://codeberg.org/carmatani/notesbash
  • Shell 98%
  • Roff 2%
2025年03月10日 11:56:46 +01:00
completion update bash completion for preview options 2024年10月07日 08:44:41 +02:00
demo Added stuff to the demo. 2025年01月14日 07:53:52 +01:00
files Run formatter 2024年09月06日 13:50:07 +02:00
img Use NOTESBASH_DEFAULT_EXTENSION when creating new notes. 2025年01月16日 11:31:30 +01:00
src v1.0.2 -> v1.1.0 2025年03月10日 11:56:46 +01:00
tests Ran formatter ('shfmt -l -w'/'./make.sh fmt'). 2024年07月13日 12:25:41 +02:00
.editorconfig Fixed .editorconfig 2024年07月13日 12:28:16 +02:00
.gitignore test build option in makefile 2024年06月05日 21:39:49 +02:00
compile.sh Introduced the new preview system in notesbash 2024年09月21日 10:10:01 +02:00
COPYING Prettified the COPYING file 2025年01月17日 08:46:41 +01:00
make.sh Added a Readme to the term-open script, as well as a Licence 2025年03月06日 17:52:46 +01:00
notesbash Introduced the new preview system in notesbash 2024年09月21日 10:10:01 +02:00
notesbash.1 v1.0.2 -> v1.1.0 2025年03月10日 11:56:46 +01:00
notesbash.desktop Finalized desktop entry & updated install process 2025年01月09日 11:31:46 +01:00
README.md v1.0.2 -> v1.1.0 2025年03月10日 11:56:46 +01:00

A notes management tool for bash

Static Badge required shell BASH Chat on Matrix

Introduction

notesbash is a tool for managing personal notes from the command line. That means one can use it to create, reorder, move, delete notes; search through them by keyword/tags or recursivley by filename; link them with entries from your main bibtex file; or simply open a note. All this is done from a TUI inside your terminal completley written in bash.

The editing of file content itself is done using your editor of choice. Thus, things like syntax highlighting or auto completing the notes text is handled by the editor, not notesbash. But you can specify which editor will be used. Furthermore, notesbash offers configurable templates for different file formats which makes editing new notes much easier.

Requirements

notesbash doesn't require any uncommon tools, only bash (at least version 4) and Linux coreutils.

The following commandline tools are used if available to enhance the performance:

Quick Installation

Clone the repo and afterwards run the make.sh script from inside the Git directory. The script checks if it run as root, using sudo, or by a local user. If run as root, it is installed system-wide, else it is installed locally:

git clone --branch release https://codeberg.org/carmatani/notesbash
cd notesbash
# To install it for single user only
./make.sh install 
# To install it system-wide
sudo ./make.sh install

To uninstall the tool just run ./make.sh uninstall or sudo ./make.sh uninstall (depending weather you've installed notesbash system-wide or only for a single user) from inside the locally cloned Git repository.

For more install options see the Wiki.

Demo

fuzzy search => Wiki entry

Search by tags

tag search => Wiki entry

Create notes

create notes => Wiki entry

Create bibliography specific notes

create bibnotes => Wiki entry

Export your notes

export => Wiki entry

Configuration

To configure notesbash just edit the configuration file which is installed to $XDG_CONFIG_HOME/notesbash/notesbash.conf. If XDG-convention is not used, the fallback path ist ~/.config/notesbash/notesbash.conf.

To work correctly, the following most important variables should be set:

NOTESBASH_ROOT_DIR
Set the path to the notes root directory. If variable is not set, notesbash will ask for a temporary directory.
NOTESBASH_MAIN_BIB
Define the path to the main .bib file used for bibnotes. If none is found, some functionality concerning bibnotes might not work.
NOTESBASH_EDITOR (Array)
Enter the favored editor for editing notes. Defaults to $VISUAL, $EDITOR and at last 'vi' in the given order. You can pass options to the chosen editor. Each option has to be a single array element.
NOTESBASH_GUI_EDITOR (Boolean)
By default, notesbash assumes that your editor is an in-terminal programm. If you want to use an editor with GUI mode, set the toggle to true or 1 so notesbash knows, that it has to open a new window. Typical editors with GUI mode are "VSCode", "VSCodium", "Kile", "Kate", or "Emacs" with GUI mode (which is the default).
NOTESBASH_DEFAULT_EXTENSION
Define the common extension which is usually used for the note files. It will be used to automatically create bibnotes from bibkeys or added to the filename if the extension was left blank. Defaults to md if not set.
NOTESBASH_FILE_EXTENSIONS (Array)
Define file extensions to decide which note files are shown in the TUI. E.g. md for Markdown or org for Emacs Org-Mode files (without the dot separating file name and extension!). If left blank, all files in the directories will be shown. It's possible to assign multiple files surrounded by parantheses: (org md pdf).

But notesbash offers many more customization possibilities. Check the Wiki for more information.

Usage

notesbash is mainly used with an interactive TUI from inside the terminal.

Press ? from inside the TUI to show possible keybindings, or check the Wiki.

CLI commands

Beside the TUI, there are some CLI commands to run some notesbash actions

Synopsis

notesbash [main options] [subcommand] [arguments] [file]

Main options

-h | --help
Open the manpage and exit. Can only be used without other arguments and subcommands.
-H | --health
Show possible external cli-Commands notesbash can make use of to preview documents inside the terminal, as well as other optional notesbash dependencies.
-v | --version
Show version and exit. Can only be used without other arguments and subcommands.
-c | --config-file=
Set custom config file for current session only. Takes path to config file as value. Subcommands can be executed following the config-file argument.

Subcommands

new-note [arguments] [file]

Create a new note from the command line

Needed arguments:

  • -t | --title= Enter title for the new note. Can be passed only once
  • -a | --author= Enter author. Can be passed multiple times
  • -k | --keyword= | --tag= Enter tag/keyword. Can be passed multiple times
new-bibnote [arguments] [file]

Create a new bibnote form the command line

Needed arguments:

  • -b | --bibkey= Enter bibkey for bibnote. Cac be passed only once
  • -t | --title= Enter title for the new note. Can be passed only once
  • -a | --author= Enter author. Can be passed multiple times
  • -k | --keyword= | --tag= Enter tag/keyword. Can be passed multiple times
export [arguments] [file]

Export the given file using an exporter script

Needed arguments:

  • -x | --action= Enter the export action. Possible values are 'export' and 'pdf-preview'
  • -e | --exporter= Select the exporter script.
list-all-tags

List all tags used for notes inside the notesbash main directory

print-possible-exporters [arguments] [file]

Print all exporter scripts which can process the given file

Needed arguments

  • -x | --action= Enter the export action. Possible values are 'export' and 'pdf-preview'

Licence

All code parts written by me and the other contributors is distributed under the GNU GPL 3+.

The original code is a fork of the bash file manager fff by @dylanaraps, unmodified code from fff is distributed under the MIT license.