commit 6b5a9f7b4c61d777d5e941ee6b93cf98c27f7410
parent 73883455c273b5ccfbd16196ee8889593199ee74
Author: René Wagner <rwa@clttr.info>
Date: Wed, 14 Jul 2021 20:56:50 +0200
remove pikkulog separation
Diffstat:
2 files changed, 0 insertions(+), 20 deletions(-)
diff --git a/gus/constants.py b/gus/constants.py
@@ -24,9 +24,6 @@ BINARY_CHANGE_FREQUENCY_INCREMENT = 24 * 7
PROMPT_CHANGE_FREQUENCY_DEFAULT = 24 * 30
PROMPT_CHANGE_FREQUENCY_INCREMENT = 24 * 7
-PIKKULOG_CHANGE_FREQUENCY_DEFAULT = 12
-PIKKULOG_CHANGE_FREQUENCY_INCREMENT = 1
-
TEMP_ERROR_CHANGE_FREQUENCY_DEFAULT = 24
TEMP_ERROR_CHANGE_FREQUENCY_INCREMENT = 24 * 3
diff --git a/gus/lib/gemini.py b/gus/lib/gemini.py
@@ -45,8 +45,6 @@ ROOT_LIKE_PATTERN = re.compile(
"^/(~[a-z][-a-z0-9]*|users/[a-z][-a-z0-9]*|users)/?", flags=re.IGNORECASE
)
-PIKKULOG_LIKE_PATTERN = re.compile(".*/pikkulog/.*", flags=re.IGNORECASE)
-
AUTHOR_URL_PATTERN = re.compile(
"^/~([a-z][-a-z0-9]*)/|^/users/~?([a-z][-a-z0-9]*)", flags=re.IGNORECASE
)
@@ -98,7 +96,6 @@ class GeminiResource:
self._is_root_like = None
self._is_log_root_like = None
self._is_log_post_like = None
- self._is_pikkulog_like = None
self._default_change_frequency = None
self.contained_resources = None
@@ -206,15 +203,6 @@ class GeminiResource:
self._is_root_like = is_root_like
return self._is_root_like
- def _get_is_pikkulog_like(self):
- if self._is_pikkulog_like is None:
- is_pikkulog_like = False
- pikkulog_match = PIKKULOG_LIKE_PATTERN.match(self.urlsplit.path)
- if pikkulog_match:
- is_pikkulog_like = True
- self._is_pikkulog_like = is_pikkulog_like
- return self._is_pikkulog_like
-
def _get_is_log_root_like(self):
if self._is_log_root_like is None:
is_log_root_like = False
@@ -303,8 +291,6 @@ class GeminiResource:
if category == "content":
if self.is_root_like or self.is_log_root_like:
change_frequency = constants.ROOT_CHANGE_FREQUENCY_DEFAULT
- elif self.is_pikkulog_like:
- change_frequency = constants.PIKKULOG_CHANGE_FREQUENCY_DEFAULT
else:
change_frequency = constants.NON_ROOT_CHANGE_FREQUENCY_DEFAULT
elif category == "binary":
@@ -327,8 +313,6 @@ class GeminiResource:
if category == "content":
if self.is_root_like or self.is_log_root_like:
return existing_change_frequency + constants.ROOT_CHANGE_FREQUENCY_INCREMENT
- elif self.is_pikkulog_like:
- return existing_change_frequency + constants.PIKKULOG_CHANGE_FREQUENCY_INCREMENT
else:
return existing_change_frequency + constants.NON_ROOT_CHANGE_FREQUENCY_INCREMENT
elif category == "binary":
@@ -357,7 +341,6 @@ class GeminiResource:
is_root_like = property(_get_is_root_like)
is_log_root_like = property(_get_is_log_root_like)
is_log_post_like = property(_get_is_log_post_like)
- is_pikkulog_like = property(_get_is_pikkulog_like)
normalized_host_like = property(_get_normalized_host_like)
def fetch(self):