Live data from Hacker News

Using a self-rewriting README powered by GitHub Actions to track TILs

simonwillison.net

11–20 of 32 posts

Re: Using a self-rewriting README powered by GitHub Actions to track TILs

#14
What a coincidence. I implemented the exact same thing yesterday. It also happened to be my TIL for that day: how to create a Github Action.

My setup turned up much simpler, as I did not have some of the constraints that you wanted.

https://github.com/aicioara/til/blob/master/github/github-ac...

Re: Using a self-rewriting README powered by GitHub Actions to track TILs

#18
Nice! Like the idea of tracking TILs with git. I've also made self-rewriting READMEs. I did something similar but using plain git hooks (post-commit) and sed. I had to run 'git --amend' in the hook though (to avoid generating double-commits) which is probably a bad idea.

Re: Using a self-rewriting README powered by GitHub Actions to track TILs

#19

What a coincidence. I implemented the exact same thing yesterday. It also happened to be my TIL for that day: how to create a Github Action. My setup turned up much simpler, as I did not have some of the constraints that you wanted. https://github.com/aicioara/til/blob/master/github/github-ac...

Hah, that IS a coincidence! Really nice solution you have there - very minimal, and achieves exactly the same job with regards to the README.

Re: Using a self-rewriting README powered by GitHub Actions to track TILs

#20

This is cool stuff. But could someone explain how this is a self-rewriting README? It looks to me like a file updated by a commit hook.

That's exactly what it is. Maybe "self-rewriting" isn't the best summary - it's the repo that does the rewrite, not the README file itself.
Post reply on HN