2022-03-24 13:59:49 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -eo pipefail
|
|
|
|
INF=${1:-test.numbers}
|
|
|
|
OUTF=${2:-reframed.numbers}
|
|
|
|
make reframe.node.js
|
2022-09-20 05:31:53 +00:00
|
|
|
#node reframe.node.js "$INF" "$OUTF"
|
|
|
|
cp "$INF" "$OUTF"
|
2022-03-24 13:59:49 +00:00
|
|
|
chmod a+w "$OUTF"
|
|
|
|
sleep 0.1
|
|
|
|
# open "$OUTF"
|
|
|
|
unzip -l "$OUTF"
|
2022-05-17 01:26:22 +00:00
|
|
|
base64 "$OUTF" | tr -d '\n' > xlsx.zahl.js
|
|
|
|
sed -i.bak 's/^/var XLSX_ZAHL_PAYLOAD = "/g;s/$/";\n/g' xlsx.zahl.js
|
2022-03-24 13:59:49 +00:00
|
|
|
cp xlsx.zahl.js xlsx.zahl.mjs
|
|
|
|
cat >> xlsx.zahl.js <<EOF
|
|
|
|
if(typeof module !== "undefined") module.exports = XLSX_ZAHL_PAYLOAD;
|
|
|
|
else if(typeof global !== "undefined") global.XLSX_ZAHL_PAYLOAD = XLSX_ZAHL_PAYLOAD;
|
|
|
|
else if(typeof window !== "undefined") window.XLSX_ZAHL_PAYLOAD = XLSX_ZAHL_PAYLOAD;
|
|
|
|
EOF
|
|
|
|
cat >> xlsx.zahl.mjs <<EOF
|
|
|
|
export default XLSX_ZAHL_PAYLOAD;
|
|
|
|
EOF
|