Index

Follow changes in a file on Github

Sometimes, I want to watch for changes in a file on Github.

A CODEOWNERS file works OK to alert someone of pull requests (upcoming changes), but it isn’t really an option for folks who aren’t part of the development team.

I found out recently that you can do this via Github’s RSS/Atom feeds!

To watch the file README.rst on the main branch of https://github.com/adafruit/circuitpython, use the RSS feed: https://github.com/adafruit/circuitpython/commits/main/README.rst.atom

Thanks, Jake!

I would love for a way to extend this and be alerted to public pull requests that affect that file. Let me know if you have any ideas!

Search and parse a field with Awk

I frequently need to do extremely simple parsing. Often I resort to grep and cut, or a regular expression I send through Python or perl. Today, I learned how to use awk for this.

awk '-F: ' '/Configuration backup archive complete/{print $2}' will look for a line with “Configuration backup archive complete”, split the line up by colons, and print the second field.