Package: zkviz
zkviz: Visualize Link Network Between Zettels (Notes)Produce an interactive overview of all your notes and their connections.InstallingI recommend using Python 3 and an environment specifically for zkviz.Assuming that you're using macOS or Linux, to create the environment, open
a Terminal window and type the following to create the standalone environment
and activate it.python3-mvenv~/envs/zkvizsource~/envs/zkviz/bin/activateThen install zkviz with:pipinstallzkvizIfGraphvizis installed on your computer,
zkviz can use it to draw the network. It is not a Python package so it needs to
be installed independently. If you're on a Mac and haveHomebrewinstalled, you can install Graphviz from a Terminal
with:brewinstallgraphvizUsageTo execute zkviz from the Terminal, you either need to add the zkviz
environment path to yourPATHenvironment variable or specify the path to the
zkviz executable directly. Below, I use the explicit path.Executing zkviz without any argument will build the visualization based on all
the*.mdfiles found in the current directory.~/envs/zkviz/bin/zkvizYou can also point zkviz to the folder containing your notes. For example:~/envs/zkviz/bin/zkviz--notes-dir~/NotesBy default zkviz will look for files with the.mdextension, but you can override
the default with the--patternoption:~/envs/zkviz/bin/zkviz--pattern'*.mkdown'You can also specify multiple patterns separately. With the following, zkviz
will find all txt and md files. I recommend wrapping the pattern in quotes.~/envs/zkviz/bin/zkviz--pattern'*.md'--pattern'*.txt'You can also pass a list of files to zkviz:~/envs/zkviz/bin/zkviz"~/Notes/201906021303 the state of affairs.md""~/Notes/201901021232 Journey to the center of the earth.md"To use Graphviz to generate the visualization, add the--use-graphvizoption:~/envs/zkviz/bin/zkviz--notes-dir~/Notes--use-graphvizBy default, zkviz will draw a node for every reference found in the files
provided, even if the referenced zettel does not exist, and even if a zettel
refers to itself. You can change that behavior in two ways. The--only-listoption tells zkviz to draw links only to zettels that have been provided to it.
In the example below, only links between the two zettels will be shown:~/envs/zkviz/bin/zkviz--only-list"20190810190224 Note 1.md""20190810190230 Note 2.md"The other way to change the behavior is to disable self-reference links using
the--no-self-refoption.Using zkviz with Keyboard MaestroThekeyboard-maestrofolder includes aKeyboard Maestromacro to automatically create a visualization based on the list of files
currently selected inThe Archive. To
use this macro, download it and import it into Keyboard Maestro. The follow the
README comment within the macro to set the necessary variables.Making a ReleaseBump the version inzkviz/__init__.pyUpdate the changelog, link the versions.Commit and tag with version numberBuild a source dist withpython setup.py clean && rm dist/* && python setup.py sdistTest upload to PyPI test withtwine upload --repository-url https://test.pypi.org/legacy/ dist/*Create a temporary environmentmktmpenvand test install withpip install --index-url https://test.pypi.org/simple/ zkvizIf everything looks good, upload for real withtwine upload dist/*