From: Ruben Beltran del Rio Date: Mon, 25 Mar 2024 21:09:22 +0000 (+0000) Subject: Use new blog version X-Git-Url: https://git.r.bdr.sh/rbdr/linkding-linkblog-updater/commitdiff_plain/70dc59db0627b43811ee8e6d00a5d67542662209?ds=sidebyside Use new blog version --- diff --git a/index.js b/index.js index 518cc79..279594a 100644 --- a/index.js +++ b/index.js @@ -64,10 +64,8 @@ const internals = { async function run() { const pinboard = new Pinboard(internals.apiToken); - const getPins = promisify(pinboard.all); - const addPin = promisify(pinboard.add); - const pins = await getPins({ tag: 'linkblog' }); + const pins = await pinboard.all({ tag: 'linkblog' }); if (pins.length === 0) { console.error('No links to post'); @@ -81,13 +79,13 @@ async function run() { const gemfile = resolve(join(__dirname, `${filename}.gmi`)); await writeFile(gemfile, gemtext); - await internals.exec(`blog --add ${gemfile}`); - await internals.exec(`blog --publish ${internals.blogUrl}`); - await internals.exec(`blog --publish-archive ${internals.archiveUrl}`); + await internals.exec(`blog add ${gemfile}`); + await internals.exec(`blog publish ${internals.blogUrl}`); + await internals.exec(`blog publish-archive ${internals.archiveUrl}`); await rm(gemfile); for (const pin of pins) { - await addPin({ + await pinboard.add({ url: pin.href, description: pin.description, extended: pin.extended,