Mercurial > jouvence
comparison fontaine/document.py @ 2:59fe8cb6190d
Add lots of tests, fix lots of bugs.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Tue, 03 Jan 2017 09:05:28 -0800 |
parents | 74b83e3d921e |
children |
comparison
equal
deleted
inserted
replaced
1:74b83e3d921e | 2:59fe8cb6190d |
---|---|
83 TYPE_DIALOG = 3 | 83 TYPE_DIALOG = 3 |
84 TYPE_PARENTHETICAL = 4 | 84 TYPE_PARENTHETICAL = 4 |
85 TYPE_TRANSITION = 5 | 85 TYPE_TRANSITION = 5 |
86 TYPE_LYRICS = 6 | 86 TYPE_LYRICS = 6 |
87 TYPE_PAGEBREAK = 7 | 87 TYPE_PAGEBREAK = 7 |
88 TYPE_EMPTYLINES = 8 | |
88 | 89 |
89 | 90 |
90 def _scene_element_type_str(t): | 91 def _scene_element_type_str(t): |
91 if t == TYPE_ACTION: | 92 if t == TYPE_ACTION: |
92 return 'ACTION' | 93 return 'ACTION' |
102 return 'TRANSITION' | 103 return 'TRANSITION' |
103 if t == TYPE_LYRICS: | 104 if t == TYPE_LYRICS: |
104 return 'LYRICS' | 105 return 'LYRICS' |
105 if t == TYPE_PAGEBREAK: | 106 if t == TYPE_PAGEBREAK: |
106 return 'PAGEBREAK' | 107 return 'PAGEBREAK' |
108 if t == TYPE_EMPTYLINES: | |
109 return 'EMPTYLINES' | |
107 raise NotImplementedError() | 110 raise NotImplementedError() |
108 | 111 |
109 | 112 |
110 def _ellipsis(text, length): | 113 def _ellipsis(text, length): |
111 if len(text) > length: | 114 if len(text) > length: |