A taskbook clone written in Python.
noteboard is a mini command-line tool which lets you manage and store your notes & tasks in a tidy and fancy way, right inside your terminal.
- Fancy interface β¨
- Simple & Easy to use π
- Fast as lightning β‘οΈ
- Manage notes & tasks in multiple boards π
- Run item as command inside terminal (subprocess) π¨
- Tag item with color and text π·
- Import boards from external JSON files & Export boards as JSON files
- Undo multiple actions / changes
- Keep historical states π₯
Gzip
compressed storage π- Configurable through
~/.noteboard.json
The main storage is powered by shelve
, a Python standard library, which provides a lightweight & persistent file-based database system.
Whereas the "history" system (the one which allows you to undo previous actions), is backed by a json
file.
Notably, the storage and the buffer are compressed to gzip
when it is not being accessed.
This greatly reduces the sizes of the files by more than 50%.
Make sure you have Python 3.6 (or higher) installed in your machine.
NOTE: You should remove all the data stored in <StoragePath>
(default: ~/.noteboard/
) every time you install a new version to avoid conflicts.
$ git clone https://github.com/tnychn/noteboard.git
$ cd noteboard
$ python3 setup.py install
$ pip3 install noteboard
Actions:
add [+] Add an item to a board
remove [-] Remove items
clear [x] Clear all items on a/all boards
tick [β] Tick/Untick an item
mark [!] Mark/Unmark an item
star [*] Star/Unstar an item
edit [~] Edit the text of an item
tag [#] Tag an item with text
due [:] Assign a due date to an item
run [>] Run an item as command
move [&] Move an item to another board
rename [~] Rename the name of the board
undo [^] Undo the last action
import [I] Import and load boards from JSON file
export [E] Export boards as a JSON file
history [.] Prints out the historical changes
Options:
-h, --help show this help message and exit
--version show program's version number and exit
-d, --date show boards with the added date of every item
-s, --sort show boards with items on each board sorted alphabetically
-t, --timeline show boards in timeline view, ignore the -d/--date option
$ board
-d/--date
: show boards with the last modified date of each item in the format of<weekday> <day> <month> <year>
. e.g.Fri 25 Jan 2019
-s/--sort
: show boards with items on each board sorted alphabetically by the text of the items-t, --timeline
: show boards in timeline view, ignore the-d/--date
option
NOTE: If -d/--date
is specified, items of each board will be sorted by their dates from the most recent to the oldest ones.
$ board add <item text> [<item text> ...]
-b/--board <name>
: add the item to this board
If no board name
is specified, the item will be added to the default board.
Board will be automatically initialized if one does not exist.
$ board remove <item id> [<item id> ...]
Remove all items in the board.
$ board clear [<name> [<name> ...]]
If no board name
is specified, all boards will be cleared.
$ board {tick, mark, star} <item id> [<item id> ...]
Run this command again on the same item to untick/unmark/unstar the item.
$ board edit <item id> <new text>
$ board tag <item id> [<item id> ...]
-t/--text <tag text>
: tag the item with this text
If no text
is given, existing tag of this item will be removed.
Color of the tag text is specified in configurations.
$ board due <item id> [<item id> ...]
-d/--date
: due date of the item in the format of<digit><d|w>[<digit><d|w> ...]
(d
for day andw
for week) e.g.1w4d
for 1 week 4 days (11 days)
If no date
is given, existing due date of this item will be removed.
$ board move <item id> [<item id> ...]
-b/--board <name>
: move the item to this board
If board does not exist, one will be created.
$ board rename <name> <new name>
$ board run <item id>
This will spawn a subprocess to execute the command.
NOTE: Some commands may not work properly in subprocess, such as pipes.
$ board undo
- run
- undo
- export
- history
$ board import <path>
NOTE: This will overwrite all the current data of boards.
The JSON file must be in a valid structure according to the following.
{
"Board Name": [
{
"id": 1,
"text": "item text",
"time": "<last modified timestamp>",
"date": "<human readable date format (auto manipulated by noteboard)>",
"due": "<due date timstamp>",
"tick": false,
"mark": false,
"star": false,
"tag": "<tag text>"
}
]
}
$ board export
-d/--dest <destination path>
: destination path of the exported file (directory)
The exported JSON file is named board.json
.
$ board history
Path: ~/.noteboard.json
{
"StoragePath": "~/.noteboard/",
"DefaultBoardName": "Board",
"Tags": {
"default": "BLUE"
}
}
StoragePath
: path to the custom storage path (where the data and log file are stored)DefaultBoardName
: default board name, is used when no board is specified when adding itemTags
: colors preset of tagsdefault
: [required] this color is used if no corresponding color of the tag text is found in config<tag text>
: specify your custom tag colors by adding<tag text>: <color>
toTags
attribute of the config
NOTE: color
must be upper cased and a valid attribute of colorama.Fore
. E.g. LIGHTBLUE_EX
for light blue and CYAN
for cyan.
Some terminal emulators may not support dimmed (Style.DIM
) & underlined (\033[4m
) text.
The program also uses symbols such as β
and β
which also may not be displayed properly if a wrong encodings is set.
This project is inspired by @Klaus Sinani's taskbook.
MIT Β© 2019 Tony Chan