32 lines
678 B
JavaScript
32 lines
678 B
JavaScript
'use strict';
|
|
|
|
const yargs = require('yargs');
|
|
const { hideBin } = require('yargs/helpers');
|
|
|
|
const knex = require('../knex');
|
|
const { setBiometrics } = require('../biometrics');
|
|
|
|
const argv = yargs(hideBin(process.argv))
|
|
.option('actor-ids', {
|
|
alias: 'actors',
|
|
type: 'array',
|
|
describe: 'List of actor IDs to derive biometrics for',
|
|
})
|
|
.option('update', {
|
|
alias: 'force',
|
|
type: 'boolean',
|
|
describe: 'Re-compute biometrics when already present',
|
|
})
|
|
.option('photos', {
|
|
type: 'boolean',
|
|
describe: 'Include secondary actor photos',
|
|
})
|
|
.argv;
|
|
|
|
async function init() {
|
|
await setBiometrics(argv.actorIds, argv.update, argv.photos);
|
|
knex.destroy();
|
|
}
|
|
|
|
init();
|