playscript package

Submodules

playscript.psc module

Classes to make up play script object.

class playscript.psc.PSc(title='', author='', chars=[], lines=[])

ベースクラス: object

Constructor.

パラメータ
  • title (str) --

  • author (str) --

  • chars (list-like[str]) --

  • lines (list-like[str]) --

classmethod from_lines(lines)

Make PSc object from PScLine objects.

パラメータ

lines (list-like[PScLine]) --

戻り値

script

戻り値の型

PSc

classmethod lines_from_types_and_texts(line_types, texts)

Make PScLine list from line types and source texts.

パラメータ
  • line_types (list-like[PScLineType]) --

  • texts (list-like[str]) --

戻り値

lines

戻り値の型

list[PScLine]

class playscript.psc.PScLine(line_type, name=None, text=None)

ベースクラス: object

Constructor.

パラメータ
  • line_type (PScLineType) --

  • name (str) --

  • text (str) --

dlg_brackets = ('「', '」')
classmethod from_text(line_type, text, *, default_name='*', dlg_brackets=None)

Make PScLine object from PScLineType and a text.

パラメータ
  • line_type (PScLineType) --

  • text (str) -- Input text that the PScLine object is made from.

  • default_name (str) -- Used as name if no space or bracket in dialogue line.

  • dlg_brackets (list-like[str]) -- Tuple/list of opening bracket chars and closing bracket chars.

戻り値

line

戻り値の型

PScLine

class playscript.psc.PScLineType(value)

ベースクラス: enum.Enum

Types for PScLine.

AUTHOR = 1
CHARACTER = 3
CHARACTER_CONTINUED = 12
CHARSHEADLINE = 2
COMMENT = 10
COMMENT_CONTINUED = 15
DIALOGUE = 8
DIALOGUE_CONTINUED = 14
DIRECTION = 7
DIRECTION_CONTINUED = 13
EMPTY = 11
ENDMARK = 9
H1 = 4
H2 = 5
H3 = 6
TITLE = 0

Module contents