Usage
How to use this thing.
This is a specially managed weewiki and zet. Careful usage is required.
Writing stuff down as I go.
Utilities
Utilities are stored in the "u" folder. These are small shell scripts wrapped around weewiki that do specific things.
zsay
Most of what happens here is making logs. Do this
with u/zsay
.
cgroups
Print all the crate items associated with a particular group. Will display the filename, as well as the UUID in ergo-id format for easier typing.
Example: print all the items with the USED tag.
u/cgroups USED
rpicker
This is a helpful utility that allows one to randomly pick samples from a group.
Note that at the time of writing, this doesn't have an ignore group, which would enable choices to include samples that haven't been used before (via excluding the USED group).
hist
The hist
command provides a nice view of the most recently
commented samples in a group, and their message history.
u/hist @aw_2010% 10
This one can take a few seconds to load.
Logs
Logs are short timestamped messages added to the zettelkasten. The idea is to take notes about various samples and collections.
For general messages, use the logs
tag.
u/zsay @logs
Logs are also tied to specific sqlar groups.
Be sure to periodically dump the zet with dumpzet.sh
.
If you don't do this, stuff won't be saved.
It is very important that you tie whatever is being said to exactly one group that gets explicitely exported. If you don't, the message will get erased. If you link more than one, it will get duplicated in the repo.
What are explicitely exported groups? See the dump_zet
script.
Importing new samples
Importing new samples.
First you need to convert the sample collection into a sqlar archive. Place them into a top level folder and run this command:
sqlar foo.sqlar foo
It's very important that there isn't a slash after the
foo. For some reason using foo/
would make it so the
folder doesn't show up in sqlarfs
.
After this is created it can be imported. Do this from the directory where the sqlar archive is located, not where the smp db is located. Then run:
weewiki crate import PATH_TO_SMP/a.db foo.sqlar
See if the import worked with:
u/cgroups foo.sqlar
Once imported, it's really important to make a new directory in the smp folder, and optionally a landing page.
From there, it needs to be exported to a TSV file, so it can be managed in source control.
weewiki zet export foo.sqlar > foo/zet.tsv
Add all these files and make a commit.
After that, you'll need to add these entries to the
dump_zet.sh
and mkdb.sh
scripts.
in dump_zet.sh
, add:
zetout foo
in mkdb.sh
, add:
zetit foo
Finally, don't forget to import any wiki pages in the
genwiki.janet
script.
Copying SQLar archives
SQLar archives, once imported, don't always need to be present. They can be removed (not implemented yet), copied again.
To copy a sample database previously imported, use the copy
command. For instance:
weewiki crate copy ~/sqlar/aw_2010_wav32.sqlar a.db
Will transfer the samples over to the smp's database a.db
.
Unfortunately, there isn't an inverse operation for this
yet. But if you know the folder samples are in, they can
be removed using sqlar's -d
command.
Using a Sample
When a sample gets used for the first time, it should
get tagged with the USED
label via linking:
u/tag UUID USED
This lets me know what samples I have used and have not used.