Coverage for an_website / services / services.py: 100.000%
13 statements
« prev ^ index » next coverage.py v7.13.4, created at 2026-03-31 10:27 +0000
« prev ^ index » next coverage.py v7.13.4, created at 2026-03-31 10:27 +0000
1# This program is free software: you can redistribute it and/or modify
2# it under the terms of the GNU Affero General Public License as
3# published by the Free Software Foundation, either version 3 of the
4# License, or (at your option) any later version.
5#
6# This program is distributed in the hope that it will be useful,
7# but WITHOUT ANY WARRANTY; without even the implied warranty of
8# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9# GNU Affero General Public License for more details.
10#
11# You should have received a copy of the GNU Affero General Public License
12# along with this program. If not, see <https://www.gnu.org/licenses/>.
14"""A page with a list of services that are cool and hosted by us."""
17import dataclasses
19from ..utils.request_handler import HTMLRequestHandler
20from ..utils.utils import ModuleInfo
23def get_module_info() -> ModuleInfo:
24 """Create and return the ModuleInfo for this module."""
25 return ModuleInfo(
26 handlers=(("/services", ServicesHandler),),
27 name="Service-Liste",
28 description="Liste von coolen Services des Asozialen Netzwerks",
29 path="/services",
30 keywords=("Service", "Liste"),
31 aliases=("/services-list",),
32 )
35@dataclasses.dataclass(slots=True)
36class Service:
37 """A class representing a service."""
39 title: str
40 text: str
41 infos: None | dict[str, str]
44SERVICES: tuple[Service, ...] = (
45 # Service(
46 # "Minceraft-Server",
47 # (
48 # "Der Survival-Minceraft-Server des Asozialen Netzwerks funktioniert"
49 # " auch ohne einen Minceraft-Account und hat dafür eine Integration"
50 # " mit ely.by, damit auch Spieler, die ihren Minceraft-Account nicht"
51 # " verraten möchten, einen eigenen Skin nutzen können."
52 # ),
53 # {
54 # "Domain": "minceraft.asozial.org",
55 # "Version": "1.15.2 (unterstützt 1.7-1.20)",
56 # "Karte": "https://minceraft.asozial.org",
57 # },
58 # ),
59 # Service(
60 # "SuperTuxKart-Server",
61 # (
62 # "Der SuperTuxKart-Server des Asozialen Netzwerks ist durchgehend "
63 # "online."
64 # ),
65 # {
66 # "Name": "Das Asoziale Netzwerk",
67 # "SuperTuxKart-Download": "https://supertuxkart.net/Download",
68 # },
69 # ),
70 # Service(
71 # "Syncplay-Server",
72 # (
73 # "Mit dem Syncplay-Server des Asozialen Netzwerks kann man Online "
74 # "zusammen Sachen gucken."
75 # ),
76 # {
77 # "Domain": "syncplay.asozial.org:8999",
78 # "Installations-Guide": "https://syncplay.pl/guide/install",
79 # },
80 # ),
81 # Service(
82 # "Matrix-Heimserver",
83 # (
84 # "Der Matrix-Heimserver des Asozialen Netzwerks ist zuverlässig und"
85 # " nutzt im Gegensatz zu den meisten anderen Servern Dendrite"
86 # " anstatt Synapse. Die Erstellung eines Accounts ist 100% kostenlos"
87 # " und ohne E-Mail-Adresse oder Telefonnummer möglich."
88 # ),
89 # {
90 # "Domain": "asozial.org",
91 # "Matrix-Client": "https://chat.asozial.org",
92 # },
93 # ),
94 Service(
95 "XMPP-Server",
96 "Das Asoziale Netzwerk hat einen XMPP-Server.",
97 {
98 "Domain": "asozial.org",
99 "Software": "ejabberd",
100 },
101 ),
102)
105class ServicesHandler(HTMLRequestHandler):
106 """The request handler for this page."""
108 async def get(self, *, head: bool = False) -> None:
109 """Handle GET requests to the service list page."""
110 if head:
111 return
112 await self.render(
113 "pages/services.html",
114 services=SERVICES,
115 )