# disqus-xml2json

> Converts the very large Disqus XML backup file into a more manageable and usable JSON file.

Latest version **1.0.1** (published 2020-03-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install disqus-xml2json
pnpm add disqus-xml2json
yarn add disqus-xml2json
bun add disqus-xml2json
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2020-03-03 |
| First published | 2020-03-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 9.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Matheus Pratta |
| Maintainers | matpratta |
| Keywords | disqus, xml, json, convert, import, backup |

## Links

- npm: https://www.npmjs.com/package/disqus-xml2json
- Repository: https://github.com/MatheusMK3/node-disqus-xml2json
- Homepage: https://github.com/MatheusMK3/node-disqus-xml2json#readme
- Issues: https://github.com/MatheusMK3/node-disqus-xml2json/issues
- npm.io page: https://npm.io/package/disqus-xml2json

## Dependencies (3)

- [moment](https://npm.io/package/moment.md) ^2.24.0
- [sqlstring](https://npm.io/package/sqlstring.md) ^2.3.1
- [node-expat](https://npm.io/package/node-expat.md) ^2.3.18

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.0.1 (latest) — 2020-03-03

## README

# Disqus XML to JSON

This script was created with the intention of converting the Disqus backup XML file into a JSON that can be read successfully inside Node.js (since any other libraries seemed to crash with very large files ~350MB).

## Installation

You can install it locally by running `npm i disqus-xml2json`, this allows it to run both standalone and as part of your own project.

## Usage

To use it in standalone mode, after installing, simply run `node ./node_modules/disqus-xml2json input-file.xml output-file.json`.

If no filenames are provided, `disqus.xml` and `disqus.json` are used.

To use in your project, simply add `const convert = require('disqus-xml2json')` to your file and then, from your code, run `convert(inputFile, outputFile, callback)`

If you don't want to save the file, just get the list of threads as a raw array, use `convert(inputFile, null, callback)`

## Processing the files

There are examples on how to process the JSON files included, one for general usage and other for WordPress usage.

---
_Source: https://npm.io/package/disqus-xml2json · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
