25 lines
705 B
JavaScript
25 lines
705 B
JavaScript
|
|
const { mastodon, webmention, youtube } = require('jam-my-stack');
|
|
const fsp = require('fs').promises;
|
|
|
|
const rootdir = `${__dirname}/../`;
|
|
|
|
(async function() {
|
|
// get webmentions (turned off, 08/05/2023)
|
|
/*
|
|
console.log("-- Fetching webmentions...")
|
|
const mentions = await webmention.getWebmentions("brainbaking.com", wmconfig)
|
|
const json = JSON.stringify(mentions, null, 4)
|
|
await fsp.writeFile(`${rootdir}/data/webmentions.json`, json, 'utf-8')
|
|
*/
|
|
|
|
console.log("--> Generating YouTube thumbnails...")
|
|
await youtube.thumbify({
|
|
postDir: `${rootdir}/content/post`,
|
|
downloadDir: `${rootdir}/static/img/yt`,
|
|
overlayImg: `${rootdir}/play.png`
|
|
})
|
|
|
|
console.log("-- precommit: all done!")
|
|
})()
|