diff options
author | Solderpunk <solderpunk@sdf.org> | 2020-03-17 15:12:11 +0100 |
---|---|---|
committer | Solderpunk <solderpunk@sdf.org> | 2020-03-17 15:12:11 +0100 |
commit | cb2bca2edbb9692cf530847e95d6f35e2f78b6b2 (patch) | |
tree | e58d5ea8b9134921658a3ec19027f8d52578ec55 | |
parent | 63365f07426d618791a54ce879bcb4163da2e814 (diff) |
Remove support for .gem extension, as the Best Practices document mentions only .gmi and .gemini.
-rw-r--r-- | gemfeed.py | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -14,15 +14,14 @@ def is_world_readable(filename): def get_feed_title(): default = "Just another Gemini feed" - for extension in ("gmi", "gem", "gemini"): - filename = "index.{}".format(extension) - if os.path.exists(filename) and is_world_readable(filename): - return extract_first_heading(filename, default) + for index_file in ("index.gmi", "index.gemini"): + if os.path.exists(index_file) and is_world_readable(index_file): + return extract_first_heading(index_file, default) return default def find_files(n=10): files = [] - for extension in ("gmi", "gem", "gemini"): + for extension in ("gmi", "gemini"): files.extend(glob.glob("*.{}".format(extension))) index = "index.{}".format(extension) if index in files: |