Skip to content

Commit

Permalink
remove unused around_the_library.html and get_random_recent_changes (#…
Browse files Browse the repository at this point in the history
…9926)

* remove unused around_the_library.html and get_random_recent_changes
  • Loading branch information
siddarth2810 authored Oct 4, 2024
1 parent 09865f5 commit 634240c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 66 deletions.
7 changes: 1 addition & 6 deletions openlibrary/i18n/messages.pot
Original file line number Diff line number Diff line change
Expand Up @@ -4641,7 +4641,7 @@ msgid ""
"something new."
msgstr ""

#: home/stats.html site/around_the_library.html
#: home/stats.html
msgid "Around the Library"
msgstr ""

Expand Down Expand Up @@ -5915,7 +5915,6 @@ msgid "expand"
msgstr ""

#: recentchanges/default/message.html recentchanges/edit-book/message.html
#: site/around_the_library.html
msgid "opened a new Open Library account!"
msgstr ""

Expand Down Expand Up @@ -6258,10 +6257,6 @@ msgstr ""
msgid "Internet Archive logo"
msgstr ""

#: site/around_the_library.html
msgid "View all recent changes"
msgstr ""

#: site/body.html
msgid "It looks like you're offline."
msgstr ""
Expand Down
14 changes: 0 additions & 14 deletions openlibrary/plugins/upstream/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1385,20 +1385,6 @@ def render(c):


@public
def get_random_recent_changes(n):
if "recentchanges_v2" in web.ctx.get("features", []):
changes = _get_recent_changes2()
else:
changes = _get_recent_changes()

_changes = random.sample(changes, n) if len(changes) > n else changes
for _, change in enumerate(_changes):
change['__body__'] = (
change['__body__'].replace('<script>', '').replace('</script>', '')
)
return _changes


def _get_blog_feeds():
url = "https://blog.openlibrary.org/feed/"
try:
Expand Down
46 changes: 0 additions & 46 deletions openlibrary/templates/site/around_the_library.html

This file was deleted.

0 comments on commit 634240c

Please sign in to comment.