diff options
-rwxr-xr-x | inv2json.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/inv2json.py b/inv2json.py new file mode 100755 index 0000000..ccaa542 --- /dev/null +++ b/inv2json.py @@ -0,0 +1,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)) |