You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGES.md
+6-2Lines changed: 6 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
CHANGES
2
2
3
-
Unreleased (ver 2.2.0):
3
+
# Ver 2.2.0 (2023-08-13)
4
4
5
5
- Change: Style submenu added, now style change shortcuts are visible to user (`Ctrl + {0-9}`) for first ten styles.
6
6
@@ -12,7 +12,11 @@ Unreleased (ver 2.2.0):
12
12
13
13
- Bug: Multiple empty line strings were not generating the paragraphs needed, ie `\n\n`
14
14
15
-
- Change: text elements and stroke elements now have `__add__`, other classes raise errors. This is used to collapse like-class elements for steno wrapping.
15
+
- Change: text elements and stroke elements now have `__add__` and `__radd__`, other classes raise errors. This is used to collapse like-class elements for steno wrapping.
16
+
17
+
- Change: Window titlebar now updates with transcript name when transcript is opened.
18
+
19
+
- Bug: removed thread deletion from `export_*` as before, a second export would crash.
Copy file name to clipboardExpand all lines: docs/reference/elements.md
+12-5Lines changed: 12 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,7 @@ It has the methods:
28
28
-`__getitem__`: returns new instance after deepcopy
29
29
-`__repr__`: representation as `dict`
30
30
-`__add__`: adds together text, and updates time from other
31
+
-`__radd__`: returns `NotImplemented`
31
32
-`length`: returns length of string, here as placeholder in order to keep consistency with other subclassed elements, the functional length
32
33
-`split`: splits text string on whitespace (re from textwrapper), returns list of elements containing each text piece separately, but same otherwise as original
33
34
-`from_dict`: can populate class using a dict
@@ -50,7 +51,8 @@ It has the additional attributes:
50
51
51
52
Overriding methods:
52
53
53
-
-`__add__`: will only combine elements but not across word boundaries (spaces)
54
+
-`__add__`: will only combine elements but not across word boundaries (spaces), can accept `stroke_text` and `text_element`
55
+
-`__radd__`: works with `text_element` addition properly, `NotImplemented` otherwise
54
56
-`to_rtf`
55
57
-`to_display`
56
58
@@ -67,7 +69,7 @@ It has the additional attributes:
67
69
68
70
Overriding methods:
69
71
70
-
-`__add__`: throws error
72
+
-`__add__`: `NotImplemented`
71
73
-`length`: 1
72
74
-`to_display`
73
75
-`to_odt`
@@ -85,7 +87,7 @@ It has the additional elements:
85
87
86
88
Overriding methods:
87
89
88
-
-`__add__`: throws error
90
+
-`__add__`: `NotImplemented`
89
91
-`length`: 1
90
92
-`to_json`: do not output `user_field_dict`, no need for a copy of all fields with each element
91
93
-`to_display`:
@@ -111,7 +113,8 @@ It has the additional attributes:
111
113
112
114
It has the methods:
113
115
114
-
-`__add__`: throws error
116
+
-`__add__`: `NotImplemented`
117
+
-`__radd__`: `NotImplemented`, overrides `__radd__` from `stroke_text`
115
118
-*`length`*: the length of the text only, the element's "functional" length
116
119
-`__len__`: returns length of prefix + text + suffix
117
120
-`to_text`: string of prefix + text + suffix
@@ -137,12 +140,16 @@ It has the additional attributes:
137
140
138
141
Overriding methods:
139
142
140
-
-`__add__`: throws error
143
+
-`__add__`: `NotImplemented`
141
144
142
145
The actual "number" for the exhibit is stored in the `text` attribute.
143
146
144
147
Has non-breaking space in `to_text` so that "prefix" and "number" are always together even for text formats.
145
148
149
+
## Combining elements
150
+
151
+
Only strictly text and stroke elements can be combined through `__add__` and `__radd__`, ie while `automatic_text` subclasses `stroke_text`, the two should not be combined. This is primarily for the use of collapsing elements into word chunks, as `pre` and `pare ` may be two stroke elements, but should be treated as one for wrapping, otherwise, steno wrapping may wrap in unwanted places.
152
+
146
153
## element_collection
147
154
148
155
This is the container holding a list of elements. It subclasses `UserList` and overrides some methods. Despite being an `UserList` list, the methods mean it behaves like a `string` in many ways.
0 commit comments