Simon TIL

This is a review of https://github.com/simonw/til

Code Review

Algo

  • store text in folders
  • go through all text in all folders
    • check if text exists in the db or is different
      • if different, get the html version of the text
  • updated the created time and updated time based on the git commit

Code Snippets

root = pathlib.Path(__file__).parent.resolve()
...
def build_database():
    db = sqlite_utils.Database(repo_path / "tils.db")
    for filepath in root.glob("*/*.md"):
        ...

Thoughts

Like Simon’s code for simplicity. See the ReACT implementation. Original took a look at this because I was looking to refresh my blog and wanted some inspiration.

Some changes:

  • since my files are in Dendron, already have updated times