#!/usr/bin/env python3 import json collections = { 'Popsky': ('app-popsky', 'pop culture hub'), 'PinkSea': ('com-shinolabs-pinksea', 'oekaki on atproto'), 'WhiteWind': ('com-whtwnd', 'markdown blog service'), 'Smoke Signal': ('events-smokesignal', 'manage events and RSVPs'), 'teal.fm': ('fm-teal', 'your music, beautifully tracked'), 'Frontpage': ('fyi-unravel-frontpage', 'a decentralised and federated link aggregator'), 'Flushes': ('im-flushing', 'The Decentralized Toilet Network of Planet Earth & Simulation 12B'), 'Streamplace': ('place-stream', 'live video on the AT Protocol'), 'Tangled': ('sh-tangled', 'tightly-knit social coding'), 'Spark': ('so-sprk', 'short-form video/photo app'), 'Statusphere': ('xyz-statusphere', 'atproto quick start'), 'Roomy': ('chat-roomy', 'group chat on atproto'), 'ATFile': ('blue-zio-atfile', 'store and retrieve files'), 'Blue Badge': ('blue-badge', 'badges for atproto handles'), '2048': ('blue-twentyfortyeight', '2048 on atproto'), 'recipe.exchange': ('exchange-recipe', 'discover and share your favorite recipes'), 'Linkat': ('blue-linkat', 'link collections'), 'Rocksky': ('app-rocksky', 'decentralized music tracking and discovery platform'), 'Leaflet': ('pub-leaflet', 'social publishing / blogging'), 'Wamellow': ('com-wamellow', 'bluesky to discord notifications'), 'Grain': ('social-grain', 'a photo sharing platform'), # 'name': ('nsid-with-dashes', 'description'), } values = [] defs = [] key_func = lambda obj: str.casefold(obj[0]) for name, (identifier, description) in sorted(collections.items(), key=key_func): nsid = identifier.replace('-', '.') if identifier == 'blue-twentyfortyeight': # https://atproto.com/specs/label#recommended-string-syntax nsid = 'blue.2048' values.append(identifier) defs.append(dict( blurs = 'none', severity = 'inform', adultOnly = False, identifier = identifier, defaultSetting = 'warn', locales = [dict( lang = 'en', name = name, description = f'{description} ({nsid}.*)', )], )) doc = { 'labelValues': values, 'labelValueDefinitions': defs, } print(json.dumps(doc))