Skip to content

export data from discourse ruby bbs to online quip

Notifications You must be signed in to change notification settings

wuyuyue/discourse2quip

Repository files navigation

run

npm i

cp  env.js.sample env.js & vi env.js // init setting which is required

      module.exports = {
        discourse: {
          host: 'https://meta.discoursecn.org',
          api_key: '*',
          api_username: '*'
        },
        data: {
          root: './data' // local storage path for discourse-export output and quip-import input
        },
        quip: {
          host: 'https://platform.quip.com',
          accessToken: '*',
          root: 'bbs',
          parent_id: '*'

        }
      }


npm run export //export from discourse

npm run import // import to quip

discourse webapi export detail

  • document: https://docs.discourse.org/

  • need api-key in your bbs website under path /admin/api/keys;

    • DiscourseApi::TooManyRequests: {“errors”=>[“You’ve performed this action too many times. Please wait 47秒 before trying again.”], “error_type”=>“rate_limit”, “extras”=>{“wait_seconds”=>47}}

    there is still rate_limit for request(weired setting for api-key, failed to find place to close)

  • http get categories list:/categories.json

  • thread list under a category: /c/[cid].json

    • need to fetch each pages(pageSize is 30), more_topics_url which shows there are still pages
  • thread detail: /t/[id].json

    • need to save all imgs under the thread incase the url would be invalid if bbs would get offline

quip webapi import detail

About

export data from discourse ruby bbs to online quip

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published