diff --git a/daemon_get.py b/daemon_get.py index 127d0b86d..b1585c942 100644 --- a/daemon_get.py +++ b/daemon_get.py @@ -48,6 +48,7 @@ from webapp_welcome_final import html_welcome_final from webapp_welcome import html_welcome_screen from webapp_welcome import is_welcome_screen_complete from webapp_podcast import html_podcast_episode +from webapp_utils import html_known_epicyon_instances from webapp_utils import get_default_path from webapp_utils import csv_following_list from webapp_utils import get_shares_collection @@ -2262,6 +2263,42 @@ def daemon_http_get(self) -> None: self.server.debug) return + if self.path == '/knowninstances': + if not authorized: + http_403(self) + return + + if calling_domain.endswith('.onion'): + msg = \ + html_known_epicyon_instances( + self.server.base_dir, 'http', + self.server.onion_domain, + self.server.system_language, + self.server.known_epicyon_instances) + elif calling_domain.endswith('.i2p'): + msg = \ + html_known_epicyon_instances( + self.server.base_dir, 'http', + self.server.i2p_domain, + self.server.system_language, + self.server.known_epicyon_instances) + else: + msg = \ + html_known_epicyon_instances( + self.server.base_dir, + self.server.http_prefix, + self.server.domain_full, + self.server.system_language, + self.server.known_epicyon_instances) + msg = msg.encode('utf-8') + msglen = len(msg) + login_headers(self, 'text/html', msglen, calling_domain) + write2(self, msg) + fitness_performance(getreq_start_time, self.server.fitness, + '_GET', 'known epicyon instances', + self.server.debug) + return + if self.path in ('/manual', '/usermanual', '/userguide'): if calling_domain.endswith('.onion'): msg = \ diff --git a/translations/ar.json b/translations/ar.json index c06dedc27..23fd277a8 100644 --- a/translations/ar.json +++ b/translations/ar.json @@ -702,5 +702,6 @@ "Art": "فن", "Reply Controls": "عناصر التحكم في الرد", "Searchable by": "قابلة للبحث بواسطة", - "Yourself": "نفسك" + "Yourself": "نفسك", + "Epicyon Instances": "حالات Epicyon" } diff --git a/translations/bn.json b/translations/bn.json index a92b693d0..61b2726b2 100644 --- a/translations/bn.json +++ b/translations/bn.json @@ -702,5 +702,6 @@ "Art": "শিল্প", "Reply Controls": "উত্তর নিয়ন্ত্রণ", "Searchable by": "দ্বারা অনুসন্ধানযোগ্য", - "Yourself": "নিজেকে" + "Yourself": "নিজেকে", + "Epicyon Instances": "এপিসিয়ন দৃষ্টান্ত" } diff --git a/translations/ca.json b/translations/ca.json index 9aeb45333..a3cad192a 100644 --- a/translations/ca.json +++ b/translations/ca.json @@ -702,5 +702,6 @@ "Art": "Art", "Reply Controls": "Controls de resposta", "Searchable by": "Cercable per", - "Yourself": "Tu mateix" + "Yourself": "Tu mateix", + "Epicyon Instances": "Instàncies d'Epicyon" } diff --git a/translations/cy.json b/translations/cy.json index c398bc04f..84d4725f7 100644 --- a/translations/cy.json +++ b/translations/cy.json @@ -702,5 +702,6 @@ "Art": "Celf", "Reply Controls": "Rheolaethau Ymateb", "Searchable by": "Chwiliadwy gan", - "Yourself": "Eich Hun" + "Yourself": "Eich Hun", + "Epicyon Instances": "Enghreifftiau Epicyon" } diff --git a/translations/de.json b/translations/de.json index d36c83454..e24e567a7 100644 --- a/translations/de.json +++ b/translations/de.json @@ -702,5 +702,6 @@ "Art": "Kunst", "Reply Controls": "Antwortsteuerung", "Searchable by": "Durchsuchbar nach", - "Yourself": "Selbst" + "Yourself": "Selbst", + "Epicyon Instances": "Epicyon-Instanzen" } diff --git a/translations/el.json b/translations/el.json index 2a4854556..e6ba75435 100644 --- a/translations/el.json +++ b/translations/el.json @@ -702,5 +702,6 @@ "Art": "Τέχνη", "Reply Controls": "Στοιχεία ελέγχου απάντησης", "Searchable by": "Δυνατότητα αναζήτησης από", - "Yourself": "Σύ ο ίδιος" + "Yourself": "Σύ ο ίδιος", + "Epicyon Instances": "Περιπτώσεις Epicyon" } diff --git a/translations/en.json b/translations/en.json index 632ecc70f..27a852016 100644 --- a/translations/en.json +++ b/translations/en.json @@ -702,5 +702,6 @@ "Art": "Art", "Reply Controls": "Reply Controls", "Searchable by": "Searchable by", - "Yourself": "Yourself" + "Yourself": "Yourself", + "Epicyon Instances": "Epicyon Instances" } diff --git a/translations/es.json b/translations/es.json index 2ace80ab0..47760088d 100644 --- a/translations/es.json +++ b/translations/es.json @@ -702,5 +702,6 @@ "Art": "Arte", "Reply Controls": "Controles de respuesta", "Searchable by": "Buscable por", - "Yourself": "Tú mismo" + "Yourself": "Tú mismo", + "Epicyon Instances": "Instancias de Epicyon" } diff --git a/translations/fa.json b/translations/fa.json index 414917eec..7a1f45623 100644 --- a/translations/fa.json +++ b/translations/fa.json @@ -702,5 +702,6 @@ "Art": "هنر", "Reply Controls": "کنترل های پاسخ", "Searchable by": "قابل جستجو توسط", - "Yourself": "خودت" + "Yourself": "خودت", + "Epicyon Instances": "موارد Epicyon" } diff --git a/translations/fi.json b/translations/fi.json index 89257ea19..860869e05 100644 --- a/translations/fi.json +++ b/translations/fi.json @@ -702,5 +702,6 @@ "Art": "Taide", "Reply Controls": "Vastausohjaimet", "Searchable by": "Haettavissa", - "Yourself": "itseäsi" + "Yourself": "itseäsi", + "Epicyon Instances": "Epicyonin esiintymät" } diff --git a/translations/fr.json b/translations/fr.json index 12f74921c..0df0fb56d 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -702,5 +702,6 @@ "Art": "Art", "Reply Controls": "Contrôles de réponse", "Searchable by": "Recherchable par", - "Yourself": "Toi-même" + "Yourself": "Toi-même", + "Epicyon Instances": "Instances d'Epicyon" } diff --git a/translations/ga.json b/translations/ga.json index fb4d58f0d..ebffe18ec 100644 --- a/translations/ga.json +++ b/translations/ga.json @@ -702,5 +702,6 @@ "Art": "Ealaín", "Reply Controls": "Rialuithe Freagra", "Searchable by": "Inchuardaithe ag", - "Yourself": "Tú féin" + "Yourself": "Tú féin", + "Epicyon Instances": "Cásanna Epicyon" } diff --git a/translations/he.json b/translations/he.json index be554c66e..3bc38fef6 100644 --- a/translations/he.json +++ b/translations/he.json @@ -702,5 +702,6 @@ "Art": "אָמָנוּת", "Reply Controls": "פקדי תגובה", "Searchable by": "ניתן לחיפוש לפי", - "Yourself": "עַצמְךָ" + "Yourself": "עַצמְךָ", + "Epicyon Instances": "מופעי Epicyon" } diff --git a/translations/hi.json b/translations/hi.json index 19cec64dc..cf9afc034 100644 --- a/translations/hi.json +++ b/translations/hi.json @@ -702,5 +702,6 @@ "Art": "कला", "Reply Controls": "उत्तर नियंत्रण", "Searchable by": "द्वारा खोजा जा सकता है", - "Yourself": "अपने आप को" + "Yourself": "अपने आप को", + "Epicyon Instances": "एपिक्योन इंस्टेंसेस" } diff --git a/translations/it.json b/translations/it.json index d6d5a28a9..3c82e29bc 100644 --- a/translations/it.json +++ b/translations/it.json @@ -702,5 +702,6 @@ "Art": "Arte", "Reply Controls": "Controlli di risposta", "Searchable by": "Ricercabile per", - "Yourself": "Te stesso" + "Yourself": "Te stesso", + "Epicyon Instances": "Istanze di Epicyon" } diff --git a/translations/ja.json b/translations/ja.json index 33f6eac96..8e855fd61 100644 --- a/translations/ja.json +++ b/translations/ja.json @@ -702,5 +702,6 @@ "Art": "美術", "Reply Controls": "返信コントロール", "Searchable by": "検索可能", - "Yourself": "あなた自身" + "Yourself": "あなた自身", + "Epicyon Instances": "エピキオンインスタンス" } diff --git a/translations/ko.json b/translations/ko.json index b289a6511..102fe2a14 100644 --- a/translations/ko.json +++ b/translations/ko.json @@ -702,5 +702,6 @@ "Art": "미술", "Reply Controls": "답변 제어", "Searchable by": "검색 가능", - "Yourself": "당신 자신" + "Yourself": "당신 자신", + "Epicyon Instances": "에피시온 인스턴스" } diff --git a/translations/ku.json b/translations/ku.json index d3b0cd63c..533313f1a 100644 --- a/translations/ku.json +++ b/translations/ku.json @@ -702,5 +702,6 @@ "Art": "Fen", "Reply Controls": "Reply Controls", "Searchable by": "Lêgerîn ji hêla", - "Yourself": "Xwe" + "Yourself": "Xwe", + "Epicyon Instances": "Mînakên Epicyon" } diff --git a/translations/nl.json b/translations/nl.json index 087a7b836..26d84c27f 100644 --- a/translations/nl.json +++ b/translations/nl.json @@ -702,5 +702,6 @@ "Art": "Kunst", "Reply Controls": "Antwoordbedieningen", "Searchable by": "Doorzoekbaar op", - "Yourself": "Jezelf" + "Yourself": "Jezelf", + "Epicyon Instances": "Epicyon-instanties" } diff --git a/translations/oc.json b/translations/oc.json index 169530770..cd2c8d67b 100644 --- a/translations/oc.json +++ b/translations/oc.json @@ -698,5 +698,6 @@ "Art": "Art", "Reply Controls": "Reply Controls", "Searchable by": "Searchable by", - "Yourself": "Yourself" + "Yourself": "Yourself", + "Epicyon Instances": "Epicyon Instances" } diff --git a/translations/pl.json b/translations/pl.json index 8f5549106..2d6d73ebf 100644 --- a/translations/pl.json +++ b/translations/pl.json @@ -702,5 +702,6 @@ "Art": "Sztuka", "Reply Controls": "Kontrola odpowiedzi", "Searchable by": "Można wyszukiwać według", - "Yourself": "Się" + "Yourself": "Się", + "Epicyon Instances": "Instancje Epicyon" } diff --git a/translations/pt.json b/translations/pt.json index 37990dc95..ab02aa759 100644 --- a/translations/pt.json +++ b/translations/pt.json @@ -702,5 +702,6 @@ "Art": "Arte", "Reply Controls": "Controles de resposta", "Searchable by": "Pesquisável por", - "Yourself": "Tu próprio" + "Yourself": "Tu próprio", + "Epicyon Instances": "Instâncias Epicyon" } diff --git a/translations/ru.json b/translations/ru.json index dc9316f27..15007f071 100644 --- a/translations/ru.json +++ b/translations/ru.json @@ -702,5 +702,6 @@ "Art": "Искусство", "Reply Controls": "Ответить Элементы управления", "Searchable by": "Поиск по", - "Yourself": "Сам" + "Yourself": "Сам", + "Epicyon Instances": "Эпиционные экземпляры" } diff --git a/translations/sw.json b/translations/sw.json index 390f4971a..917001e6e 100644 --- a/translations/sw.json +++ b/translations/sw.json @@ -702,5 +702,6 @@ "Art": "Sanaa", "Reply Controls": "Vidhibiti vya Kujibu", "Searchable by": "Inaweza kutafutwa na", - "Yourself": "Mwenyewe" + "Yourself": "Mwenyewe", + "Epicyon Instances": "Matukio ya Epicyon" } diff --git a/translations/tr.json b/translations/tr.json index f14cb737d..46f2fd380 100644 --- a/translations/tr.json +++ b/translations/tr.json @@ -702,5 +702,6 @@ "Art": "Sanat", "Reply Controls": "Cevap Kontrolleri", "Searchable by": "Aranabilir", - "Yourself": "Kendin" + "Yourself": "Kendin", + "Epicyon Instances": "Epikyon Örnekleri" } diff --git a/translations/uk.json b/translations/uk.json index dec1f00b3..e910f98bd 100644 --- a/translations/uk.json +++ b/translations/uk.json @@ -702,5 +702,6 @@ "Art": "ст", "Reply Controls": "Елементи керування відповідями", "Searchable by": "Можливість пошуку за", - "Yourself": "себе" + "Yourself": "себе", + "Epicyon Instances": "Примірники Epicyon" } diff --git a/translations/yi.json b/translations/yi.json index 2fac48c61..6f7aeb4ed 100644 --- a/translations/yi.json +++ b/translations/yi.json @@ -702,5 +702,6 @@ "Art": "קונסט", "Reply Controls": "ענטפער קאָנטראָלס", "Searchable by": "זוך דורך", - "Yourself": "זיך" + "Yourself": "זיך", + "Epicyon Instances": "Epicyon ינסטאַנסיז" } diff --git a/translations/zh.json b/translations/zh.json index 752507a7d..365561f83 100644 --- a/translations/zh.json +++ b/translations/zh.json @@ -702,5 +702,6 @@ "Art": "艺术", "Reply Controls": "回复控制", "Searchable by": "可搜索", - "Yourself": "你自己" + "Yourself": "你自己", + "Epicyon Instances": "史诗副本" } diff --git a/webapp_column_left.py b/webapp_column_left.py index 7943ec9c9..6d0c5cd58 100644 --- a/webapp_column_left.py +++ b/webapp_column_left.py @@ -351,6 +351,9 @@ def get_left_column_content(base_dir: str, nickname: str, domain_full: str, html_str += \ '
' + \ translate['About this Instance'] + '
' + html_str += \ + '' + \ + translate['Epicyon Instances'] + '
' html_str += \ '' + \ translate['User Manual'] + '
' diff --git a/webapp_utils.py b/webapp_utils.py index 8d34b8175..e36dbb7fd 100644 --- a/webapp_utils.py +++ b/webapp_utils.py @@ -2430,3 +2430,29 @@ def load_buy_sites(base_dir: str) -> {}: if buy_sites_json: return buy_sites_json return {} + + +def html_known_epicyon_instances(base_dir: str, http_prefix: str, + domain_full: str, + system_language: str, + known_epicyon_instances: []) -> str: + """Show a list of known epicyon instances + """ + html_str = '' + css_filename = base_dir + '/epicyon-profile.css' + if os.path.isfile(base_dir + '/epicyon.css'): + css_filename = base_dir + '/epicyon.css' + + instance_title = get_config_param(base_dir, 'instanceTitle') + html_str = \ + html_header_with_website_markup(css_filename, instance_title, + http_prefix, domain_full, + system_language) + if known_epicyon_instances: + instances_text = '' + for instance in known_epicyon_instances: + instances_text += instance + '