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: docs/blog/posts/darren-year-in-review.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,7 +84,7 @@ However, when animating things in a terminal, we can often achieve better granul
84
84
85
85
The exact characters that form the bar are "╺", "━" and "╸". When the bar sits perfectly within cell boundaries, every character is “━”. As it travels over a cell boundary, the left and right ends of the bar are updated to "╺" and "╸" respectively.
86
86
87
-
## Snapshot testing
87
+
## Snapshot testing for terminal apps
88
88
89
89
One of the great features we added to Rich this year was the ability to export console contents to an SVG. This feature was later exposed to Textual, allowing users to capture screenshots of their running Textual apps.
90
90
Ultimately, I ended up creating a tool for snapshot testing in the Textual codebase.
@@ -136,13 +136,14 @@ A project I worked on earlier in the year to improve the situation was the Textu
136
136
137
137
Then, by running a Textual application with the `--dev` flag, all standard output will be redirected to it.
138
138
This means you can use the builtin `print` function and still immediately see the output.
139
-
Textual itself also writes information to this console, giving insight into the messages that are flowing throw an application.
139
+
Textual itself also writes information to this console, giving insight into the messages that are flowing through an application.
140
140
141
141
## Pixel art
142
142
143
143
Cells in the terminal are roughly two times taller than they are wide. This means, that two horizontally adjacent cells form an approximate square.
144
144
145
145
Using this fact, I wrote a simple library based on Rich and PIL which can convert an image file into terminal output.
146
+
You can find the library, `rich-pixels`, [on GitHub](https://github.com/darrenburns/rich-pixels).
146
147
147
148
It’s particularly good for displaying simple pixel art images. The SVG image below is also a good example of the SVG export functionality I touched on earlier.
148
149
@@ -167,4 +168,4 @@ Other methods for displaying images in the terminal include:
167
168
168
169
That was a whirlwind tour of just some of the projects I tackled in 2022.
169
170
If you found it interesting, be sure to [follow me on Twitter](https://twitter.com/_darrenburns).
170
-
I don't post often, but when I do, it's usually about things similar to those I've discussed in this post.
171
+
I don't post often, but when I do, it's usually about things similar to those I've discussed here.
0 commit comments