A tool for conquest of ATProto lexicons. https://jsr.io/@hotsocket/lexiconqueror
1#!/usr/bin/env node
2/*
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at https://mozilla.org/MPL/2.0/.
6 */
7
8import * as run from "./run.ts";
9import { default as denoJson } from "../deno.json" with { type: "json" };
10
11export async function main(argv: (string | undefined)[]): Promise<number> {
12 const act = argv[2];
13 const cfg = argv[3];
14 // GRAAAAHHHHHHHHHHHH
15 console.log(" 🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥");
16 console.log(`🔥🔥 ⚔️ LEXICON-QUEROR ⚔️ 🔥🔥`);
17 console.log(" 🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥");
18 console.log(`VERSION ${denoJson.version}`);
19 console.log(`SUBJUGATE YOUR SCHEMAS`);
20 switch (act) {
21 case "download":
22 await run.download(cfg);
23 break;
24 case "convert":
25 await run.convert(cfg);
26 break;
27 case "setup":
28 await run.setup(cfg);
29 break;
30
31 default:
32 // console.log(
33 // `unknown action ${act ? `'${act}'` : "<none>"}, showing help...`,
34 // );
35 // /* falls through */
36 // case "help":
37 console.log(" ___________________________________________________");
38 console.log("|_______________________ HELP ______________________|");
39 console.log("| |");
40 console.log("| CMD: <run lxq> <action> [args] [path/to/lxq.json] |");
41 console.log("| |");
42 console.log("|__________________ ACTIONS LIST __________________|");
43 console.log("| [ action ] [ description ] |");
44 console.log("| download 🛜 Downloads configured inputs |");
45 console.log("| convert 🔀 Converts lexicons to TypeScript |");
46 console.log("| setup 🌅 Gives you an lxq.json to work with |");
47 // console.log("| new ✨ Creates a new lexicon definition in |");
48 // console.log("| your workspace. Has args: |");
49 // console.log("| - group/input name |");
50 // console.log("| - NSID (com.example.something) |");
51 console.log("|___________________________________________________|");
52 break;
53 }
54 return 0;
55}