Giter Site home page Giter Site logo

migrate-devhub-blogs's Introduction

Migration of Devhub blogs

This repositories contains a few scripts to migrate the blogs from devgovgigs.near contract to socialDB.

Get all blogs ids

near contract call-function as-read-only devgovgigs.near get_posts_by_label json-args '{"label": "blog"}' network-config mainnet now

Get data from a single id

near contract call-function as-read-only devgovgigs.near get_post json-args '{"post_id": 1993}' network-config mainnet now

Execute final step

  1. Edit migrate_blogs.js with the right username (must be a devhub moderator)
  2. Run node migrate_blogs.js

From the start Step by step

  1. Get all Blog Ids with get_posts_by_label command from above
  2. Put the ids in get_all_blog.sh
  3. Run ./get_all_blogs.sh this will create posts.json
  4. Rename posts.json to all_blog_posts.json
  5. Remove the socialdb-structure.json if you already did this once
  6. Run node convert_all.js to create socialdb-structured.json
  7. Edit migrate_blogs.js to contain your username.
  8. You can also test it with devhub-test-migrate.json or webassemblymusic.json

migrate-devhub-blogs's People

Contributors

petersalomonsen avatar tguntenaar avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.