aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.markdown5
-rw-r--r--screenplain/types.py9
2 files changed, 12 insertions, 2 deletions
diff --git a/README.markdown b/README.markdown
index 1979d48..90bd645 100644
--- a/README.markdown
+++ b/README.markdown
@@ -33,6 +33,11 @@ the master branch may not always work. I'm currently working on supporting
the whole [Fountain](http://fountain.io) specification. (Fountain
was previously known as "Screenplay Markdown" or "SPMD.")
+Installing
+==========
+
+ pip install screenplain
+
Credits
=======
diff --git a/screenplain/types.py b/screenplain/types.py
index f8454ef..8464ea5 100644
--- a/screenplain/types.py
+++ b/screenplain/types.py
@@ -46,10 +46,11 @@ class Section(object):
class Dialog(object):
- def __init__(self, character, lines):
+ def __init__(self, character, lines=None):
self.character = character
self.blocks = [] # list of tuples of (is_parenthetical, text)
- self._parse(lines)
+ if lines:
+ self._parse(lines)
def _parse(self, lines):
inside_parenthesis = False
@@ -60,6 +61,10 @@ class Dialog(object):
if line.endswith(')'):
inside_parenthesis = False
+ def add_line(self, line):
+ parenthetical = line.startswith('(')
+ self.blocks.append((parenthetical, line))
+
class DualDialog(object):
def __init__(self, left_dialog, right_dialog):