Skip to content

Instantly share code, notes, and snippets.

View sidedwards's full-sized avatar
🇺🇸
Idaho, USA

Sid Edwards sidedwards

🇺🇸
Idaho, USA
View GitHub Profile
@sidedwards
sidedwards / translate.ts
Created October 26, 2021 23:47
Pseudo-translate your JSON files!
import { parse } from "https://deno.land/std@0.113.0/flags/mod.ts"
import { v4 } from "https://deno.land/std@0.113.0/uuid/mod.ts";
const ARGS = parse(Deno.args)
const PATH = ARGS.path ?? null
const NODE = ARGS.node ?? 'content'
const FORMAT = ARGS.format ?? 'json'
const TYPE = ARGS.type ?? 'pseudo'
const DIRECTORY = PATH ?? Deno.cwd()+'/'
const CHARS = {