···11+create table if not exists label (
22+ uri text,
33+ val text,
44+ cts int,
55+ exp int
66+);
77+88+create table if not exists config (
99+ key text,
1010+ val text
1111+);
1212+1313+create unique index if not exists key_idx on config(key);
+39
genlabeldefs.py
···11+#!/usr/bin/env python3
22+33+import json
44+55+collections = [
66+ ('com-whtwnd', 'WhiteWind', 'markdown blog service (com.whtwnd.*)'),
77+ ('events-smokesignal', 'Smoke Signal', 'manage events and RSVPs (events.smokesignal.*)'),
88+ ('fm-teal', 'teal.fm', 'your music, beautifully tracked (fm.teal.*)'),
99+ ('fyi-unravel-frontpage', 'Frontpage', 'a decentralised and federated link aggregator (fyi.unravel.frontpage.*)'),
1010+ ('im-flushing', 'Flushes', 'The Decentralized Toilet Network of Planet Earth & Simulation 12B (im.flushing.*)'),
1111+ ('place-stream', 'Streamplace', 'live video on the AT Protocol (place.stream.*)'),
1212+ ('sh-tangled', 'Tangled', 'tightly-knit social coding (sh.tangled.*)'),
1313+ ('xyz-statusphere', 'Statusphere', 'atproto quick start (xyz.statusphere.*)'),
1414+]
1515+1616+values = []
1717+defs = []
1818+1919+for (identifier, name, description) in collections:
2020+ values.append(identifier)
2121+ defs.append(dict(
2222+ blurs = 'none',
2323+ severity = 'inform',
2424+ adultOnly = False,
2525+ identifier = identifier,
2626+ defaultSetting = 'warn',
2727+ locales = [dict(
2828+ lang = 'en',
2929+ name = name,
3030+ description = description,
3131+ )],
3232+ ))
3333+3434+doc = {
3535+ 'labelValues': values,
3636+ 'labelValueDefinitions': defs,
3737+}
3838+3939+print(json.dumps(doc))