this repo has no description
1#!/usr/bin/env python3
2
3import json
4
5collections = {
6 'Popsky': ('app-popsky', 'pop culture hub'),
7 'PinkSea': ('com-shinolabs-pinksea', 'oekaki on atproto'),
8 'WhiteWind': ('com-whtwnd', 'markdown blog service'),
9 'Smoke Signal': ('events-smokesignal', 'manage events and RSVPs'),
10 'teal.fm': ('fm-teal', 'your music, beautifully tracked'),
11 'Frontpage': ('fyi-unravel-frontpage', 'a decentralised and federated link aggregator'),
12 'Flushes': ('im-flushing', 'The Decentralized Toilet Network of Planet Earth & Simulation 12B'),
13 'Streamplace': ('place-stream', 'live video on the AT Protocol'),
14 'Tangled': ('sh-tangled', 'tightly-knit social coding'),
15 'Spark': ('so-sprk', 'short-form video/photo app'),
16 'Statusphere': ('xyz-statusphere', 'atproto quick start'),
17 'Roomy': ('chat-roomy', 'group chat on atproto'),
18 'ATFile': ('blue-zio-atfile', 'store and retrieve files'),
19 'Blue Badge': ('blue-badge', 'badges for atproto handles'),
20 '2048': ('blue-twentyfortyeight', '2048 on atproto'),
21 'recipe.exchange': ('exchange-recipe', 'discover and share your favorite recipes'),
22 'Linkat': ('blue-linkat', 'link collections'),
23 'Rocksky': ('app-rocksky', 'decentralized music tracking and discovery platform'),
24 'Leaflet': ('pub-leaflet', 'social publishing / blogging'),
25 'Wamellow': ('com-wamellow', 'bluesky to discord notifications'),
26 'Grain': ('social-grain', 'a photo sharing platform'),
27 # 'name': ('nsid-with-dashes', 'description'),
28}
29
30values = []
31defs = []
32
33key_func = lambda obj: str.casefold(obj[0])
34for name, (identifier, description) in sorted(collections.items(), key=key_func):
35 nsid = identifier.replace('-', '.')
36 if identifier == 'blue-twentyfortyeight':
37 # https://atproto.com/specs/label#recommended-string-syntax
38 nsid = 'blue.2048'
39 values.append(identifier)
40 defs.append(dict(
41 blurs = 'none',
42 severity = 'inform',
43 adultOnly = False,
44 identifier = identifier,
45 defaultSetting = 'warn',
46 locales = [dict(
47 lang = 'en',
48 name = name,
49 description = f'{description} ({nsid}.*)',
50 )],
51 ))
52
53doc = {
54 'labelValues': values,
55 'labelValueDefinitions': defs,
56}
57
58print(json.dumps(doc))