This commit is contained in:
2023-05-21 13:58:13 +08:00
parent 96b62e94cc
commit 1dd7c21bb6
7 changed files with 23 additions and 8 deletions

View File

@@ -81,16 +81,17 @@ async function run() {
}
}
function optimize() {
const db = new EhDb(settings.base);
const db = new EhDb(settings.db_path || settings.base);
db.optimize();
db.close();
}
async function update_tag_translation() {
const db = new EhDb(settings.base);
const db = new EhDb(settings.db_path || settings.base);
const f = await load_eht_file(
args._.length > 1 ? args._[1].toString() : undefined,
);
update_database_tag(db, f);
db.close();
}
async function main() {
await sure_dir(settings.base);