npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@icij/confluence-dump-explorer

v1.0.1

Published

A tiny program to manipulate a XML dump from Confluence.

Downloads

4

Readme

Confluence Dump Explorer

A tiny program to manipulate a XML dump from Confluence.

Motivations

ICIJ used to build knowledge bases on Confluence for our investigations. Since a few month we migrated to an internal tool that fits better with our needs. Yet the knowledge and documentations accumulated in our Confluence instance are still valuable and we need a way to turn the (huge) dump file from Confluence into a-more-human-readable format (JSON).

JSON files are much more easy to manipulate than a single dump file. With a collection of these tiny files (one for each page), it's quiet easy to build an interface to explore documents or use a tool like Datashare to index and search into the full corpus.

Usage

npm install -g @icij/confluence-dump-explorer

The cde program is now available:

Usage: cde [options] [command]

Options:
  -h, --help                          display help for command

Commands:
  xml [options] <path> [dist]         Analyses and manipulates a Confluence XML dump.
  pages [options] <path> [dist]       Analyses JSON files into `dist/raw`.
  contentbody [options] <dist> <api>  Manipulate existing Content Bodies in JSON files from
                                      `dist/pages`.
  help [command]                      display help for command

These commands are intended to be used in coordination with each other:

  1. cde xml --collect ./dump/entities.xml ./dist
  2. cde pages --build ./dump/entities.xml ./dist
  3. cde contentbody --convert ./dist "http://localhost:8090/rest/api/"

For this example, we use an ephemeral instance of Confluence running inside a docker container:

docker run --name="confluence" --rm -d -p 8090:8090 -p 8091:8091 atlassian/confluence-server

Develop

This tiny utility uses libxmljs to parse XML files. Under the hood, libxmljs uses libxml which is known to have very good performances scores. In our case, we expect these XML dumps to be huge (we tested it with a 500 Mb file) so it makes sense to rely on a C parser, even if the installation if heavier.

To install node dependencies, we recommend using Yarn:

yarn