renerocksai / semantic_zk

semantic_zk - The Semantic Text View for your Zettelkasten
GNU General Public License v3.0
7 stars 1 forks source link

Semantic_ZK - The Semantic Text View for your Zettelkasten

MOVED - this work has been merged into Sublimeless_ZK

_Sublimeless_ZK is a tool that lets you create a note archive and also export it into a semantic HTML text view._

The following will remain here but will not be updated.

gui

Convert a Markdown Zettelkasten (check out sublime_zk, Zettelkasten.de) to a semantic text view HTML page (see Setevi) that can be viewed with any decent modern browser, even on smartphones :sunglasses:.

The resulting semantic text view features:

See it in action!

Semantic_ZK is documented in Zettelkasten style and has converted its own documentation :smile:.

See it in action here!

~ Under construction ~

Better documentation is also in the queue, but for now:

Installation

3rd party tools

You'll need pandoc installed (creates citation sources).

Binary distribution

The releases section of the GitHub repository provides binary downloads for up-to-date versions of both Windows 10 and macOs. Each distribution contains both the command line tool and the graphical tool.

There is no installer, the binaries are useable immediately after download and unzipping.

After installing, go straight to usage

From source

Check out this repo, know what you're doing:

Prerequisites

You'll need:

Execution

The command line tool zk2setevi can be executed like this:

python zk2setevi.py arguments # (see below)

The graphical toolsemantic_zk can be executed like this:

python semantic_zk.py

Usage

About the available parsers

This tool provides/uses 3 different markdown parsers:

You should always use the default mmd parser, even if your text uses pandoc syntax.

The only exception is: If your text contains pandoc style tables, then go for the pandoc parser. Pandoc [@citations] and pandoc ~~~fenced cod blocks~~~ will be converted internally automatically by the tool, so that the multimarkdown parser can handle them.

Command Line Tool

The command line tool is named zk2setevi.

Default Conversion

Due to reasonable defaults, a typical invocation looks like this:

./zk2setevi /path/to/zettelkasten /path/to/output_directory

Note: The output directory must already exist.

If you want to use the pandoc parser, type

./zk2setevi /path/to/zettelkasten /path/to/output_directory -p pandoc

Note Filtering

If you only want to convert parts of your Zettelkasten, this tool supports the following filters that can be combined as you please:

The full list of available options is displayed on the usage screen:

usage: zk2setevi    [-h] [-b FILE] [-e EXTENSION] [-l {single,double,§}]
                    [-p PARSER] [-u BASEURL] [--from FROM] [--to TO]
                    [--only-tags ONLY_TAGLIST] [--never-tags NEVER_TAGLIST]
                    input_folder output_folder

Convert a Zettelkasten into a Setevi HTML page

positional arguments:
  input_folder          Input: your Zettelkasten folder
  output_folder         Output: Folder to write output HTML to

optional arguments:
  -h, --help            show this help message and exit
  -b FILE, --bibfile FILE
                        .bib file to use for citations if none is in your
                        Zettelkasten folder (default: None)
  -e EXTENSION, --extension EXTENSION
                        extension of your markdown files (default: .md)
  -l {single,double,§}, --linkstyle {single,double,§}
                        link style: double=[[link]], single=[link], §=§link
                        (default: double)
  -p PARSER, --parser PARSER
                        markdown parser: mmd=internal Multimarkdown,
                        pandoc=pandoc, native=native (default: mmd)
  -u BASEURL, --url BASEURL
                        Remote URL the HTML should be built for (default: )
  --from FROM           (optionally abbreviated) timestamp from: include only
                        notes that are not younger than FROM (default:
                        19000101)
  --to TO               (optionally abbreviated) timestamp to: include only
                        notes that are not older than TO (default: 22001231)
  --only-tags ONLY_TAGLIST
                        only include notes tagged with tags from ONLY_TAGLIST
                        (default: )
  --never-tags NEVER_TAGLIST
                        never include notes tagged with tags from ONLY_TAGLIST
                        (default: )

Example:

zk2setevi docs_zk docs                         \
          --only-tags='#setevi #zettelkasten'  \
          --never-tags='#start'                \
          --from=20180224                      \ 
          --to=20180225

Graphical Tool

The Graphical tool semantic_zk is pretty self-explanatory:

The typical workflow is:

When the conversion is finished, the generated HTML will be rendered on the right half of the window.

Once you close the program, you can always just open the HTML in a browser from your chosen output folder, to see it again.

The optional steps are:

Screenshots of a Semantic Text View

From something like this:

fimg

To:

img

Tags:

img

Citations:

img

Notes:

rimg

Sample Note:

Zettelkasten on Android :sunglasses: