full-list.js
This commit is contained in:
parent
785bdd1ff3
commit
167ae0b77a
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
list/_full_list.txt
|
18
scripts/make-full-list.js
Normal file
18
scripts/make-full-list.js
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
const { readdir, writeFile, readFile } = require('fs/promises');
|
||||||
|
|
||||||
|
async function main() {
|
||||||
|
let res = "";
|
||||||
|
let list = await readdir('.');
|
||||||
|
list = list.sort((x, y) => x.toLowerCase() < y.toLowerCase() ? -1 : 1);
|
||||||
|
for (let f of list) {
|
||||||
|
let c = await readFile(f, 'utf8');
|
||||||
|
let l = c.split('\n')[0];
|
||||||
|
res += l;
|
||||||
|
if (!l.endsWith('\n')) { res += '\n'; }
|
||||||
|
}
|
||||||
|
await writeFile('_full_list.txt', res);
|
||||||
|
}
|
||||||
|
|
||||||
|
main();
|
||||||
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user