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.rstrip('\n'))
    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.3.tar.gz (8.1 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.3-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytwee-0.3.3.tar.gz
  • Upload date:
  • Size: 8.1 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.3.tar.gz
Algorithm Hash digest
SHA256 379bb96a014b806ee6781f467dd28a3fbebb7489bff265f0c37842c01716f6ad
MD5 15c2c4dd11954b14e9cf1705ca8c925e
BLAKE2b-256 7feee301d4d6c5b2202287ef9e01f8f82b0dbe2e9482faa05ba97ca9f7687163

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytwee-0.3.3.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.3-py3-none-any.whl.

File metadata

  • Download URL: pytwee-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 8.3 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 351fc1ef5b253ab2f761a955d39401e0c0e74c83bf5e4484252c120ef08f3066
MD5 8d4979a098c6765493672ceeb669c019
BLAKE2b-256 80f1f75c71ba547e1dee67eaf21571ca14566588d055d34c3a716a3dd731bc2f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytwee-0.3.3-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