Skip to content

Commit 56c0dc5

Browse files
committed
feat(readme): finish generator
1 parent aa0e4bc commit 56c0dc5

File tree

10 files changed

+707
-333
lines changed

10 files changed

+707
-333
lines changed

README.md

Lines changed: 407 additions & 247 deletions
Large diffs are not rendered by default.

code_of_conduct/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import sys
2+
3+
if __name__ == "__main__":
4+
sys.exit(main())

code_of_conduct/__main__.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
from jinja2 import Environment, PackageLoader, select_autoescape
2+
3+
import tomllib
4+
import json
5+
import sys
6+
import os
7+
8+
def main() -> None:
9+
sections = []
10+
env = Environment(
11+
loader=PackageLoader("code_of_conduct"),
12+
autoescape=select_autoescape()
13+
)
14+
15+
for filename in os.scandir(path="./code_of_conduct/sections/"):
16+
with open(filename.path, "r") as f:
17+
sections.append(tomllib.loads(f.read()))
18+
19+
template = env.get_template("README.md.jinja")
20+
21+
with open("README.md", "w") as f:
22+
print(template.render(sections=sections), file=f)
23+
24+
if __name__ == "__main__":
25+
sys.exit(main())

code-of-conduct/sections/1.toml renamed to code_of_conduct/sections/1.toml

Lines changed: 26 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,21 @@ that this platform does not offer such channels.
1212
1313
Content you post, fictional or not must not be sexually explicit,
1414
neither can it contain gore, excessive violence, or animal abuse. Shock
15-
content is also forbidden.
16-
"""
15+
content is also forbidden."""
1716

1817
[[rule.expectations]]
1918
expectation = "Mild"
2019
description = """
21-
First offenses will result in Members being brought into tickets
22-
and warned.
23-
"""
20+
First offenses will result in Members being brought into tickets \
21+
and warned."""
2422

2523
[[rule.expectations]]
2624
expectation = "Medium"
27-
description = """
28-
Warns, tickets, and timeouts ranging from 1hr-12 hours.
29-
"""
25+
description = "Warns, tickets, and timeouts ranging from 1hr-12 hours."
3026

3127
[[rule.expectations]]
3228
expectation = "Severe"
33-
description = """
34-
Bans are to be expected at this stage.
35-
"""
29+
description = "Bans are to be expected at this stage."
3630

3731
[[rule.glossary]]
3832
word = "Content"
@@ -66,8 +60,7 @@ we will promptly investigate any behaviour that will undermine such
6660
safety. Moderation should be immediately alerted upon inappropriate
6761
behaviour in regards to minors. This marks pedophilia apologism as a
6862
threat and will therefore bring heavy repercussions, regardless of age
69-
claims, given sufficient context.
70-
"""
63+
claims, given sufficient context."""
7164

7265
[[rule.glossary]]
7366
word = "Mature"
@@ -76,8 +69,7 @@ meaning = "Anything that can be considered 18+"
7669
[[rule.glossary]]
7770
word = "Pedophilia apologism"
7871
meaning = """
79-
Any action that supports, sympathise or encourage pedophilia.
80-
"""
72+
Any action that supports, sympathise or encourage pedophilia."""
8173

8274
[[rule]]
8375
title = "Mutual Respect"
@@ -111,8 +103,7 @@ are all prohibited.
111103
Do not share media depicting harmful or offensive language and/or content,
112104
this can include or is not limited to; Offensive jokes or comments with the
113105
intention of causing harm or "drama". This may also include language that
114-
promotes exclusion or marginalization.
115-
"""
106+
promotes exclusion or marginalization."""
116107

117108
[[rule.expectations]]
118109
expectation = "Mild"
@@ -134,8 +125,7 @@ disability, ethnicity, familial responsibilities, gender, gender
134125
identity, housing status, national origin, race, refugee or immigration
135126
status, religious affiliation, serious illness, sex, sexual orientation,
136127
socioeconomic class and status, income source, status as a victim of
137-
domestic violence, sexual violence, or stalking, and weight and size.
138-
"""
128+
domestic violence, sexual violence, or stalking, and weight and size."""
139129

140130

141131
[[rule]]
@@ -159,8 +149,7 @@ to, intervene, redirect, advise, or halt the conversation. These terms
159149
are not limited to a specific conversation but the mentioning of said
160150
topic. Our aim is not to suppress free speech but to keep an appropriate
161151
chatroom while promoting open, respectful, and harmonious conversations
162-
among all members.
163-
"""
152+
among all members."""
164153

165154
[[rule.expectation]]
166155
expectation = "Mild"
@@ -173,9 +162,8 @@ description = "Forcing conversations to end"
173162
[[rule.expectation]]
174163
expectation = "Severe"
175164
description = """
176-
Members with repetitive offenses may receive timeouts and be addressed
177-
in tickets within 5m to 2 hours
178-
"""
165+
Members with repetitive offenses may receive timeouts and be addressed \
166+
in tickets within 5m to 2 hours"""
179167

180168

181169
[[rule.glossary]]
@@ -187,8 +175,7 @@ Topics including but not limited to, but are not limited to:
187175
- Religious belief systems and practices
188176
- Ongoing global conflicts and war
189177
- Historical atrocities and practices (such as Nazism, terrorism,
190-
genocide, slavery, etc.)
191-
"""
178+
genocide, slavery, etc.)"""
192179

193180
[[rule]]
194181
title = "Avoidance of Elitism"
@@ -198,30 +185,26 @@ be it their choice of operating system, desktop environment, or other
198185
interests outside the main topics of the server. While friendly rivalry
199186
and banter can be elements of online communities, we don't welcome
200187
deliberate and obnoxious elitism. Respect for each other's preferences
201-
and diversity is a cardinal rule in our server.
202-
"""
188+
and diversity is a cardinal rule in our server."""
203189

204190
[[rule.expectations]]
205191
expectation = "Mild"
206192
description = """
207-
Occasional or every now and then behavior usually doesn't require active
208-
moderation
209-
"""
193+
Occasional or every now and then behavior usually doesn't require active \
194+
moderation"""
210195

211196
[[rule.expectations]]
212197
expectation = "Medium"
213198
description = """
214-
If a Member is repetitively being rude or unhealthy in their behavior,
215-
Moderators may ask them to stop
216-
"""
199+
If a Member is repetitively being rude or unhealthy in their behavior, \
200+
Moderators may ask them to stop"""
217201

218202
[[rule.expectations]]
219203
expectation = "Severe"
220204
description = """
221-
If the behavior becomes a significant problem, Moderators may pull
222-
Members into tickets and respond accordingly based on their willingness
223-
to cooperate
224-
"""
205+
If the behavior becomes a significant problem, Moderators may pull \
206+
Members into tickets and respond accordingly based on their willingness \
207+
to cooperate"""
225208

226209
[[rule]]
227210
title = "Respecting Authority & Rules"
@@ -233,8 +216,7 @@ the situation. Any rule violation should be reported via ticket, leaving
233216
the resolution to an authorized Moderator. While we discourage backseat
234217
moderating, we hope that members will help us maintain a healthy
235218
environment by guiding others if they are unaware of the rules or
236-
suggesting that certain behavior is inappropriate.
237-
"""
219+
suggesting that certain behavior is inappropriate."""
238220

239221
[[rule]]
240222
title = "Piracy & Penetration Testing"
@@ -255,25 +237,21 @@ States of America.
255237
Promotion or support for malicious activities are strictly prohibited,
256238
regardless of intentions. You may discuss cybersecurity as long as
257239
directions are not provided on how to perform or exploit activities
258-
involving cybersecurity.
259-
"""
240+
involving cybersecurity."""
260241

261242
[[rule.glossary]]
262243
word = "illegal redistribution"
263244
meaning = """
264-
Sharing and requesting content that cannot be accessed legally.
265-
"""
245+
Sharing and requesting content that cannot be accessed legally."""
266246

267247
[[rule.glossary]]
268248
word = "malicious activities"
269249
meaning = """
270250
unauthorized access, data breaches, credential stuffing, phishing,
271-
malware development, or any other illegal hacking activities
272-
"""
251+
malware development, or any other illegal hacking activities"""
273252

274253
[[rule.glossary]]
275254
word = "cybersecurity"
276255
meaning = """
277256
Topics including but not limited to: ethical hacking, penetration
278-
testing, and security vulnerabilities.
279-
"""
257+
testing, and security vulnerabilities."""

code-of-conduct/sections/2.toml renamed to code_of_conduct/sections/2.toml

Lines changed: 33 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,18 @@ text, voice, and support channels.
1010
[[rule.expectations]]
1111
expectation = "Mild"
1212
description = """
13-
Members will be kindly asked in the chat they are spreading non-English
14-
messages to keep it to English
15-
"""
13+
Members will be kindly asked in the chat they are spreading non-English \
14+
messages to keep it to English"""
15+
16+
[[rule.expectations]]
1617
expectation = "Medium"
1718
description = """
18-
Repeated offenses may result in Members being pulled into tickets
19-
"""
19+
Repeated offenses may result in Members being pulled into tickets"""
20+
21+
[[rule.expectations]]
2022
expectation = "Severe"
2123
description = """
22-
If a Member is unwilling to comply, Moderators may act as they see fit.
23-
"""
24+
If a Member is unwilling to comply, Moderators may act as they see fit."""
2425

2526
[[rule]]
2627
title = "Text Channels"
@@ -36,20 +37,22 @@ This includes "brainrot" which are words or phrases with no substantial
3637
value as well as animal sounds or incoherent strings of letters.
3738
"""
3839

40+
[[rule.expectations]]
3941
expectation = "Mild"
4042
description = """
41-
Members will be kindly asked in the chat to not post
42-
low-effort/low-quality content or bypass automod
43-
"""
43+
Members will be kindly asked in the chat to not post \
44+
low-effort/low-quality content or bypass automod"""
45+
46+
[[rule.expectations]]
4447
expectation = "Medium"
4548
description = """
46-
Repeated offenses may result in Members being timed out for a period of
47-
time at the moderators discretion
48-
"""
49+
Repeated offenses may result in Members being timed out for a period of \
50+
time at the moderators discretion"""
51+
52+
[[rule.expectations]]
4953
expectation = "Severe"
5054
description = """
51-
If a Member is unwilling to comply, they will be ticketed and warned
52-
"""
55+
If a Member is unwilling to comply, they will be ticketed and warned"""
5356

5457
[[rule]]
5558
title = "Voice Channels"
@@ -85,51 +88,44 @@ the rules.
8588
[[rule.expectations]]
8689
expectation = "Mild"
8790
description = """
88-
Moderators may ask members to adhere to guidelines. Moderators may
89-
temporarily server mute to ensure any issues are resolved.
90-
"""
91+
Moderators may ask members to adhere to guidelines. Moderators may \
92+
temporarily server mute to ensure any issues are resolved."""
9193

9294
[[rule.expectations]]
9395
expectation = "Medium"
9496
description = """
95-
Members may be brought into tickets to talk with Moderators about their
96-
actions.
97-
"""
97+
Members may be brought into tickets to talk with Moderators about their \
98+
actions."""
9899

99100
[[rule.expectations]]
100101
expectation = "Severe"
101102
description = """
102-
Members with severe infractions may be handled at the discretion of
103-
Moderators.
104-
"""
103+
Members with severe infractions may be handled at the discretion of \
104+
Moderators."""
105105

106106
[[rule]]
107107
title = "Bot Usage"
108108
description = """
109-
Bot commands should be used in the bot commands channel. If a Member is
110-
found spamming, misusing, or abusing any Bot related features in the
111-
server, please report this via ticket.
112-
"""
109+
Bot commands should be used in the bot commands channel. If a Member is \
110+
found spamming, misusing, or abusing any Bot related features in the \
111+
server, please report this via ticket."""
113112

114113
[[rule.expectations]]
115114
expectation = "Mild"
116115
description = """
117-
Members may be asked by Moderators to adhere to guidelines.
118-
"""
116+
Members may be asked by Moderators to adhere to guidelines."""
119117

120118
[[rule.expectations]]
121119
expectation = "Medium"
122120
description = """
123-
Members may be brought into tickets to talk with Moderators about their
124-
actions.
125-
"""
121+
Members may be brought into tickets to talk with Moderators about their \
122+
actions."""
126123

127124
[[rule.expectations]]
128125
expectation = "Severe"
129126
description = """
130-
Members with severe infractions may receive mutes ranging from 10
131-
minutes to 3 hours.
132-
"""
127+
Members with severe infractions may receive mutes ranging from 10 \
128+
minutes to 3 hours."""
133129

134130
[[rule]]
135131
title = "On and Off-topic"
@@ -145,8 +141,7 @@ Moderator or send in a ticket as a last resort.
145141
146142
Please do not derail support threads or comment on Moderator actions in
147143
community channels. If you have concerns or questions regarding a
148-
Moderator’s actions, create a ticket to discuss the matter.
149-
"""
144+
Moderator’s actions, create a ticket to discuss the matter."""
150145

151146
[[rule]]
152147
title = "Spam"
File renamed without changes.

0 commit comments

Comments
 (0)