save file experimentation
This commit is contained in:
parent
87ee2ca2fa
commit
fdbeeb8677
1
save-patcher/.gitignore
vendored
Normal file
1
save-patcher/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
node_modules
|
27069
save-patcher/file1.json
Normal file
27069
save-patcher/file1.json
Normal file
File diff suppressed because it is too large
Load Diff
20
save-patcher/package-lock.json
generated
Normal file
20
save-patcher/package-lock.json
generated
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"name": "save-patcher",
|
||||||
|
"lockfileVersion": 3,
|
||||||
|
"requires": true,
|
||||||
|
"packages": {
|
||||||
|
"": {
|
||||||
|
"dependencies": {
|
||||||
|
"lz-string": "^1.5.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/lz-string": {
|
||||||
|
"version": "1.5.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.5.0.tgz",
|
||||||
|
"integrity": "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==",
|
||||||
|
"bin": {
|
||||||
|
"lz-string": "bin/bin.js"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
5
save-patcher/package.json
Normal file
5
save-patcher/package.json
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"dependencies": {
|
||||||
|
"lz-string": "^1.5.0"
|
||||||
|
}
|
||||||
|
}
|
5
save-patcher/save-to-json.js
Normal file
5
save-patcher/save-to-json.js
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
const lzs = require('lz-string');
|
||||||
|
const fs = require('fs');
|
||||||
|
|
||||||
|
const decoded = JSON.parse(lzs.decompressFromBase64(fs.readFileSync(process.argv[2], "utf-8")));
|
||||||
|
fs.writeFileSync(process.argv[3], JSON.stringify(decoded, null, 2));
|
Loading…
Reference in New Issue
Block a user