A working, tested Python conversion of the C++ parser for Endless Sky DataFiles
Project description
endless-sky-parse
A working, tested Python conversion of the C++ parser for Endless Sky DataFiles
How to install
$ pip install endless-sky-parse
How to use
from endless_sky.datafile import DataFile
f = DataFile("/usr/share/games/endless-sky/data/human/ships.txt")
it = f.root.filter(["ship", "Blackbird"])
ship = next(it)
ship.children[0]
# DataNode(tokens=['sprite', 'ship/blackbird'], children=[])
next(ship.filter_first("description")).tokens[1][:80]
# 'The Tarazed Blackbird is a high-class passenger transport, designed to move larg'
Development
$ python -m venv venv && . venv/bin/activate
$ pip install -r dev_requirements.txt
Run tests with
$ python setup.py test
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
Built Distribution
Close
Hashes for endless_sky_parse-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 763a51aa7473d81c42919ddfe22510ee8ac4cb1fa3a743009befb58a5212dc58 |
|
MD5 | afafe45b84b27d7ed58cd3da45080a92 |
|
BLAKE2b-256 | 47b79edd496161db87fe688963e181e9bb9453a7eb58c5f87a8184502d025685 |