Skip to content

Commit

Permalink
last couple ther-roots and can-po
Browse files Browse the repository at this point in the history
  • Loading branch information
Khemarato Bhikkhu committed Jun 13, 2024
1 parent 36051b0 commit f74dcd4
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/mastoposter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Mastodon Autoposter
on:
workflow_dispatch:
schedule:
- cron: "0 8,20 * * *"
- cron: "0 14,22 * * *"
jobs:
mastoposter:
runs-on: ubuntu-latest
Expand Down
22 changes: 22 additions & 0 deletions _content/av/dhp-thig-songs_corp-ronald.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: "Songs of the Dhammapada and Elder Sisters"
authors:
- "Ronald Corp"
subcat: music
translator: "Francis Booth"
external_url: "https://youtube.com/playlist?list=PLXywVsvzM1S46CF3ArJaCdYktjiXWF09c"
course: canonical-poetry
tags:
- west
- form
- pali-canon
year: 2011
publisher: "Stone Records"
minutes: 24
---

A few songs from two albums setting some verses from the Pāḷi Canon to music in the Western style.

You can get the booklets for both albums off the publisher's website:
- [Dhammapada](https://stonerecords.co.uk/album/ronald-corp-dhammapada/)
- [Therigatha](https://stonerecords.co.uk/album/ronald-corp-songs-of-the-elder-sisters/)
19 changes: 19 additions & 0 deletions _content/reference/handbook-pali-literature_hinuber.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: "A Handbook of Pali Literature"
authors:
- hinuber-oskar-v
external_url: "https://archive.org/details/0002ahandbookofpaliliteratureoskarvonhinuber/page/VII/mode/1up"
course: theravada-roots
tags:
- pali-literature
- pali-canon
- indian
year: 1996
olid: OL9459781M
publisher: "De Gruyter"
address: "Berlin"
pages: 249
---

A bibliography of the important texts written in Pāḷi. A vital reference work for any scholar of Theravādan or Early Buddhist History.

22 changes: 11 additions & 11 deletions scripts/mastoposter.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,21 +182,21 @@ def write_post_for_item(page: website.ContentFile) -> str:
print("Selecting the next post...", flush=True)
last_few_urls = [p['card']['url'][len(website.baseurl):] for p in last_few_posts if p['card']]
idx_to_post = None
for ridx, c in enumerate(reversed(website.content)):
filtered_content = [c for c in website.content if c.external_url or c.drive_links]
for ridx, c in enumerate(reversed(filtered_content)):
if c.url in last_few_urls:
break
idx_to_post = len(website.content) - 1 - ridx
idx_to_post = len(filtered_content) - 1 - ridx
if idx_to_post is None:
print("::error title=Nothing to do::No new items left to post to Mastodon")
quit(1)
# skip unfree content
while not (website.content[idx_to_post].external_url or website.content[idx_to_post].drive_links):
idx_to_post += 1
if idx_to_post >= len(website.content):
print("::error title=Nothing to do::No new items left to post to Mastodon")
quit(1)
print(f"::notice title=Post Selection::Posted item {idx_to_post+1} of {len(website.content)} (~{len(website.content)-idx_to_post-1} remaining after this one)", flush=True)
status = write_post_for_item(website.content[idx_to_post])
import sys
sys.exit(1)
mtype = "notice"
remaining = len(filtered_content) - idx_to_post-1
if remaining <= 2:
mtype = "warning"
print(f"::{mtype} title=Post Selection::Posted item {idx_to_post+1} of {len(filtered_content)} free items ({remaining} remaining after this)", flush=True)
status = write_post_for_item(filtered_content[idx_to_post])
masto_info = mastodon.status_post(
status=status,
language="en",
Expand Down

0 comments on commit f74dcd4

Please sign in to comment.