youtube thumbnail generation, thanks Ruben

This commit is contained in:
Wouter Groeneveld 2021-06-15 12:25:18 +02:00
parent f7dc377b53
commit 473e17b037
4 changed files with 11 additions and 7 deletions

View File

@ -1,6 +1,6 @@
{
"name": "jam-my-stack",
"version": "1.0.18",
"version": "1.0.19",
"repository": {
"url": "https://github.com/wgroeneveld/jam-my-stack",
"type": "git"

View File

@ -2,6 +2,7 @@ const { parseMastoFeed } = require('./mastodon/feed-parser')
const { widgetify } = require('./goodreads/widgetify.js')
const { buildIndex } = require('./lunr/index-builder.js')
const { howlong } = require('./howlongtobeat/howlong.js')
const { thumbify } = require('./youtube/thumbify.js')
const { getWebmentions } = require('./webmention/get.js')
const { sendWebmentions } = require('./webmention/send.js')
@ -19,6 +20,9 @@ module.exports = {
howlongtobeat: {
howlong: howlong
},
youtube: {
thumbify: thumbify
},
webmention: {
getWebmentions: getWebmentions,
send: sendWebmentions

View File

@ -87,5 +87,5 @@ async function run(options) {
}
module.exports = {
download: run
thumbify: run
}

View File

@ -1,4 +1,4 @@
const { download } = require('../../src/youtube/thumbify.js')
const { thumbify } = require('../../src/youtube/thumbify.js')
const fs = require('fs');
const fsp = require('fs').promises;
const { rmdir } = require('./../utils')
@ -27,7 +27,7 @@ it doesn't contain a link, sorry...
`
await fsp.writeFile(`${dumpdir}/post.md`, md, 'utf-8')
await download({
await thumbify({
postDir: dumpdir,
downloadDir: dumpdir,
overlayImg: `${__dirname}/play.png`
@ -53,7 +53,7 @@ cool vid eh?
`
await fsp.writeFile(`${dumpdir}/post.md`, md, 'utf-8')
await download({
await thumbify({
postDir: dumpdir,
downloadDir: dumpdir,
overlayImg: `${__dirname}/play.png`
@ -79,7 +79,7 @@ cool vid eh?
`
await fsp.writeFile(`${dumpdir}/post.md`, md, 'utf-8')
await download({
await thumbify({
postDir: dumpdir,
downloadDir: dumpdir,
overlayImg: `${__dirname}/play.png`
@ -101,7 +101,7 @@ cool vid eh?
`
await fsp.writeFile(`${dumpdir}/post.md`, md, 'utf-8')
await download({
await thumbify({
postDir: dumpdir,
downloadDir: dumpdir,
overlayImg: `${__dirname}/play.png`