filesafe/scripts
2020-12-27 19:45:27 +07:00
..
bump-versions.js Added scripts/rebuild-hashes.js 2020-12-27 18:16:01 +07:00
cf-purge.js Added scripts/rebuild-hashes.js 2020-12-27 18:16:01 +07:00
clean-up.js removed utils.parallelLimit 2020-12-27 19:44:10 +07:00
delete-expired.js cleaned up some scripts 2020-12-27 18:54:05 +07:00
README.md updated README.md's 2020-12-27 19:45:27 +07:00
rebuild-hashes.js removed utils.parallelLimit 2020-12-27 19:44:10 +07:00
thumbs.js removed utils.parallelLimit 2020-12-27 19:44:10 +07:00

README

cf-purge.js

$ yarn cf-purge
$ node ./scripts/cf-purge.js
Purge Cloudflare's cache.

Usage:
node scripts/cf-purge.js ...filename

filename:
Upload names separated by space (will automatically include their thumbs if available).

clean-up.js

$ yarn clean-up -h
$ node ./scripts/clean-up.js -h
Clean up files that are not in the database.

Usage:
node scripts/clean-up.js [mode=0|1|2]

mode:
0 = Only list names of files that are not in the database.
1 = Clean up the files.

delete-expired.js

$ yarn delete-expired -h
$ node ./scripts/delete-expired.js -h
Bulk delete expired files.

Usage:
node scripts/delete-expired.js [mode=0|1|2]

mode:
0 = Only list names of the expired files.
1 = Delete expired files (output file names).
2 = Delete expired files (no output).

rebuild-hashes.js

$ yarn rebuild-hashes -h
$ node ./scripts/rebuild-hashes.js -h
Rebuild file hashes.

Usage:
node scripts/rebuild-hashes.js <mode=0|1|2>

mode:
0 = Dry run (recalculate hashes, print them, but do NOT store to DB).
1 = Recalculate hashes and store to DB.
2 = Verbose (recalculate hashes, print them, and store to DB).

thumbs.js

[...]

bump-versions.js

[...]