mirror of
https://github.com/qitoqito/psyduck.git
synced 2026-01-11 12:10:42 +08:00
Create create.js
This commit is contained in:
parent
22a902c889
commit
a3f72a8c2c
26
create.js
Normal file
26
create.js
Normal file
@ -0,0 +1,26 @@
|
||||
import {decryptFile} from "./fileCrypto.js";
|
||||
import fs from 'fs'
|
||||
import path from 'path';
|
||||
import {
|
||||
fileURLToPath
|
||||
} from 'url';
|
||||
|
||||
!(async () => {
|
||||
let dirpath = fileURLToPath(
|
||||
import.meta.url);
|
||||
let abspath = path.dirname(dirpath)
|
||||
let dir = fs.readdirSync(`${abspath}/parse`);
|
||||
dir.forEach(async function(item, index) {
|
||||
let stat = fs.lstatSync(`${abspath}/parse/` + item)
|
||||
if (stat.isDirectory() === true) {
|
||||
for (let script of fs.readdirSync(`${abspath}/parse/${item}`)) {
|
||||
if (script.match(/\w+\_\w+\_\w/)) {
|
||||
await decryptFile(`${abspath}/parse/${item}/${script}`, `${abspath}/parse/${item}/${script}`)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
})().catch((e) => {
|
||||
console.log(e)
|
||||
}).finally(() => {
|
||||
});
|
||||
Loading…
Reference in New Issue
Block a user