Code Monkey home page Code Monkey logo

zk-tools's Introduction

Zettelkasten Tools

This is a repository for Keyboard Maestro macros which aid in managing plain text notes following wiki and Zettelkasten conventions. The macros are intended as companions to note-taking and -management software such as nvUltra and The Archive. Other such macros can be found in this Zettelkasten.de forum thread.

The macros are described in the repository's wiki.

This repository may be most useful as a reference for building your own macros and shell scripts, as most are likely to require some customisation. To this end, the shell scripts invoked by the macros are documented in the wiki and heavily commented. They are intended to be POSIX-compatible and portable where practical, but the default context is assumed to be Zsh in macOS. For instance, some scripts make use of Zsh's glob qualifiers, and the macOS-specific mdfind is used in place of find.

Assumptions

  • Your notes lie flat in a single directory (no subdirectories).

  • As above, the default context is assumed to be Zsh in macOS.

  • You trust that the notes you're working with don't include malicious command injections. I've taken precautions where I know to, but I'm new to shell scripting and this hasn't been front of mind.

How to Use the Macros

  1. Download and open the desired macro (.kmmacros).

  2. Edit any variables which should be customised in the "Set Variables" action(s) highlighted yellow, such as:

    • Notes Directory: The directory containing your plain text notes.

    • Backup Directory: The directory to which all notes to be edited by a macro will be backed up. The notes will be copied into a subdirectory with a descriptive title, like 2020-07-01, 12.00 - Rename "this" to "that". If you prefer, a version of each macro which doesn't take backups is included.

    Files and folders can be dragged from Finder into text fields in Keyboard Maestro.

  3. Assign a suitable trigger to the macro.

  4. Enable the macro.

Areas for Improvement

The following are general to most or all macros. Items specific to individual macros are noted on their respective wiki pages.

  • List searches (Keyboard Maestro's "Prompt With List from Variable" action) ought to ignore diacritics (so that a search for "tokyo" will match "Tōkyō").

  • Preserve original creation times, preferably without the use of SetFile, which requires that the user have the Command Line Tools for Xcode installed.

    The creation time of a file can be saved as a string in the syntax preferred by touch with:

    birthtime=$(date -j -f "%b  %d %T %Y" "$(stat -f "%SB" "$f")" +"%Y%m%d%H%M")

zk-tools's People

Contributors

seanakabry avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.