streamdown 0.29.0__py3-none-any.whl → 0.31.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- streamdown/sd.py +15 -6
- {streamdown-0.29.0.dist-info → streamdown-0.31.0.dist-info}/METADATA +5 -4
- streamdown-0.31.0.dist-info/RECORD +9 -0
- streamdown-0.29.0.dist-info/RECORD +0 -9
- {streamdown-0.29.0.dist-info → streamdown-0.31.0.dist-info}/WHEEL +0 -0
- {streamdown-0.29.0.dist-info → streamdown-0.31.0.dist-info}/entry_points.txt +0 -0
- {streamdown-0.29.0.dist-info → streamdown-0.31.0.dist-info}/licenses/LICENSE.MIT +0 -0
streamdown/sd.py
CHANGED
|
@@ -20,8 +20,10 @@ fi
|
|
|
20
20
|
import appdirs, toml
|
|
21
21
|
import logging, tempfile
|
|
22
22
|
import os, sys
|
|
23
|
-
import
|
|
24
|
-
|
|
23
|
+
import select
|
|
24
|
+
|
|
25
|
+
if os.name != 'nt':
|
|
26
|
+
import pty, termios, tty
|
|
25
27
|
|
|
26
28
|
import math
|
|
27
29
|
import re
|
|
@@ -128,7 +130,7 @@ def debug_write(text):
|
|
|
128
130
|
state.Logging.write(text)
|
|
129
131
|
|
|
130
132
|
def savebrace():
|
|
131
|
-
if state.Savebrace and state.code_buffer_raw:
|
|
133
|
+
if state.Savebrace and state.code_buffer_raw and os.name != 'nt':
|
|
132
134
|
path = os.path.join(gettmpdir(), 'savebrace')
|
|
133
135
|
with open(path, "a") as f:
|
|
134
136
|
f.write(state.code_buffer_raw + "\x00")
|
|
@@ -836,9 +838,15 @@ def parse(stream):
|
|
|
836
838
|
if ttl > 1+tline_len:
|
|
837
839
|
break
|
|
838
840
|
|
|
841
|
+
|
|
839
842
|
newlen = visible_length("".join(parts[i:]))
|
|
840
843
|
|
|
841
844
|
snipfrom = newlen - len(tline) + 2
|
|
845
|
+
# this is all getting replaced with the new lexer so let's give a cheap
|
|
846
|
+
# fix for now:
|
|
847
|
+
if snipfrom == 1:
|
|
848
|
+
snipfrom = 0
|
|
849
|
+
|
|
842
850
|
if snipfrom > 0:
|
|
843
851
|
parts[i] = parts[i][snipfrom:]
|
|
844
852
|
|
|
@@ -1128,10 +1136,11 @@ def main():
|
|
|
1128
1136
|
Style.Link = f"{FG}{Style.Symbol}{UNDERLINE[0]}"
|
|
1129
1137
|
|
|
1130
1138
|
logging.basicConfig(stream=sys.stdout, level=args.loglevel.upper(), format=f'%(message)s')
|
|
1131
|
-
|
|
1139
|
+
if os.name != 'nt':
|
|
1140
|
+
state.exec_master, state.exec_slave = pty.openpty()
|
|
1132
1141
|
try:
|
|
1133
1142
|
inp = sys.stdin
|
|
1134
|
-
if args.exec:
|
|
1143
|
+
if args.exec and os.name != 'nt':
|
|
1135
1144
|
state.terminal = termios.tcgetattr(sys.stdin)
|
|
1136
1145
|
state.is_exec = True
|
|
1137
1146
|
state.exec_sub = subprocess.Popen(args.exec.split(' '), stdin=state.exec_slave, stdout=state.exec_slave, stderr=state.exec_slave, close_fds=True)
|
|
@@ -1162,7 +1171,7 @@ def main():
|
|
|
1162
1171
|
state.exit = 130
|
|
1163
1172
|
|
|
1164
1173
|
except Exception as ex:
|
|
1165
|
-
if state.terminal:
|
|
1174
|
+
if state.terminal and os.name != 'nt':
|
|
1166
1175
|
termios.tcsetattr(sys.stdin, termios.TCSADRAIN, state.terminal)
|
|
1167
1176
|
logging.warning(f"Exception thrown: {type(ex)} {ex}")
|
|
1168
1177
|
traceback.print_exc()
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: streamdown
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.31.0
|
|
4
4
|
Summary: A streaming markdown renderer for modern terminals with syntax highlighting
|
|
5
|
-
Project-URL: Homepage, https://github.com/
|
|
6
|
-
Project-URL: Bug Tracker, https://github.com/
|
|
5
|
+
Project-URL: Homepage, https://github.com/day50-dev/Streamdown
|
|
6
|
+
Project-URL: Bug Tracker, https://github.com/day50-dev/Streamdown/issues
|
|
7
7
|
Author-email: Chris McKenzie <kristopolous@yahoo.com>
|
|
8
8
|
License: MIT
|
|
9
9
|
License-File: LICENSE.MIT
|
|
@@ -97,7 +97,7 @@ It is designed for AI and can be used to do parser based sophisticated pipelines
|
|
|
97
97
|
You can also just use it like a normal person.
|
|
98
98
|
## Configuration
|
|
99
99
|
|
|
100
|
-
It's located at `~/.config/streamdown/config.toml`
|
|
100
|
+
It's located at `~/.config/streamdown/config.toml` in Linux and `~/Library/Application Support/streamdown/config.toml` in macOS. If this file does not exist upon first run, it will be created with default values.
|
|
101
101
|
|
|
102
102
|
Here are the sections:
|
|
103
103
|
|
|
@@ -199,3 +199,4 @@ After the git clone least one of these should work, hopefully. it's using the mo
|
|
|
199
199
|
$ pip install -e .
|
|
200
200
|
$ uv pip install -e .
|
|
201
201
|
|
|
202
|
+
Explore the rest of [DAY50](https://github.com/day50-dev). Feel free to follow us, there's some exciting stuff coming.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
streamdown/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
streamdown/sd.py,sha256=HE5ajd-afganv6xGuZv6RsCpYgaxY7qk9qB-BAM7nxQ,44599
|
|
3
|
+
streamdown/plugins/README.md,sha256=KWqYELs9WkKJmuDzYv3cvPlZMkArsNCBUe4XDoTLjLA,1143
|
|
4
|
+
streamdown/plugins/latex.py,sha256=xZMGMdx_Sw4X1piZejXFHfEG9qazU4fGeceiMI0h13Y,648
|
|
5
|
+
streamdown-0.31.0.dist-info/METADATA,sha256=tIowHrsBcZyoMCExO0OW61iTEQmQTKEt_FSn6FrMEZQ,9892
|
|
6
|
+
streamdown-0.31.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
7
|
+
streamdown-0.31.0.dist-info/entry_points.txt,sha256=HroKFsFMGf_h9PRTE96NjvjJQWupMW5TGP5RGUr1O_Q,74
|
|
8
|
+
streamdown-0.31.0.dist-info/licenses/LICENSE.MIT,sha256=SnY46EPirUsF20dZDR8HpyVgS2_4Tjxuc6f-4OdqO7U,1070
|
|
9
|
+
streamdown-0.31.0.dist-info/RECORD,,
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
streamdown/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
streamdown/sd.py,sha256=naF311CdLgavOdBhfK-o5BU00ktu0LrggOFRtE4LJ9o,44286
|
|
3
|
-
streamdown/plugins/README.md,sha256=KWqYELs9WkKJmuDzYv3cvPlZMkArsNCBUe4XDoTLjLA,1143
|
|
4
|
-
streamdown/plugins/latex.py,sha256=xZMGMdx_Sw4X1piZejXFHfEG9qazU4fGeceiMI0h13Y,648
|
|
5
|
-
streamdown-0.29.0.dist-info/METADATA,sha256=MAipmHgnjN5SOFFSXP1vYEDNxcOASLceL1-Ejd8fK3c,9751
|
|
6
|
-
streamdown-0.29.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
7
|
-
streamdown-0.29.0.dist-info/entry_points.txt,sha256=HroKFsFMGf_h9PRTE96NjvjJQWupMW5TGP5RGUr1O_Q,74
|
|
8
|
-
streamdown-0.29.0.dist-info/licenses/LICENSE.MIT,sha256=SnY46EPirUsF20dZDR8HpyVgS2_4Tjxuc6f-4OdqO7U,1070
|
|
9
|
-
streamdown-0.29.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|