endless-sky-parse-0.1.2
توضیحات
A working, tested Python conversion of the C++ parser for Endless Sky DataFiles
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | endless-sky-parse-0.1.2 |
| نام | endless-sky-parse |
| نسخه کتابخانه | 0.1.2 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | SpaceSchluffi |
| ایمیل نویسنده | tr-gitlab-spaceschluffi@digital-trauma.de |
| آدرس صفحه اصلی | https://gitlab.com/spaceschluffi/endless-sky-parse |
| آدرس اینترنتی | https://pypi.org/project/endless-sky-parse/ |
| مجوز | - |
# endless-sky-parse
A working, tested Python conversion of the C++ parser for Endless Sky DataFiles
## How to install
```console
$ pip install endless-sky-parse
```
## How to use
```python
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
```console
$ python -m venv venv && . venv/bin/activate
$ pip install -r dev_requirements.txt
```
Run tests with
```console
$ python setup.py test
```
نیازمندی
| مقدار | نام |
|---|---|
| - | pytest |
| - | pytest-cov |
| - | flake9 |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.7 | Python |
نحوه نصب
نصب پکیج whl endless-sky-parse-0.1.2:
pip install endless-sky-parse-0.1.2.whl
نصب پکیج tar.gz endless-sky-parse-0.1.2:
pip install endless-sky-parse-0.1.2.tar.gz