README
Notekeeper
This is a simple Node.js utility for making notes.
- You can save and manage Notes with a full power of your preferred Text Editor.
- Notes are stored in plain text Base files which are easy to read without Notekeeper.
- Helps you to create hierarchically structured knowledge base for storing any texts containing any symbols.
Warning: this software is discontinued. It works, but the author decided to use some ideas from here in the new app Knowkeep. The main reason is the name "Notekeeper", it's not unique and was used just for proof-of-concept.
Installation
sudo npm i -g notekeeper
I recommend to make an alias for a command
notekeeper
which bootstraps the utility.
On the first run Notekeeper creates in your Home Directory a folder notekeeper
containing next files:
config.json
stores paths and settingstemplate_base.txt
stores a markup for database records'template_interface.txt
stores a markup for the Interfacetemplate_tree.txt
stores a markup for the Tree-view
Then Notekeeper will ask 3 questions:
- a path for a Database file for storing Notes,
- a path for a Interface file -- a temp file that will be opened in your text editor,
- a shell command which can open your Text Editor.
It's ok to skip all answers to use default settings (base.note
, new_note.note
, subl
).
Attention!
The default shell command
subl
does not work on Windows! An example of a working shell command for Windows:start "" "c:\\Program Files\\Sublime Text 3\\sublime_text.exe"
Text Editors
Notekeeper was well tested with Sublime Text 3, Atom, VS Code on Linux.
It should work with any text editor which can be executed by a shell command <editor> <filepath>
.
Your text editor must support hot reloading of externally edited files.
Syntax highlighting
Notekeeper uses a extension .note
for Base files and the Interface file. The syntax of these files may be highlited in your text editor:
- The best choise for Sublime Text is
D
syntax. - An extension
notekeeper-syntax
specially written for VS Code uses JS-React syntax highlighting.
.
How it works
- At the startup, Notekeeper parses the Database file trying to find already Used Tags there.
- The Interface file is opened in your Text editor and shows you Tags parsed from the base.
- Write or paste your note in the first line of the Interface. Your note may contain an unlimited count of lines and any symbols.
- Specify an optional name and comma-separated tags (also optional). A tag may contain whitespaces.
- Save the file by pressing
ctrl+S
(Command+S
). Notekeeper will detect the change of the Interface file, parse your note and push it to the Database. If you don't want to save the current Note to the Database just leave the Commands field empty. If you specify a name for your note, you will be able to edit it later.
.
Interface
The default interface looks like this:
================================== name ======================================
================================== tags ======================================
================================ commands ====================================
add
========================== tags used previously ==============================
tag
The first line is intended for the text of your new Note.
================================== name ======================================
is a delimeter important for the interface. Don't edit delimeters during the runtime. Otherwise, the Interface can not be parsed by Notekeeper and a warning appears.
A Line under the "name" delimeter is a field to enter the name of your Note. It's not required but makes it possible to edit and delete notes later using a name as an identifier. Names must be unique. It's a single-line field.
The "tags" field may be used to add a list of tags (or marks, categories, parents...) to your new note. Tags are not required. It's a single-line field.
The "commands" field accepts commands for Notekeeper. There also messages appear. A command is a single-line field. Other lines are ignored.
The Tags parsed from Database will be shown it the last field. Their goal is to make Tags reusing more handy with the autocomplete function provided by your Text editor). This is not an input field and is not readed by Notekeeper.
.
List of commands
- Empty command -- do nothing
add
-- save the current note to the basemul
-- add multiple comma-separated records to the base (example: mul a, b,c). The unique names will be added to the Base and non-unique ones will be offered to adoption.mix
-- concat the record from the base and the new record with the same name. It adds only unique information during a concatenation process.get
-- load a record by a name (example:load info
)last
-- load the last added/edited recordedit
-- edit a record by a namedel
-- delete a record by a nameren
-- rename a recordadopt
-- add new parents to records enlisted in the commang arguments (example: adopt rec1, rec2, rec3)clr
-- clear all fields of the Interfacetree
-- show the base or a record in a tree-view structureload
-- load/reload base to work with (example:load js
)exit
-- close the program
.
Templates
You may change a view of the Notekeeper's Interface. It's stored in template_interface.txt
. The fields are marked by tags like this: <m>...<text>
. A tag consists of 3 parts:
- "start" points to a type of the field.
m
means a multi-line field. - "value". The default value for the "command" field is
add
. - "end" points to a name of the field.
There must be at least one any symbol between the tags. This template will not be parsed correctly: <><text><><tags>
.
Here is an example of minimalistic template for the Interface:
<m><text>
=========================== name, tags, commands ===========================
<><name>
<><tags>
<m>add<command>
=========================== tags used previously ===========================
<>tag<tags_used>