Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Daily Reading Digest
name: Weekly Reading Digest

on:
schedule:
- cron: '30 2 * * *' # 8:00am IST daily
- cron: '30 2 * * 5' # 8:00am IST every Friday
workflow_dispatch: # also triggerable manually from GitHub Actions tab

jobs:
Expand Down Expand Up @@ -30,6 +30,6 @@ jobs:
git config user.email "contact@fplaunchpad.org"
git add _blog/
git diff --cached --quiet && echo "Nothing new to commit" || (
git commit -m "Daily reading digest $(date -u +%Y-%m-%d)"
git commit -m "Weekly reading digest $(date -u +%Y-%m-%d)"
git push
)
2 changes: 1 addition & 1 deletion _data/feeds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ members:
site: https://kartiknagar.github.io
feed: https://kartiknagar.github.io/index.xml

friends:
collaborators:
- name: Anil Madhavapeddy
site: https://anil.recoil.org
feed: https://anil.recoil.org/feed.xml
Expand Down
6 changes: 3 additions & 3 deletions scripts/fetch_digest.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
REPO_ROOT = Path(__file__).parent.parent
FEEDS_FILE = REPO_ROOT / "_data" / "feeds.yml"
BLOG_DIR = REPO_ROOT / "_blog"
WINDOW_HOURS = 25
WINDOW_HOURS = 24 * 7


def load_feeds():
Expand Down Expand Up @@ -44,9 +44,9 @@ def fetch_posts_for_group(feed_list, seen_urls, since):
posts = []
for feed_info in feed_list:
try:
parsed = feedparser.parse(feed_info['url'])
parsed = feedparser.parse(feed_info['feed'])
except Exception as e:
print(f"Warning: could not fetch {feed_info['url']}: {e}", file=sys.stderr)
print(f"Warning: could not fetch {feed_info['feed']}: {e}", file=sys.stderr)
continue

for entry in parsed.entries:
Expand Down