Giter Site home page Giter Site logo

glosa-disqus-import's Introduction

Glosa Disqus import

Glosa Disqus import logo

Export comments from Disqus (XML format) to a simple JSON.

[
  {
    "id": 2166957614,
    "parent": 29293782,
    "createdAt": 1352672642,
    "author": "Quijote",
    "thread": "https://programadorwebvalencia.com/clojure-que-es-y-para-que-sirve/",
    "message": "<p>Curioso sí que parece...</p>"
  },{
    "id": 2166957615,
    "parent": 51293771,
    ...

Superpowers:

  • Transform dates to unix time.
  • It unifies the children and the comments.
  • Keep the reference to the parents.
  • It removes irrelevant data.

Prerequisites: export the comment XML from Disqus

  1. Enter the Disqus Administrative panel.

step 1

  1. Enter to Community.

step 2

  1. Click in Export.

step 3

You will receive an email with all the compressed comments.

Usage

  1. Make sure you have Java installed.

  2. Download the latest version of import (glosa-disqus-import-{version}-standalone.jar).

https://github.com/glosa/glosa-disqus-import/releases

  1. Decompress Disqus export. You will get an XML.

  2. Runs.

java -jar glosa-disqus-import-x.x.x-standlone.jar [file]

Example

java -jar glosa-disqus-import-x.x.x-standlone.jar myblog-2020-03-04T18%3A36%3A47.800594-all.xml

In the same directory you will create the JSON.

Create your own JAR

  1. Make sure you have openjdk or oracle-jdk installed, clojure and leiningen.

MacOS

brew install openjdk clojure leiningen

Debian/Ubuntu

sudo apt install default-jdk clojure leiningen
  1. Clone the repository and enter the generated folder.
git clone https://github.com/glosa/glosa-disqus-import.git
cd glosa-disqus-import
  1. Run the following command to build a jar file.

lein uberjar

After this two files should be created in target/. We will use the standalone version: glosa-disqus-import-{version}-standalone.jar.

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.