Skip to main content

A cli for tracking Things I Learned (TIL)

Project description

tilly

CLI for easily creating Today I Learned posts, inspired by Simon Willison.

Check this tilly-pub.github.io website that was genereated using tilly :)

Installation

uv venv .venv
source .venv/bin/activate
uv pip install tilly

tilly commands

Usage: tilly [OPTIONS] COMMAND [ARGS]...

  TIL (Today I Learned) Command Line Interface.

Options:
  --version  Show the version and exit.
  --help     Show this message and exit.

Commands:
  build           Build database tils.db.
  config          List config.
  copy-templates  Copy default templates to current repo for customization.
  gen-static      Generate static site from tils.db using datasette.
  hello           Say hello.
  list-plugins    List all available plugins.
  serve           Serve tils.db using datasette or the generated static...

Usage

Create a repo (or clone a repo from github):

git init

Add a TIL:

mkdir example # this will be the topic of your TIL.
echo "# My first TIL with tilly" > example/first-til.md

Commit your work:

git add .
git commit -m "adding first til"

Build the local tils.db:

tilly build

Serve you tils locally:

tilly serve

Generate a static site in the docs folder:

tilly config -l --output-folder docs
tilly gen-static

The static site can also be served locally:

tilly serve --static

You can now publish your static site to Github. Don't forget to configure the source folder docs in your repository's GitHub Pages settings.

Customize the default templates

Your can overwrite the default templates by first making a copy of the default templates:

tilly copy-templates

Change the templates to your liking, then generate your static site:

tilly gen-static --template-dir templates

Customized templates can also be served locally:

tilly serve --template-dir templates

Development, building and publishing

uv venv .venv --python=3.11
source .venv/bin/activate
uv pip install .
uv pip install -r requirements-dev.txt
./build.sh
./publish.sh

TODO

  • add search to the static site
  • create plugin for generating sitemaps
  • add related article links using vector embeddings
  • it should be possible to store the template folder in the config

DONE

  • example github actions workflow for publishing tilly static pages
  • add tests
  • update README.md with latest tilly cli commands/options (python update_readme.py)

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

tilly-0.0.7a0.tar.gz (17.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tilly-0.0.7a0-py3-none-any.whl (19.3 kB view details)

Uploaded Python 3

File details

Details for the file tilly-0.0.7a0.tar.gz.

File metadata

  • Download URL: tilly-0.0.7a0.tar.gz
  • Upload date:
  • Size: 17.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.7

File hashes

Hashes for tilly-0.0.7a0.tar.gz
Algorithm Hash digest
SHA256 a0c4bcc235c907591f757f43cc7527e8f680111d6dc381a52fc0a94807df1d94
MD5 616b61dcd47205698b35459935daad1f
BLAKE2b-256 3b0618383f62eaa3ad339d3a3a52a1a5a895e850bb7e14cd0e39b512419d5643

See more details on using hashes here.

File details

Details for the file tilly-0.0.7a0-py3-none-any.whl.

File metadata

  • Download URL: tilly-0.0.7a0-py3-none-any.whl
  • Upload date:
  • Size: 19.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.7

File hashes

Hashes for tilly-0.0.7a0-py3-none-any.whl
Algorithm Hash digest
SHA256 8b94d76a9049a331684a4f1eeee750eb6c9d23573feb4db4ea10f54c41d94722
MD5 38375b560c3bb634a366c8e203e1f52e
BLAKE2b-256 80b8321ee5996e88a6b74a96a4379d65ca3c3c03abf094e3555f8d306201247a

See more details on using hashes here.

Supported by

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