From 17896fbc4c8acd7384c7c83f42e0fd8504037256 Mon Sep 17 00:00:00 2001 From: eric Date: Thu, 18 Dec 2025 14:07:03 -0500 Subject: [PATCH 1/2] hide ALL license and markdown files --- libgutenberg/GutenbergFiles.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/libgutenberg/GutenbergFiles.py b/libgutenberg/GutenbergFiles.py index 29e3af6..0d1cb42 100644 --- a/libgutenberg/GutenbergFiles.py +++ b/libgutenberg/GutenbergFiles.py @@ -95,13 +95,15 @@ def get_diskstatus(id_, filedir, type_): diskstatus determines whether a file is included in the listing of files on bibrecord page """ diskstatus = 0 - - # hide image files and markdown files + # hide license and markdown files + if type_ in {"license", "md"}: + return 1 + # hide image files if '/%s-' % id_ in filedir: - if (type_ in {"jpg", "png", "gif", "svg", "css", "xsl", "md"} + if (type_ in {"jpg", "png", "gif", "svg", "css", "xsl"} or "/images" in filedir or "/music" in filedir or "/files" in filedir or "/primefiles" in filedir): - diskstatus = 1 + return 1 return diskstatus From 1735083576db3a9688b7dfa03e3045d0df37266c Mon Sep 17 00:00:00 2001 From: eric Date: Thu, 18 Dec 2025 14:10:19 -0500 Subject: [PATCH 2/2] 0.10.33 --- CHANGES | 4 ++-- setup.py | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CHANGES b/CHANGES index e02aecd..1bc3f5a 100644 --- a/CHANGES +++ b/CHANGES @@ -1,9 +1,9 @@ CHANGES -0.10.32 (December 16, 2025) +0.10.33 (December 18, 2025) - correct GutenbergFiles.guess_type to align with currently used filenames (#49) - add support for markdown file typing (still need to add it to Filetypes table in db) -- set markdown diskstatus so it won't be listed on landing pages (#49) +- set markdown and license files diskstatus so they won't be listed on landing pages (#49) - Cosmetic changes to please ruff standard rules (from Benoit74) (#47) - respect maximum line length of 88 chars - replace `id` reserved word with `book_id` diff --git a/setup.py b/setup.py index 13b208c..50f3eb6 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ # libgutenberg setup.py # -__version__ = '0.10.32' +__version__ = '0.10.33' from setuptools import setup @@ -46,7 +46,6 @@ "Operating System :: OS Independent", 'Programming Language :: Python', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', "Topic :: Software Development :: Libraries :: Python Modules",