Skip to main content

Gthnk

Gthnk is a personal knowledge management system. Capture your ideas using plain old text files. Make a journal that lasts 100 years.

Python Package Documentation Status Github Project

Overview

  • Gthnk presents a journal consisting of many entries.

  • Entries are created using plain old text files, which Gthnk imports once per day.

  • Any text editor can be used to add information to Gthnk.

  • Entries are searchable using the embedded Gthnk server, which can be accessed with a browser.

  • Plain-text enables backup/restore via hardcopy (e.g. paper) for long-term archival.

The easiest way to run Gthnk is with Docker. Gthnk also installs on Windows, Linux, and MacOS systems with Python 3.5+. See the Installation document for more details.

Quick Start

Use Docker to run Gthnk with all files stored locally in ~/.gthnk.

docker run -d --rm \
    --name gthnk \
    -p 1620:1620 \
    -e TZ=America/Toronto \
    -v ~/.gthnk:/opt/gthnk/var \
    iandennismiller/gthnk:0.8

The default text file where you will record journal entries is ~/.gthnk/journal.txt.

Open journal.txt with a text editor to add new journal entries.

Open http://localhost:1620 to access the user interface.

Journal Entries

Use the journal by editing journal.txt with a text editor. First, insert a date marker YYYY-MM-DD and a blank line to start a new journal day. Then, insert a time marker HHMM and a blank line to start a journal entry.

2020-07-04

0804

This is a simple journal entry.

0805

And this is a separate entry, a minute later.

Those two delimiters - date and time followed by a blank line - are all there is to the Gthnk journal file format. The rest is Markdown.

You can add multiple entries per day - and multiple days in a single journal - by inserting date and time markers as you work.

Command Line Interface

While the Docker container is running, the Gthnk command line interface is available using docker exec. Create a shell alias to simplify access.

alias gthnk="docker exec -it gthnk /opt/gthnk/.venv/bin/gthnk"
gthnk --help

To view the current journal buffer, use gthnk buffer.

To search for a keyword, use gthnk search.

Web Interface

To interact with the Gthnk journal, connect to http://localhost:1620.

Click the fast-forward icon to view the live journal buffer. As you edit journal.txt, this live buffer will be updated.

Once the journals have been rotated, the history of previous days becomes available within the Gthnk Interface.

Journal Rotation

When the journal rotates, all the entries are imported from journal.txt into the database. After import, the journal.txt file is wiped.

The preferred rotation method method is to use an automatic process like cron, systemd, or launchd. The journal can be manually rotated with the command line interface: gthnk rotate.

Before journal.txt is wiped, its contents are backed up. Information is never lost even if there is a problem with rotation.

Integration with Text Editors

Text editor integrations make it easier to insert journal entries.

After installing the plugin for your editor, the following key combinations are available:

  • Ctrl-Alt-Cmd-N: Insert date marker YYYYMMDD

  • Ctrl-Alt-Cmd-M: Insert time marker HHMM

Cloud Sync

You can sync Gthnk to multiple devices using a cloud file system like Dropbox or Syncthing. Use the docker run -v flag to point to your cloud storage: -v ${PATH_TO_CLOUD}/gthnk:/opt/gthnk/var

A complete example using Dropbox could look like:

docker run -d --rm \
    --name gthnk-server \
    -p 1620:1620 \
    -e TZ=America/Toronto \
    -v ~/Dropbox/gthnk:/opt/gthnk/var \
    iandennismiller/gthnk:0.8

This configuration supports running Gthnk on a dedicated server, like a local Linux machine, while editing the journal files on devices that are synced via the cloud.

To support a laptop and phone, use a custom configuration file.

docker run -d --rm \
    --name gthnk-server \
    -p 1620:1620 \
    -e TZ=America/Toronto \
    -v ~/.gthnk/gthnk.conf:/opt/gthnk/.config/gthnk/gthnk.conf \
    -v ~/Dropbox/gthnk:/opt/gthnk/var
    iandennismiller/gthnk:0.8

Then edit ~/.gthnk/gthnk.conf to specify multiple INPUT_FILES.

INPUT_FILES = "/opt/gthnk/var/journal-laptop.txt,/opt/gthnk/var/journal-phone.txt"

Other Gthnk Resources

Documentation

http://docs.gthnk.com

Metadata

Release files for gthnk 0.8.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gthnk 0.8.1
File Size Uploaded Provenance
gthnk-0.8.1.tar.gz 5.6 MB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for gthnk 0.8.1
File Interpreter ABI Platform
gthnk-0.8.1-py3-none-any.whl Python 3 none any Details

Total release size: 12.2 MB

Release files / gthnk-0.8.1.tar.gz

Download URL gthnk-0.8.1.tar.gz
Size 5.6 MB
Tags Source
SHA-256 checksum
How to use checksums
ce412d6ddbc0c6cd20bd70cae1e82c57d35899a961bc2228d4b26336c4daa9c4
BLAKE2b-256 checksum
How to use checksums
88c61f0c3a8b767898a4b3be09701be1f58c5d9bbe732586a5b90cc5231c252e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.11

Release files / gthnk-0.8.1-py3-none-any.whl

Download URL gthnk-0.8.1-py3-none-any.whl
Size 6.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
96ab767afd23952aa954e72787d1f2a34d8c84f40fc95f642f9afaf35d000a4d
BLAKE2b-256 checksum
How to use checksums
876a26ff92027cac4146e9e33fced37590d4f077ad9d329665a7d0d48b6f8a5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.11

Security for gthnk 0.8.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page