Added biometrics for avatars.
This commit is contained in:
31
src/tools/biometrics.js
Normal file
31
src/tools/biometrics.js
Normal file
@@ -0,0 +1,31 @@
|
||||
'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();
|
||||
Reference in New Issue
Block a user