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.0.tar.gz
(2.7 kB
view hashes)
Built Distribution
Close
Hashes for nsipptparser-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d323d07100f31ec13e9eb3de92a14297a47d60f4c7716b4a789f7749619a5ed |
|
MD5 | 306fd2096ee08668e5e00c632c4c558c |
|
BLAKE2b-256 | c967ca45f796a09d921a65e6e226fcc393edb133a902c62b228d15393f43422b |