Skip to content

Commit

Permalink
add more rilke
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Morris committed Jul 27, 2024
1 parent 01f33ac commit 235f13f
Show file tree
Hide file tree
Showing 6 changed files with 48,212 additions and 35,288 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
poems
-----

All of the poems in here are good, or interesting. There are currently 8,437 poems by 552 poets.
All of the poems in here are good, or interesting. There are currently 8,438.0 poems by 551 poets.
2 changes: 1 addition & 1 deletion poems/author.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Author():
birth: dict = field(default_factory=list)
death: dict = field(default_factory=list)
gender: str = None
college: str = None
education: str = None
movement: str = None
religion: str = None
nationality: str = None
Expand Down
4 changes: 3 additions & 1 deletion poems/catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,13 @@ def __init__(self, filepath: str):

context_keywords = poem["metadata"].get("context", {})

poem_tags = [*author_tags, *context_keywords.values(), *poem["metadata"].get("tags", [])]

entries[index] = {
"author": author,
"title": title,
"context": context_keywords,
"tags": [*author_tags, *context_keywords.values()],
"tags": poem_tags,
"date": poem["metadata"].get("date", None),
"translator": poem["metadata"].get("translator", None),
"word_count": len(poem["body"].split()),
Expand Down
83,488 changes: 48,205 additions & 35,283 deletions poems/data/poems.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion poems/poem.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def html_footer(self, archive_link=False):
if self.spacetime:
parts.append(f'<i>{self.spacetime}.</i>')
if self.source:
parts.append(f'From <i>{self.source}</i>')
parts.append(f'from <i>{self.source}</i>')
if archive_link:
parts.append('<a href="https://thomaswmorris.com/poems">daily poems archive</a>')
return "\n<br>".join(parts)
Expand Down
2 changes: 1 addition & 1 deletion poems/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def make_author_stats(history, catalog=None):

for author in stats.index:

stats.loc[author, "n_poems"] = catalog.data[author]["metadata"]["n_poems"]
stats.loc[author, "n_poems"] = sum(catalog.author == author)
attrition = stats.loc[author, "n_times_sent"] / stats.loc[author, "n_poems"]
stats.loc[author, "attrition"] = np.round(attrition, 3)

Expand Down

0 comments on commit 235f13f

Please sign in to comment.