diff --git a/config.py b/config.py index d1c424b..45cb3b9 100644 --- a/config.py +++ b/config.py @@ -12,6 +12,12 @@ MAIN_PAGE = "gemini://tilde.team/~khuxkm/leo/" # In case GUS ever goes down, is replaced, or changes URL, this will allow for easy fixing of Zenit. BACKLINKS = "gemini://geminispace.info/backlinks" +# Domains that refer to the same capsule. +# For instance, tilde.team has several domains. +DUPLICATED_DOMAINS = { + "tilde.team": ['fuckup.club', 'nand.sh', 'ttm.sh', 'tild3.org', 'tilde.life', 'tilde.site', 'tildeteam.net', 'tildeteam.org'] +} + # Determine a "capsule". # Used to prevent one person from flooding the orbit with pages. # One page is allowed in the list per "capsule". @@ -22,6 +28,9 @@ def determine_capsule(parsed): capsule+="/"+parsed.path.split("/")[1][1:] if parsed.path.startswith("/users/"): # gemini.circumlunar.space uses this format as well capsule+="/"+parsed.path.split("/",3)[2] + for domain in DUPLICATED_DOMAINS: + for alt in DUPLICATED_DOMAINS[domain]: + capsule.replace(alt,domain) return capsule # Required links.