Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
hb
==
______.--.
|x--| |-@|
|o--|1-|%$|
| |2-`--'
|___|__/
hb can be used to hold txt databases such as ledger and todo.txt.
hb provides syncing capabilities to your notebook via git.
You may like hb if you do any of the following,
- Manage personal finance with ledger
- Write todo's in todo.txt
- Write zettle
- Write blogs
How you manage these files is entirely upto you, hb only provides
a standard interface to access all these files.
*Additional plugin based sync capabilities are planned for future.
Usage
-----
hb is a tool that makes storing and retrieving text related information
effortless. Start by,
$ hb new note.txt
This creates a note.txt under $HB_PATH
$HB_PATH is the directory where all notes end up. If $HB_PATH is not
provided, "$XDG_DATA_HOME/notes" is used as $HB_PATH.
Sometimes you may want to import a note from your filesystem under hb.
To do that use,
$ hb new -m . Downloads/recipe.txt
$ hb new -c . WorkingDir/somefile.txt
$ hb new -m zettle a-new-idea.md
-m does a move operations, and -c does a copy operation.
This simply utilizes the mv and cp commands in UNIX. So in the above
example, a-new-idea.md will either be placed in zettle/ if the directory
exists, else $HB_PATH/zettle will simply be replaced as a file.
You may find the -m and -c options to edit the directories cumbersome, and
there is currently no way to add new subdirectories. An alternate would be,
$ hb e .
This will open $HB_PATH dir in $FM. $FM defaults to cd, but you can
set it to you favourite file manager. Another option is setting to xdg-open.
After populating files inside hb, you can access them with,
$ hb
This will start a fuzzy matcher if $FUZZER is set. If $FUZZER is empty or not
found in $PATH, hb will fail with an error.
To access a particular file,
$ hb e recipe.txt
$ hb e somefile.txt
Every edit operation gets recorded in $HB_HIST, which by default sits in
$HB_PATH/.hbhistory. To edit the last edited file,
$ hb e
And finally,
$ hb sync
Does a commit, pull, push cycle in the notes folder.