this repo has no description
1import { setLabelerLabelDefinitions, type LoginCredentials } from '@skyware/labeler/scripts';
2import { type ComAtprotoLabelDefs } from '@atproto/api';
3import 'dotenv/config';
4import { BSKY_IDENTIFIER, BSKY_PASSWORD } from './config.js';
5
6const LABELS = [
7 {
8 identifier: 'ravenclaw',
9 enName: 'Ravenclaw 🦅',
10 enDescription: 'Wise, creative, and curious.',
11 ptName: 'Corvinal 🦅',
12 ptDescription: 'Sábio, criativo e curioso.',
13 },
14 {
15 identifier: 'slytherin',
16 enName: 'Slytherin 🐍',
17 enDescription: 'Ambitious, cunning, and resourceful.',
18 ptName: 'Sonserina 🐍',
19 ptDescription: 'Ambicioso, astuto e engenhoso.',
20 },
21 {
22 identifier: 'gryffindor',
23 enName: 'Gryffindor 🦁',
24 enDescription: 'Brave, bold, and daring.',
25 ptName: 'Grifinória 🦁',
26 ptDescription: 'Corajoso, ousado e destemido.',
27 },
28 {
29 identifier: 'hufflepuff',
30 enName: 'Hufflepuff 🦡',
31 enDescription: 'Loyal, hardworking, and fair.',
32 ptName: 'Lufa-Lufa 🦡',
33 ptDescription: 'Leal, trabalhador e justo.',
34 },
35];
36
37const loginCredentials: LoginCredentials = {
38 identifier: BSKY_IDENTIFIER,
39 password: BSKY_PASSWORD,
40};
41
42const labelDefinitions: ComAtprotoLabelDefs.LabelValueDefinition[] = [];
43
44for (const label of LABELS) {
45 const labelValueDefinition: ComAtprotoLabelDefs.LabelValueDefinition = {
46 identifier: label.identifier,
47 severity: 'inform',
48 blurs: 'none',
49 defaultSetting: 'warn',
50 adultOnly: false,
51 locales: [
52 {
53 lang: 'en',
54 name: label.enName,
55 description: label.enDescription,
56 },
57 {
58 lang: 'pt-BR',
59 name: label.ptName,
60 description: label.ptDescription,
61 },
62 ],
63 };
64
65 labelDefinitions.push(labelValueDefinition);
66}
67
68await setLabelerLabelDefinitions(loginCredentials, labelDefinitions);