diff options
author | Bryan Newbold <bnewbold@archive.org> | 2022-01-05 09:03:44 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@archive.org> | 2022-01-05 09:03:44 -0800 |
commit | 1eb4149c0619fcaf806a5c95017f438acee9143f (patch) | |
tree | 3537a01bc85b7519c8cf67a8face8d5da0ac4dc5 | |
parent | 238b271dfebd94371ee85ffa862bbe429ad21633 (diff) | |
download | fatcat-scholar-1eb4149c0619fcaf806a5c95017f438acee9143f.tar.gz fatcat-scholar-1eb4149c0619fcaf806a5c95017f438acee9143f.zip |
move public domain wall to 1926 ('before 1927')
-rw-r--r-- | fatcat_scholar/search.py | 7 | ||||
-rw-r--r-- | fatcat_scholar/transform.py | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/fatcat_scholar/search.py b/fatcat_scholar/search.py index c49bd98..b99a661 100644 --- a/fatcat_scholar/search.py +++ b/fatcat_scholar/search.py @@ -50,7 +50,7 @@ class FulltextQuery(BaseModel): {"label": gettext("Past Week"), "slug": "past_week"}, {"label": gettext("Past Year"), "slug": "past_year"}, {"label": gettext("Since 2000"), "slug": "since_2000"}, - {"label": gettext("Before 1925"), "slug": "before_1925"}, + {"label": gettext("Before 1927"), "slug": "before_1927"}, ], } type_options: Any = { @@ -198,8 +198,9 @@ def apply_filters(search: Search, query: FulltextQuery) -> Search: elif query.filter_time == "since_2000": this_year = datetime.date.today().year search = search.filter("range", year=dict(gte=2000, lte=this_year)) - elif query.filter_time == "before_1925": - search = search.filter("range", year=dict(lt=1925)) + elif query.filter_time == "before_1925" or query.filter_time == "before_1927": + # 1925 value retained for backwards compatibility in URLs + search = search.filter("range", year=dict(lte=1927)) elif query.filter_time == "all_time" or query.filter_time is None: pass else: diff --git a/fatcat_scholar/transform.py b/fatcat_scholar/transform.py index 207c325..027fb47 100644 --- a/fatcat_scholar/transform.py +++ b/fatcat_scholar/transform.py @@ -441,7 +441,7 @@ def check_exclude_web(biblio: ScholarBiblio) -> bool: Returns a flag that fulltext web archive options to a work should not be linked to from web interface """ - if biblio.release_year and biblio.release_year <= 1925: + if biblio.release_year and biblio.release_year <= 1926: return False if ( biblio.container_ident |