6 ms·
Using a self-rewriting README powered by GitHub Actions to track TILs
- cflynnus 7y agoI thought this was a pretty good idea so I make a little reusable Github Action anyone could drop into their TIL repo to get an autogenerated README: https://github.com/marketplace/actions/til-auto-format-readme https://github.com/marketplace/actions/til-auto-format-readm...
- simonw 7y agoThis was inspired by "I've been writing TILs for 5 years" from yesterday: https://news.ycombinator.com/item?id=22908044 https://news.ycombinator.com/item?id=22908044
- dchuk 7y agoAlright, now I’m definitely going to build a little web app for this
- littke 7y agoI recently started, come join me! https://todayilearned.co https://todayilearned.co @littke on twitter
- kenrose 7y agoThanks for sharing. I also recently started a TIL repo from the same inspiration and found it lame to write my first README entry. Will look at setting up what you described.
- dchuk 7y agoIf there was a public place for posting these with peers, that was built for TILs rather than just a repo, would you use it? Especially if it included an easy way to export all to markdown for backup? This would allow folks to see each other’s TILs, search them, browse by tag, like/favorite each other’s TILs, and some other fun stuff eventually
- hendry 7y agoI find the hard dependency on Github a bit disconcerting. Why not self host? What happens if https://github.com/simonw/til https://github.com/simonw/til drops away? Love your work Simon.
- simonw 7y agoMy https://til.simonwillison.net/til https://til.simonwillison.net/til site acts as a sort of off-site backup - but I should probably run a cron somewhere which pulls my repos. I have a Digital Ocean box I could do that on. Good idea!
- johntash 7y agoIf you want a recommendation, try out https://gitea.io/en-us/ https://gitea.io/en-us/ - it has a mirror feature that can periodically pull down repos for you. I've been using it to backup some of my repos on github/gitlab, without having to rely on any of my own custom scripts/crons.
- littke 7y agoI actually built a little webapp for this recently: https://todayilearned.co https://todayilearned.co For tracking and sharing of personal TILs Also as an iOS app
- NiekvdMaas 7y agoTo push back to GitHub, you can also use this action: https://github.com/ad-m/github-push-action https://github.com/ad-m/github-push-action
- alwayslearning_ 7y agoNice! I've been doing this for a while too -- https://github.com/raivivek/til https://github.com/raivivek/til
- torvald 7y agoNice. I imagine this could be used to list and track TODOs in code as well.
- aicioara 7y agoWhat 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-actions.md https://github.com/aicioara/til/blob/master/github/github-ac...
- simonw 7y agoHah, that IS a coincidence! Really nice solution you have there - very minimal, and achieves exactly the same job with regards to the README.
- jmartinpetersen 7y agoThis 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.
- simonw 7y agoThat'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.
- lonelappde 7y agoYour version doesn't have the clickbait name.
- acdibble 7y agoAlso inspired by the same post, I set up a TIL repo. I went with a shell script where you pass the category and the filename and it creates the file and recreates the README: https://github.com/acdibble/til/blob/master/create_til.sh https://github.com/acdibble/til/blob/master/create_til.sh
- chx 7y agoWhat's wrong with Pinboard notes?
- vklar 7y agoNice! 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.
- lonelappde 7y agoIt's automatically updated, not aelf-rewriting.
- pdepip 7y agoI actually wrote a tool like this that's aimed at storing and accessing information: https://mmap.it https://mmap.it The main difference is it provides full text search and global keyboard shortcuts so you can access it when you need it, without context switching.
- mikelothar 7y agoSeems like many of us had this same idea. :) Here's my TIL implementation using Github Actions: https://github.com/mlpetersen/til https://github.com/mlpetersen/til Mine is quite simple, you add new TIL's in the develop branch and commit them. Then it's built and added to the master branch.
- auggierose 7y agoMy TIL for today is that I learnt what TIL stands for. How useless.
- auggierose 7y agoActually that's wrong, in the morning I convinced myself that given a sequence of code points which forms a valid Unicode character (an extended grapheme cluster), any non-empty prefix of it also forms a valid Unicode character.
- factorialboy 7y agoSince when is programmatically generating a text file considered noteworthy / novel. Or is this trending on HN because it has the "GitHub Actions" buzzword in the title? Edit: This is a serious question.
- simonw 7y agoAuthor here. I was really proud of this piece - it's a very detailed tutorial on how to use GitHub Actions, which for me fulfills exactly the kind of content I want to see on Hacker News. It's the article I wish I had been able to read when I started working on this project.
- jsilence 7y agoCould this be implemented in emacs org-mode? How would one approach that task?
- simonw 7y agoI've added an Atom feed now: https://til.simonwillison.net/til/feed.atom?_feed_title=Simon+Willison+TIL https://til.simonwillison.net/til/feed.atom?_feed_title=Simo... Implementation details here: https://github.com/simonw/til/compare/95d99f5bb720694825719580fa15311fd0889475...a65c04955cc3b2112b9ab21b736b8bf55004034a https://github.com/simonw/til/compare/95d99f5bb7206948257195...
- hivacruz 7y agoI started doing TIL too. I made a quick and dirty bash script to generate a new article with read/vim/sed and automatically fill the README files: https://github.com/kinoute/til/blob/master/contribute.sh https://github.com/kinoute/til/blob/master/contribute.sh