-
-
Save scoiatael/5c28288df5cb4471812bdfde765f7538 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from "fs"; | |
const owner = process.argv[2]; | |
if (!owner) { | |
console.error("usage: node parse.js <OWNER> <FILES...>"); | |
process.exit(127); | |
} | |
import(`./dist-${owner}/index.js`).then(({ default: Psd }) => { | |
for (const input of process.argv.slice(3)) { | |
console.log(input) | |
const arrayBuffer = fs.readFileSync(input); | |
Psd.parse(arrayBuffer.buffer); | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment