Ink
Part of my notetaking process involves writing things by hand using pen and paper.
Initial Scaling and Rotation
Pages are scanned using a portable wand scanner (using the low-res setting), and then they are scaled and rotated using imagemagick:
rotcc ()
{
IN=$1
OUT=$2
convert $IN -resize 50% -rotate -90 $OUT
}
rot ()
{
IN=$1
OUT=$2
convert $IN -resize 50% -rotate 90 $OUT
}
Pages are saved as JPG files.
Importing into Zet And Link to Notebook
A single page can be
imported with the command u/ink_import
. Inks are saved
to their own SQLar archive, then imported into the Zet
as a Crate
item.
u/ink_import_all
will import all files in a given
directory with a ".jpg" extension.
u/ink_import_filelist
will read from a list of files
instead of a directory. The important distinction here
is that files in the list will be linked together as
continguous pages. It's important that the
directory
parameter points to the directory where all
the jpg files are. The filelist shouldn't have any
subdirectories, and each file should be on their own line.
Once imported, a zetdo task to review inked page is
automatically created. This is done as a way to remind
myself to revisit old ideas and brainstorms (a process I refer
to as creative reinforcement
).
To see pages for review, running "tagged ink" should be
good enough. To see the next two pgaes on deck, run
u/next_ink_todo
.
To append pages to a note book:
Import pages:
$ u/ink_import_filelist ~/sqlar/ink.sqlar ~/ink/ ~/ink/files.txt
These will print UUIDs for each page imported, take note what the top one is (maybe use `head -n 1`?)
Find the top page of the desired notebook with
$ u/notebooks
Find the last page with
$ u/pages TOP_PAGE_UUID | tail -n 1
Set the last page to point to the first imported page:
$ u/set_next_page LAST_PAGE_UUID FIRST_IMPORTED_PAGE_UUID
SQLar Ink Validation
Use sqlar_validate
to validate that the number of files
in the SQLar file line up to the ones in the Zet.
u/sqlar_validate ~/sqlar/ink.sqlar
At the moment, there is a bug that returns a false negative if a directory is there.
New ink importing (append to existing notebook)
u/notebook_append gopqeoope ~/sqlar/ink.sqlar ~/ink/ ~/ink/sep13.txt
Ink Dagzet Curation
tagged ink > TODO.txt
Create dagzet nodes from template
u/ink_task_to_dagzet TODO.txt > dagzet/graph/raw_ink.dz
NOTE: generated dagzet file makes .jpg filenames, which will need to be replaced with .png files. global substitution should be fine.
update dagzet/util/gendb.sh
, if needed.
regenerate the dagzet.
./dagzet/util/regen.sh
Next, extract any new ink from the ink sqlar.
Make sure the ink sqlar is mounted.
sqlarfs ~/sqlar/ink.sqlar tmp/
Then run the extract ink utility
./dagzet/util/extract_ink.sh
When that's completed, the new files in res/brain/dz will need to be added to the GH repo.
Then, set the TODO items to be done.
./u/bulk_done TODO.txt