#!/usr/bin/env node /* * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ import * as run from "./run.ts"; import { default as denoJson } from "../deno.json" with { type: "json" }; export async function main(argv: (string | undefined)[]): Promise { const act = argv[2]; const cfg = argv[3]; // GRAAAAHHHHHHHHHHHH console.log(" 🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥"); console.log(`🔥🔥 ⚔️ LEXICON-QUEROR ⚔️ 🔥🔥`); console.log(" 🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥"); console.log(`VERSION ${denoJson.version}`); console.log(`SUBJUGATE YOUR SCHEMAS`); switch (act) { case "download": await run.download(cfg); break; case "convert": await run.convert(cfg); break; case "setup": await run.setup(cfg); break; default: // console.log( // `unknown action ${act ? `'${act}'` : ""}, showing help...`, // ); // /* falls through */ // case "help": console.log(" ___________________________________________________"); console.log("|_______________________ HELP ______________________|"); console.log("| |"); console.log("| CMD: [args] [path/to/lxq.json] |"); console.log("| |"); console.log("|__________________ ACTIONS LIST __________________|"); console.log("| [ action ] [ description ] |"); console.log("| download 🛜 Downloads configured inputs |"); console.log("| convert 🔀 Converts lexicons to TypeScript |"); console.log("| setup 🌅 Gives you an lxq.json to work with |"); // console.log("| new ✨ Creates a new lexicon definition in |"); // console.log("| your workspace. Has args: |"); // console.log("| - group/input name |"); // console.log("| - NSID (com.example.something) |"); console.log("|___________________________________________________|"); break; } return 0; }