Added fake data and Markov experiments.
This commit is contained in:
21
src/utils/titles.js
Normal file
21
src/utils/titles.js
Normal file
@@ -0,0 +1,21 @@
|
||||
'use strict';
|
||||
|
||||
const argv = require('../argv');
|
||||
const knex = require('../knex');
|
||||
|
||||
async function printTitles() {
|
||||
const titles = await knex('releases')
|
||||
.where((builder) => {
|
||||
if (argv.sites) builder.whereIn('sites.slug', argv.sites);
|
||||
if (argv.networks) builder.orWhereIn('networks.slug', argv.networks);
|
||||
})
|
||||
.join('sites', 'sites.id', 'releases.site_id')
|
||||
.join('networks', 'networks.id', 'sites.network_id')
|
||||
.pluck('title');
|
||||
|
||||
console.log(titles.join('\n'));
|
||||
|
||||
knex.destroy();
|
||||
}
|
||||
|
||||
printTitles();
|
||||
Reference in New Issue
Block a user