Skip to main content

playscript - Structure for Play Scripts

Project description

playscript

> English version

概要

台本を構造化データとして扱うためのパッケージです。

クラス

PSc

台本データのクラスです。

PScLine

PSc オブジェクトに含まれる各行を表すクラスです。
"type" 属性により、セリフやト書きといった「行の種類」が決まります。

PScLineType

PScLine の "type" を定義する enum 型です。

3行からなる台本を作る

from playscript import PScLineType, PScLine, PSc

title = PScLine.from_text(PScLineType.TITLE, 'ろくでなしの冒険')
dialogue1 = PScLine.from_text(PScLineType.DIALOGUE, '六郎「どうする?」')
dialogue2 = PScLine.from_text(PScLineType.DIALOGUE, '七郎「帰って寝る」')

script = PSc(lines=[title, dialogue1, dialogue2])

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

playscript-0.2.2.tar.gz (6.4 kB view hashes)

Uploaded Source

Built Distribution

playscript-0.2.2-py3-none-any.whl (6.5 kB view hashes)

Uploaded Python 3

Supported by

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