Try tkgshn/scrapbox-Duplicator: a tool that automatically “transfers pages” which is troublesome when operating separate private and public projects in Scrapbox

Deploy Heroku back to [tkgshn/scrapbox-Duplicator https://github.com/tkgshn/scrapbox-Duplicator image App name must be unique in the world.

image Put the SID you wrote down earlier here. In the future, we would like to be flexible with the transfer source project, but well, experiment first.

Create a test page while waiting for deployment. image

[/bluemountain-theme/extended script to transfer pages](https://scrapbox.io/bluemountain-theme/extended script to transfer pages). Oh, this is the type that is loaded on the BODY. I wonder what the upper length limit is.

$ heroku run -a scrapbox-duplicator-nishio npm run transfer :

Running npm run transfer on ⬢ scrapbox-duplicator-nishio... up, run.1786 (Free)

> @ transfer /app
> node index.js

(node:21) UnhandledPromiseRejectionWarning: Error: Request failed with status code 403
  ...

Hmmm, I’m not sure, so I’ll run it locally first. $ git clone https://github.com/tkgshn/scrapbox-Duplicator.git $ npm install $ node --trace-warnings index.js

You’ve got the csrfToken in the bot account properly, but you’re failing on the export request… Oh, I get it, only the project owner can export Scrapbox.

  • image Hmmm, maybe I’ll change it to get the last 100 posts with the Page List API.

No. Imports are only owners, too.

  • image

I could do it if I used my SID. imageimage

@blu3mo: I think if you give the subaccount admin privileges you can export etc!

I see! image

It’s done! image

memo waitFor is deprecated and will be removed in a future release. See https://github.com/puppeteer/puppeteer/issues/6214 for details and how to migrate your code.


This page is auto-translated from /nishio/✅scrapbox-Duplicatorを試す using DeepL. If you looks something interesting but the auto-translated English is not good enough to understand it, feel free to let me know at @nishio_en. I’m very happy to spread my thought to non-Japanese readers.