aboutsummaryrefslogtreecommitdiff
path: root/inv2json.py
blob: ccaa542c9129fe658a9162fa7225a7527569966b (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env python3
import json
import posixpath
import sys

from sphinx.util.inventory import InventoryFile

with open(sys.argv[1], 'rb') as f:
    inv = InventoryFile.load(f, '', posixpath.join)

print(json.dumps(inv))