aboutsummaryrefslogtreecommitdiff
path: root/multiple-tags.js
blob: 1e46899b4eed8858c8787fd44fe66f38c4a8dfa6 (plain)
1
2
3
4
5
6
7
8
9
10
11
const fzf = require("./fzf")
const info = require("./info")

const tags = process.argv.slice(2)

info.doujins()
	.then(doujins => Object.values(doujins))
	.then(doujins => doujins.filter(doujin =>
		tags.every(tag => doujin.tag && doujin.tag.includes(tag))))
	.then(doujins => doujins.map(doujin => doujin.title))
	.then(doujins => fzf.doujin(doujins))