streamdown 0.31.0__tar.gz → 0.32.0__tar.gz

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.
Files changed (49) hide show
  1. {streamdown-0.31.0 → streamdown-0.32.0}/PKG-INFO +14 -6
  2. {streamdown-0.31.0 → streamdown-0.32.0}/README.md +13 -5
  3. {streamdown-0.31.0 → streamdown-0.32.0}/pyproject.toml +1 -1
  4. {streamdown-0.31.0 → streamdown-0.32.0}/streamdown/sd.py +17 -2
  5. {streamdown-0.31.0 → streamdown-0.32.0}/.gitignore +0 -0
  6. {streamdown-0.31.0 → streamdown-0.32.0}/2q +0 -0
  7. {streamdown-0.31.0 → streamdown-0.32.0}/LICENSE.MIT +0 -0
  8. {streamdown-0.31.0 → streamdown-0.32.0}/requirements.txt +0 -0
  9. {streamdown-0.31.0 → streamdown-0.32.0}/streamdown/__init__.py +0 -0
  10. {streamdown-0.31.0 → streamdown-0.32.0}/streamdown/plugins/README.md +0 -0
  11. {streamdown-0.31.0 → streamdown-0.32.0}/streamdown/plugins/latex.py +0 -0
  12. {streamdown-0.31.0 → streamdown-0.32.0}/tests/README.md +0 -0
  13. {streamdown-0.31.0 → streamdown-0.32.0}/tests/backtick-with-post-spaces.md +0 -0
  14. {streamdown-0.31.0 → streamdown-0.32.0}/tests/blankie.md +0 -0
  15. {streamdown-0.31.0 → streamdown-0.32.0}/tests/block.md +0 -0
  16. {streamdown-0.31.0 → streamdown-0.32.0}/tests/bold_reset_with_link.md +0 -0
  17. {streamdown-0.31.0 → streamdown-0.32.0}/tests/broken-code.md +0 -0
  18. {streamdown-0.31.0 → streamdown-0.32.0}/tests/broken-example.md +0 -0
  19. {streamdown-0.31.0 → streamdown-0.32.0}/tests/chunk-buffer.sh +0 -0
  20. {streamdown-0.31.0 → streamdown-0.32.0}/tests/cjk-table.md +0 -0
  21. {streamdown-0.31.0 → streamdown-0.32.0}/tests/cjk-wrap.md +0 -0
  22. {streamdown-0.31.0 → streamdown-0.32.0}/tests/code.md +0 -0
  23. {streamdown-0.31.0 → streamdown-0.32.0}/tests/dimcheck.md +0 -0
  24. {streamdown-0.31.0 → streamdown-0.32.0}/tests/example.md +0 -0
  25. {streamdown-0.31.0 → streamdown-0.32.0}/tests/fizzbuzz.md +0 -0
  26. {streamdown-0.31.0 → streamdown-0.32.0}/tests/inline.md +0 -0
  27. {streamdown-0.31.0 → streamdown-0.32.0}/tests/jimmy_webb.md +0 -0
  28. {streamdown-0.31.0 → streamdown-0.32.0}/tests/line-buffer.sh +0 -0
  29. {streamdown-0.31.0 → streamdown-0.32.0}/tests/line-wrap.md +0 -0
  30. {streamdown-0.31.0 → streamdown-0.32.0}/tests/links.md +0 -0
  31. {streamdown-0.31.0 → streamdown-0.32.0}/tests/list-test.md +0 -0
  32. {streamdown-0.31.0 → streamdown-0.32.0}/tests/managerie.md +0 -0
  33. {streamdown-0.31.0 → streamdown-0.32.0}/tests/mandlebrot.md +0 -0
  34. {streamdown-0.31.0 → streamdown-0.32.0}/tests/markdown.md +0 -0
  35. {streamdown-0.31.0 → streamdown-0.32.0}/tests/nested-example.md +0 -0
  36. {streamdown-0.31.0 → streamdown-0.32.0}/tests/outline.md +0 -0
  37. {streamdown-0.31.0 → streamdown-0.32.0}/tests/pvgo_512.jpg +0 -0
  38. {streamdown-0.31.0 → streamdown-0.32.0}/tests/pythonvgo.md +0 -0
  39. {streamdown-0.31.0 → streamdown-0.32.0}/tests/qwen3.md +0 -0
  40. {streamdown-0.31.0 → streamdown-0.32.0}/tests/rerun.zsh +0 -0
  41. {streamdown-0.31.0 → streamdown-0.32.0}/tests/slash.md +0 -0
  42. {streamdown-0.31.0 → streamdown-0.32.0}/tests/strip-chunks.sh +0 -0
  43. {streamdown-0.31.0 → streamdown-0.32.0}/tests/table-break.md +0 -0
  44. {streamdown-0.31.0 → streamdown-0.32.0}/tests/table_test.md +0 -0
  45. {streamdown-0.31.0 → streamdown-0.32.0}/tests/test.md +0 -0
  46. {streamdown-0.31.0 → streamdown-0.32.0}/tests/test_input.md +0 -0
  47. {streamdown-0.31.0 → streamdown-0.32.0}/tests/uline.md +0 -0
  48. {streamdown-0.31.0 → streamdown-0.32.0}/tests/wm.md +0 -0
  49. {streamdown-0.31.0 → streamdown-0.32.0}/tools/deploy.sh +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: streamdown
3
- Version: 0.31.0
3
+ Version: 0.32.0
4
4
  Summary: A streaming markdown renderer for modern terminals with syntax highlighting
5
5
  Project-URL: Homepage, https://github.com/day50-dev/Streamdown
6
6
  Project-URL: Bug Tracker, https://github.com/day50-dev/Streamdown/issues
@@ -39,7 +39,7 @@ Description-Content-Type: text/markdown
39
39
 
40
40
  Streamdown works with any streaming markdown such as [simonw's llm](https://github.com/simonw/llm) or even something basic like curl.
41
41
 
42
- It just works.
42
+ It's made to be compatible with and consistently render the wide variety of markdown from various llms.
43
43
 
44
44
  It supports standard piping and files as arguments like any normal pager but can also run as a wrapper so you retain full keyboard interactivity. Arrow keys, control, alt, all still work.
45
45
  ```bash
@@ -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` 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.
100
+ The location it's stored is platform specific and can be seen with the `-h` flag. 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
 
@@ -138,7 +138,7 @@ Controls optional features:
138
138
  * `CodeSpaces` (boolean, default: `true`): Enables detection of code blocks indented with 4 spaces. Set to `false` to disable this detection method (triple-backtick blocks still work).
139
139
  * `Clipboard` (boolean, default: `true`): Enables copying the last code block encountered to the system clipboard using OSC 52 escape sequences upon exit. Set to `false` to disable.
140
140
  * `Logging` (boolean, default: `false`): Enables logging to tmpdir (/tmp/sd) of the raw markdown for debugging and bug reporting. The logging uses an emoji as a record separator so the actual streaming delays can be simulated and replayed. If you use the `filename` based invocation, that is to say, `sd <filename>`, this type of logging is always off.
141
- * `Savebrace` (boolean, default: `true`): Saves the code blocks of a conversation to the append file `/tmp/sd/savebrace` so you can fzf or whatever you want through it. See how it's used in my [llmehelp](https://github.com/kristopolous/llmehelp) scripts, specifically `screen-query` and `sd-picker`.
141
+ * `Savebrace` (boolean, default: `true`): Saves the code blocks of a conversation to the append file `$TMP/sd/$UID/savebrace` so you can `fzf` or whatever you want through it. See how it's used in DAY50's [sidechat](https://github.com/day50-dev/sidechat).
142
142
 
143
143
  Example:
144
144
  ```toml
@@ -154,7 +154,7 @@ The most exciting feature here is `--exec` with it you can do full readline supp
154
154
  $ sd --exec "llm chat"
155
155
  ```
156
156
 
157
- And now you have all your readline stuff. It's pretty great. (Also see the Day50 shellwrap project.)
157
+ And now you have all your readline stuff. It's pretty great. (Also see the DAY50 shellwrap project.)
158
158
 
159
159
  It's also worth noting that things like the `-c` aren't "broken" with regard to file input. You can do something like this:
160
160
 
@@ -168,7 +168,12 @@ To override the margin.
168
168
  usage: sd [-h] [-l LOGLEVEL] [-b BASE] [-c CONFIG] [-w WIDTH] [-e EXEC]
169
169
  [-s SCRAPE] [filenameList ...]
170
170
 
171
- Streamdown - A Streaming markdown renderer for modern terminals
171
+ Streamdown is a Streaming markdown renderer for modern terminals.
172
+ https://github.com/day50-dev/Streamdown
173
+
174
+ paths:
175
+ config /home/chris/.config/streamdown/config.toml
176
+ logs /tmp/sd/1000
172
177
 
173
178
  positional arguments:
174
179
  filenameList Input file to process (also takes stdin)
@@ -185,8 +190,11 @@ optional arguments:
185
190
  -e EXEC, --exec EXEC Wrap a program EXEC for more 'proper' i/o handling
186
191
  -s SCRAPE, --scrape SCRAPE
187
192
  Scrape code snippets to a directory SCRAPE
193
+ -v, --version Show version information
188
194
  ```
189
195
 
196
+ **Note**: Some features are not supported on some OSs. Please file a ticket if you need a feature on your platform that isn't working.
197
+
190
198
  ## Demo
191
199
  Do this
192
200
 
@@ -9,7 +9,7 @@
9
9
 
10
10
  Streamdown works with any streaming markdown such as [simonw's llm](https://github.com/simonw/llm) or even something basic like curl.
11
11
 
12
- It just works.
12
+ It's made to be compatible with and consistently render the wide variety of markdown from various llms.
13
13
 
14
14
  It supports standard piping and files as arguments like any normal pager but can also run as a wrapper so you retain full keyboard interactivity. Arrow keys, control, alt, all still work.
15
15
  ```bash
@@ -67,7 +67,7 @@ It is designed for AI and can be used to do parser based sophisticated pipelines
67
67
  You can also just use it like a normal person.
68
68
  ## Configuration
69
69
 
70
- 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.
70
+ The location it's stored is platform specific and can be seen with the `-h` flag. If this file does not exist upon first run, it will be created with default values.
71
71
 
72
72
  Here are the sections:
73
73
 
@@ -108,7 +108,7 @@ Controls optional features:
108
108
  * `CodeSpaces` (boolean, default: `true`): Enables detection of code blocks indented with 4 spaces. Set to `false` to disable this detection method (triple-backtick blocks still work).
109
109
  * `Clipboard` (boolean, default: `true`): Enables copying the last code block encountered to the system clipboard using OSC 52 escape sequences upon exit. Set to `false` to disable.
110
110
  * `Logging` (boolean, default: `false`): Enables logging to tmpdir (/tmp/sd) of the raw markdown for debugging and bug reporting. The logging uses an emoji as a record separator so the actual streaming delays can be simulated and replayed. If you use the `filename` based invocation, that is to say, `sd <filename>`, this type of logging is always off.
111
- * `Savebrace` (boolean, default: `true`): Saves the code blocks of a conversation to the append file `/tmp/sd/savebrace` so you can fzf or whatever you want through it. See how it's used in my [llmehelp](https://github.com/kristopolous/llmehelp) scripts, specifically `screen-query` and `sd-picker`.
111
+ * `Savebrace` (boolean, default: `true`): Saves the code blocks of a conversation to the append file `$TMP/sd/$UID/savebrace` so you can `fzf` or whatever you want through it. See how it's used in DAY50's [sidechat](https://github.com/day50-dev/sidechat).
112
112
 
113
113
  Example:
114
114
  ```toml
@@ -124,7 +124,7 @@ The most exciting feature here is `--exec` with it you can do full readline supp
124
124
  $ sd --exec "llm chat"
125
125
  ```
126
126
 
127
- And now you have all your readline stuff. It's pretty great. (Also see the Day50 shellwrap project.)
127
+ And now you have all your readline stuff. It's pretty great. (Also see the DAY50 shellwrap project.)
128
128
 
129
129
  It's also worth noting that things like the `-c` aren't "broken" with regard to file input. You can do something like this:
130
130
 
@@ -138,7 +138,12 @@ To override the margin.
138
138
  usage: sd [-h] [-l LOGLEVEL] [-b BASE] [-c CONFIG] [-w WIDTH] [-e EXEC]
139
139
  [-s SCRAPE] [filenameList ...]
140
140
 
141
- Streamdown - A Streaming markdown renderer for modern terminals
141
+ Streamdown is a Streaming markdown renderer for modern terminals.
142
+ https://github.com/day50-dev/Streamdown
143
+
144
+ paths:
145
+ config /home/chris/.config/streamdown/config.toml
146
+ logs /tmp/sd/1000
142
147
 
143
148
  positional arguments:
144
149
  filenameList Input file to process (also takes stdin)
@@ -155,8 +160,11 @@ optional arguments:
155
160
  -e EXEC, --exec EXEC Wrap a program EXEC for more 'proper' i/o handling
156
161
  -s SCRAPE, --scrape SCRAPE
157
162
  Scrape code snippets to a directory SCRAPE
163
+ -v, --version Show version information
158
164
  ```
159
165
 
166
+ **Note**: Some features are not supported on some OSs. Please file a ticket if you need a feature on your platform that isn't working.
167
+
160
168
  ## Demo
161
169
  Do this
162
170
 
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "streamdown"
7
- version = "0.31.0"
7
+ version = "0.32.0"
8
8
  description = "A streaming markdown renderer for modern terminals with syntax highlighting"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
@@ -37,6 +37,8 @@ from term_image.image import from_file, from_url
37
37
  import pygments.util
38
38
  from wcwidth import wcwidth
39
39
  from functools import reduce
40
+ import textwrap
41
+ import argparse
40
42
  from argparse import ArgumentParser
41
43
  from pygments import highlight
42
44
  from pygments.lexers import get_lexer_by_name
@@ -119,7 +121,12 @@ split_up = lambda line: re.findall(r'(\x1b[^m]*m|[^\x1b]*)', line)
119
121
  def gettmpdir():
120
122
  tmp_dir_all = os.path.join(tempfile.gettempdir(), "sd")
121
123
  os.makedirs(tmp_dir_all, mode=0o777, exist_ok=True)
122
- tmp_dir = os.path.join(tmp_dir_all, str(os.getuid()))
124
+
125
+ if os.name != 'nt':
126
+ tmp_dir = os.path.join(tmp_dir_all, str(os.getuid()))
127
+ else:
128
+ tmp_dir = tmp_dir_all
129
+
123
130
  os.makedirs(tmp_dir, exist_ok=True)
124
131
  return tmp_dir
125
132
 
@@ -1079,7 +1086,15 @@ def width_calc():
1079
1086
  ]
1080
1087
 
1081
1088
  def main():
1082
- parser = ArgumentParser(description="Streamdown - A Streaming markdown renderer for modern terminals. Latest version: https://github.com/day50-dev/Streamdown")
1089
+ parser = ArgumentParser(
1090
+ formatter_class=argparse.RawDescriptionHelpFormatter, description=textwrap.dedent(f"""
1091
+ Streamdown is a Streaming markdown renderer for modern terminals.
1092
+ https://github.com/day50-dev/Streamdown
1093
+
1094
+ paths:
1095
+ config {os.path.join(appdirs.user_config_dir('streamdown'), 'config.toml')}
1096
+ logs {gettmpdir()}
1097
+ """))
1083
1098
  parser.add_argument("filenameList", nargs="*", help="Input file to process (also takes stdin)")
1084
1099
  parser.add_argument("-l", "--loglevel", default="INFO", help="Set the logging level")
1085
1100
  parser.add_argument("-b", "--base", default=None, help="Set the hsv base: h,s,v")
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes