Zettelkasten Forum


Visualize your Zettelkasten, see stats and unconnected Zettel

Hi everybody 👋

I scratched my own itch and wrote a program that can visualize a Zettelkasten, print stats, and show orphaned Zettel. See the GIF below for a short demo:

Vizel Demo

You can install it with pip install vizel. A more in-depth documentation and the source-code are on GitHub.

I personally use the stats command every day to see how my Zettelkasten evolves over time.

The graph-pdf command is useful to see clusters of Zettel and unconnected notes.

The unconnected command prints out Zettel who are orphaned, and I try to periodically go through that list and link them up.

Related threads I found upon a cursory search:

I hope some of you find it useful, and I'm happy to hear your thoughts.

Comments

  • This is truly great work, I'll share this on the interwebs wherever I can :)

    (To find this thread later, lemme add a tag: #script )

    Author at Zettelkasten.de • https://christiantietze.de/

  • @ctietze said:
    This is truly great work, I'll share this on the interwebs wherever I can :)

    (To find this thread later, lemme add a tag: #script )

    Thank you, Christian, for the kind words! I truly enjoy using The Archive, so I'm happy I can give something back.

  • @BasilPH this is appealing and the pip install went easy peasy. On initial running, I got a face full of the traceback. Any ideas what my problem is? Probably user error. Maybe there is a problem with my path or the version of Python I'm running?
    python3 --version Python 3.7.4

    Wills-Laptop:~ will$ vizel stats /Users/will/Dropbox/zettelkasten/
    Traceback (most recent call last):
      File "/Library/Frameworks/Python.framework/Versions/3.7/bin/vizel", line 8, in <module>
        sys.exit(main())
      File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/click/core.py", line 829, in __call__
        return self.main(*args, **kwargs)
      File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/click/core.py", line 782, in main
        rv = self.invoke(ctx)
      File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
        return _process_result(sub_ctx.command.invoke(sub_ctx))
      File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
        return ctx.invoke(self.callback, **ctx.params)
      File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/click/core.py", line 610, in invoke
        return callback(*args, **kwargs)
      File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/vizel/cli.py", line 127, in stats
        digraph = _get_digraph(directory)
      File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/vizel/cli.py", line 55, in _get_digraph
        short_des = zettel_id + '\n' + zettel_name.replace('_', ' ').replace('.md', '').replace('.txt', '')[13:63]
    TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
    

    Will Simpson
    I'm a Zettelnant.
    Research: Rationalism, Zen, Non-fiction Creative Writing
    kestrelcreek.com

  • Hi @Will , thank you for giving it a try, and sorry for the crash. Your Python version should be fine.

    I suspect that one of your files has an invalid ID. In any case, it shouldn't just crash though. I have made the code more robust, it now skips a Zettel if it can't handle the ID.

    Please run pip install --upgrade vizel and try again. It should tell you which Zettel causes trouble.

  • Thank you @BasilPH - This is really a fine and useful program.

  • @BasilPH said:
    You can install it with pip install vizel. A more in-depth documentation and the source-code are on GitHub.

    I had to use pip3 install vizel for this to work on my machine.

    THANKS for this, the stats, unconnected and graph-pdf commands are super useful!

    Ben

  • Any plan to make it compatible with note collections that aren't time identifier based? Say if someone just has normal titled md files?

  • I had to use pip3 install vizel for this to work on my machine

    Good point @benhamilton. Is it possible that if you run python --version you get something below 2.7? vizel is compatible with 2.7, and 3.4+.

  • @Nick said:
    Any plan to make it compatible with note collections that aren't time identifier based? Say if someone just has normal titled md files?

    Thank you for your interest @Nick. I might do that. I'm currently working on also supporting markdown links instead of just the [[ID]] format. And in doing so, I could also support different types of IDs.

    You can follow the progress on the markdown links in this GitHub issue.

  • @BasilPH said:

    I had to use pip3 install vizel for this to work on my machine

    Good point @benhamilton. Is it possible that if you run python --version you get something below 2.7? vizel is compatible with 2.7, and 3.4+.

    Not sure if this is useful information, but I had to use pip3 install as well. I have both python 2.7.16 and python 3.7.3 on my computer.

  • I'm happy to announce the release of v0.2.0 of vizel.

    The two new features are:

    • Support for markdown links
    • Ignore self-references

    You can install the newest version with pip install --force-reinstall vizel==0.2.0. You'll find the documentation here.

    Please let me know about features that you would like to see. Check out the issues on GitHub to see what is planned.

    Please see here for the detailed release notes.

    Thanks to everybody who gave input and tested the beta versions.

  • Basil, you may want to check out Obsidian, it also has a connection graph visualizer thats pretty cool.

    Great work BTW !

  • edited July 12

    Thank you for your comments and encouragement @Pda0! I'm planning to look into better ways to visualize the connections, and I'll definitely check out Obsidian in the process.

    I just released v0.2.1 which fixes vizel not correctly handling multiple links if they are all on the same line.

Sign In or Register to comment.