Install Deno, see https://deno.land/manual/getting_started/installation
Run ./sfz2sf.sh
with the path of the SingleFileZ page as first parameter
Install Deno, see https://deno.land/manual/getting_started/installation
Run ./sfz2sf.sh
with the path of the SingleFileZ page as first parameter
import { extract } from "https://raw.githubusercontent.com/gildas-lormeau/single-filez-core/main/processors/compression/compression-extract.js"; | |
import * as zip from "https://raw.githubusercontent.com/gildas-lormeau/zip.js/master/index.js"; | |
globalThis.zip = zip; | |
const { docContent } = await extract(new Blob([await Deno.readFile(Deno.args[0])]), { noBlobURL: true }); | |
if (Deno.args[1]) { | |
await Deno.writeTextFile(Deno.args[1], docContent); | |
} else { | |
console.log(docContent); | |
} |
#!/bin/sh | |
if [ $# -eq 0 ]; then | |
echo | |
echo " Usage: $0 <INPUT FILE> [OUTPUT FILE]" | |
echo | |
echo " Transforms a page saved with SingleFileZ into a SingleFile page." | |
echo | |
echo " Arguments:" | |
echo | |
echo " INPUT FILE: path to a file containing a page saved with SingleFileZ" | |
echo " OUTPUT FILE: path of the output file" | |
echo | |
exit 1 | |
else | |
deno run --allow-read --allow-write ./sfz2sf.js "$1" "$2" | |
fi |
Thank you very much @nitincodery!