Very simple package for parsing .nsippt files to json
Project description
Very simple package for parsing .nsippt files to json. Use Python 3.4 and up.
Usage
pygments_style = 'sphinx'
import nsipptparser
import json
with open("sneaky.nsippt") as file:
data = nsipptparser.parse(file)
# Get the first length measurement of the first View
length = data["ViewPropertiesSet"]["View Properties"][0]["Actions Set"]["Length"][0]["length value"]
print("The length is ", length)
# Get the base64 thumbnail of the first View
thumbnail = data["ViewPropertiesSet"]["View Properties"][0]["Thumbnail"]
print("The thumbnail is ", thumbnail)
# Save to json file
with open('data.json', 'w') as f:
json.dump(data, f, indent=4)
Note: All values are parsed as strings, so you will have to parse the strings further yourself.
Installation
pip install nsipptparser
Requirements
Compatibility
Licence
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nsipptparser-0.1.1.tar.gz
(2.8 kB
view hashes)
Built Distribution
Close
Hashes for nsipptparser-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec44034e528eef3d323810c5f3112151ec3b8b25b0a4277cab5300f68cfffde8 |
|
MD5 | e43dbe52f2b0a1cd7721f96c47ab748d |
|
BLAKE2b-256 | 5858cdf44da477605314a0ad7a34d81b48cb1a357d1953b52fa633fc3a2661fe |