Skip to main content

Simple Zettelkasten note-taking with CLI & Git integration.

Project description

pyzet

Tests

"I, of course, do not think everything by myself. It happens mainly within the Zettelkasten".

pyzet is a CLI tool targeted at note-taking and personal knowledge management using the Zettelkasten approach with Git repos.

Installation

Prerequisites:

  • Python 3.8+
  • Git 2.25+ (but older also should be fine)

Unix and Windows are supported. You can install pyzet with pip:

pip install pyzet

Tutorial

For the quick setup for the either platform (make sure to create missing folders):

pyzet sample-config unix > ~/.config/pyzet/pyzet.yaml
pyzet sample-config windows | Set-Content ~/.config/pyzet/pyzet.yaml

Run pyzet init to create Git repo.

You can read the more detailed tutorial here.

Configuration

A config file should be placed inside ~/.config/pyzet/pyzet.yaml, and looks like this:

repo: ~/zet
editor: /usr/bin/vim
  • repo: the location of the ZK Git repo

  • editor (default: /usr/bin/vim): path to the editor used to add and edit zettels

Support for multiple ZK repos

You can have multiple repos, and only a single config file, because there is --repo flag that you can always set to point to a custom repo (and possibly, create an alias that includes it). If --repo flag is used, the value from YAML is ignored.

Supported editors

Pyzet launches editor you defined in the config file with just a positional argument of the zettel filename. It works fine with any editor that doesn't require additional parameters to start (e.g., vim or nano).

Development installation

Development dependencies are stored in requirements-dev.txt. To install the package in editable mode with the dev dependencies run the following after cloning the repo:

pip install -e .
pip install -r requirements-dev.txt

For running tests more easily, you might also want to install tox:

pip install tox

Then you can easily run:

tox -e coverage    # pytest with test coverage
tox -e pre-commit  # run pre-commit checks on all files

Inspiration and further reading

The biggest inspiration for this project was Rob Muhlestein (@rwxrob), and his approach to Zettelkasten. Probably the best way to get a grasp of it, is to read about it in his public Zettelkasten repo. Rob also maintains a Bash CLI tool cmd-zet.

See also:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyzet-0.7.0.tar.gz (17.6 kB view hashes)

Uploaded Source

Built Distribution

pyzet-0.7.0-py3-none-any.whl (18.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page