Skip to content

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

License

Notifications You must be signed in to change notification settings

glosa/glosa-disqus-import

Repository files navigation

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.

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published