Nothing Special   »   [go: up one dir, main page]

Skip to content
/ Til Public

A Swift command-line tool to manage a Today-I-Learned repository.

Notifications You must be signed in to change notification settings

antranapp/Til

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Til: Today I Learned

Til is a command line tool written in Swift to manage a Today-I-Learned repository.

😯 What is a Today-I-Leanred (Til) repository?

If you don't know what "Today I Learned" is, then lmgtfy

A til repository is a place to store things you have learned or read or stumbled upon.

With a repository, you can go back in time and search for something that you know for sure you have seen before but probably can't find it again, such as in Google.

Using public git repositories to store your tils enable you to share your tils with other peers easily.

This movement has been adopted also by many organisations to provide a bite size information to their audiences, such as:

💻 TIL in software development context

In Software development, we collect over the time so many code snippet, tips, tricks for our jobs. But it is not an easy task to manage such information so that you can easily find them again.

It's also not so easy to share such information with others if you only save them locally on your computers.

I've accidently found this discussion in Hacker News about a guy who have been managing his TIL repository for over 5 years

His TIL repository is full of interesting and useful information.

Then I take look in github, the til topic is full of interesting repositories.

I'm totally convinced by the idea and also starting to create a TIL repository for myself:

But after some days, I find it is hard to mange it, and also to find the snippet that I'm looking for again.

So I have started to build a command-line tool to help me managing this TIL respository more easily.

😲 I'm sold, so what is this tool?

The command line tool can basically:

  • Add a new topic: create a markdown file with some pre-filled meta data and open a markdown editor for you to add information
  • Generate a README.md by aggregating all Tils in the repo and list them in a table view organized by topics.
  • Deploy all changes to the remote repository.

😭 Oh no, why Swift?

Sorry, I'm iOS developer.

You should actually try! Swift. It is a relatively easy to learn and powerful programming language.

💪 Seriously man, how can I use it?

Requirements:

I've just tested the tool on my Mac, but theoritically it should also work on Linux (Ubuntu). And soon you should be able to use the tool on Windows and additinal Linux distributions.

Installation:

mkdir til
git checkout https://github.com/antranapp/Til.git
cd Til
chmod +x release.sh
./release.sh

You can add a Til.yaml to customise the settings:

root: temp
editor:
  name: code
  gui: /usr/bin/open -b com.microsoft.VSCode
  console: code

Available commands:

Til add <topic> <title>
Til generate-readme
Til deploy

I'm working on an easy setup for the tool, such as using brew

Til Reference

OVERVIEW: A Swift command-line tool to manage a Today-I-Learned repository

USAGE: Til <subcommand>

OPTIONS:
  -h, --help              Show help information.

SUBCOMMANDS:
  add                     Add a new Today-I-Learned entry using a default
                          MarkDown editor.
  generate-readme         Generate a README.md from the content.
  deploy                  Deploy the content to the remote repository.

🤯 What is the future plan?

Some ideas I have in mind now:

  • A command create a static website so that we can display the tils in Github Pages and also add some Full-Text-Search to that.
  • A command to create a PDF from a remote site and attach it to the til to preventing the information going away when the remote sites are not reachable or changed.
  • Automatic summarize remote data sources.

If you have any interesting ideas, please tell me what you want to add by creating new issues or new PRs

🍻 Resources

There are some similar tools already existed if you want some alternatives: