Skip to content

Commit

Permalink
README and daily cron
Browse files Browse the repository at this point in the history
  • Loading branch information
Olshansk committed Sep 7, 2024
1 parent bde4c3c commit 226cc48
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/rss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Generate Paul Graham RSS Feed

on:
schedule:
- cron: "0 0 * * 0" # Runs weekly, every Sunday at midnight UTC
- cron: "0 0 * * *" # Runs daily at midnight UTC
push:
branches:
- main
Expand Down Expand Up @@ -34,6 +34,6 @@ jobs:
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add pgessays.rss
git add feed.xml
git commit -m 'Update RSS feed'
git push
23 changes: 19 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,24 @@

[![Generate Paul Graham RSS Feed](https://github.com/Olshansk/pgessays-rss/actions/workflows/rss.yml/badge.svg?branch=main)](https://github.com/Olshansk/pgessays-rss/actions/workflows/rss.yml)

##
tl;dr Use [this RSS feed](https://raw.githubusercontent.com/olshansk/pgessays-rss/main/feed.xml) to subscribe to Paul Graham's essays.

![Screenshot 2024-09-07 at 3 29 43 PM](https://github.com/user-attachments/assets/47993ca5-d793-45da-9540-18b2b3d0e4f3)
<img width="1066" alt="Screenshot 2024-09-02 at 3 38 43 PM" src="https://github.com/user-attachments/assets/b2456125-3c2b-42c0-a3a4-92dc6bf82193">
## History & Context

## Status
I've been following Paul Graham's essays for years, but when [Founder Mode](https://paulgraham.com/foundermode.html) came out,
I realized that I had somehow missed the notification.

It turns out that the [RSS feed](https://paulgraham.com/rss.html) originally created by Aaron Swartz (RIP) fell bhind.

As one would, I obviously had to point out that something on the internet is broken:
![SC1](https://github.com/user-attachments/assets/47993ca5-d793-45da-9540-18b2b3d0e4f3)

After a week of no response, I obviously had to take matters into my own hands and fix it.

This is the story of `pgessays-rss`.

## Developing this

You can check out [prompt](./prompt.md) for the original prompt and full conversation I had with ChatGPT to develop this.

All in all, it took ~75 minutes from start to finish.
2 changes: 1 addition & 1 deletion generate_feed.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Constants
BASE_URL = "https://www.paulgraham.com/"
ARTICLES_URL = BASE_URL + "articles.html"
FEED_FILE = "pgessays.rss"
FEED_FILE = "feed.xml"


def fetch_articles():
Expand Down
4 changes: 2 additions & 2 deletions prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ I've also included the first prompt I provided just for posterity.

## Initial Prompt

Paul Graham's website links to an old RSS feed at this link: http://www.aaronsw.com/2002/feeds/pgessays.rss
Paul Graham's website links to an old RSS feed at this link: http://www.aaronsw.com/2002/feeds/feed.xml

It looks like so

Expand Down Expand Up @@ -57,7 +57,7 @@ I want to have an updated RSS feed myself and others could use and am thinking o
1. Write a A python script that:

- Scrapes https://www.paulgraham.com/articles.html
- Generates an XML feed similar to http://www.aaronsw.com/2002/feeds/pgessays.rss
- Generates an XML feed similar to http://www.aaronsw.com/2002/feeds/feed.xml

2. Use GitHub actions to run this daily or weekly
3. Host the feed on GitHub pages
Expand Down

0 comments on commit 226cc48

Please sign in to comment.