This commit is contained in:
2026-02-11 23:02:11 +08:00
parent f40eb40d6b
commit 6a08be3f50
10 changed files with 108 additions and 82 deletions

View File

@@ -1,8 +1,7 @@
#!/usr/bin/env runts -- --allow-import
import {args, exit} from "https://script.hatter.ink/@41/deno-commons-mod.ts";
import {args, exit, stdinToArrayBuffer,} from "https://script.hatter.ink/@41/deno-commons-mod.ts";
import {parseArgs} from "jsr:@std/cli/parse-args";
import {toArrayBuffer} from "https://deno.land/std@0.203.0/streams/mod.ts";
const flags = parseArgs(args(), {
boolean: ["help"],
@@ -22,11 +21,11 @@ let input;
if (flags.value) {
input = flags.value;
} else {
input = new TextDecoder().decode(await toArrayBuffer(Deno.stdin.readable));
input = new TextDecoder().decode(await stdinToArrayBuffer());
}
const encoded = decodeURIComponent(input);
console.log(encoded);
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20260211T223654+08:00.MEQCIFtTTbxi8OppwMqWir2q
// 0UbxQBHhtTORJyhDnU1vUfOTAiA31LMua+CE7wqry2JYMVikX0iE7e4c/gbuLIFj/KszEw==
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20260211T225504+08:00.MEYCIQDKLbuD0sgzk3bG7F20
// VvDZHp3Eb2Jtf5u7V6vZ3+TtRQIhAIAOTgX9h7pLbT3fTNmkY5tyAQToY2zDaJ+qzRW7OTmh