Skip to main content

A parser for the twee format

Project description

pylint workflow Status test workflow Status pypi workflow Status

PyPI - Version PyPI - Python Version PyPI - Status

Read the Docs (version)

Features

Use

# Install by pip
$ python -m pip install pytwee
# Run in console
$ python -m pytwee tests/t001.tw
$ pytwee tests/t001.tw
# Import as a module
import pytwee

story = pytwee.story.Story()

with open('my-story.tw', 'rt') as f:
    parser = pytwee.twee3.Parser(story)
    for line in iter(f.readline, ''):
        parser(line)
    del parser #<- very important

print('story:', story)

License

Static Badge

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytwee-0.3.1.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytwee-0.3.1-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file pytwee-0.3.1.tar.gz.

File metadata

  • Download URL: pytwee-0.3.1.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pytwee-0.3.1.tar.gz
Algorithm Hash digest
SHA256 2d8b12fc18d63eaa515f6993046d0375fde2fc67525f37c414e96bcf1a803362
MD5 1695ccdc200728ac16028a54aca6324e
BLAKE2b-256 d0fe22d2004be8126da953256be460cf713649202234540cd94afc52a1568c9a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytwee-0.3.1.tar.gz:

Publisher: pypi.yml on jixingcn/pytwee

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pytwee-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: pytwee-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pytwee-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 81a9c47e84a195afc0378774ff3745f645ad6704c1c8083f439b9230c805b3df
MD5 295427bfd23dbc63a7bf1496a6f6db1d
BLAKE2b-256 7f151bf01de56fd0c70d0759bd83cf2917ab41f8e83869fd75607a041c106892

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytwee-0.3.1-py3-none-any.whl:

Publisher: pypi.yml on jixingcn/pytwee

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page