aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2023-10-30 10:48:22 +0100
committerdec05eba <dec05eba@protonmail.com>2023-10-30 10:48:22 +0100
commit9d96dd0aa94b64c314de447b7a4739e0995db432 (patch)
tree3bc4e58ce63724234d047ead7aa2e18b75af50df
parentf2bbfe83b4b23e87d8a049a2d698c6576a5bcd8c (diff)
Update readme with newline/carriage return info and color
-rw-r--r--README.md4
1 files changed, 3 insertions, 1 deletions
diff --git a/README.md b/README.md
index 5120e91..7fb4ae3 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,9 @@ The environment variable `URL` is set to _url_ relevant to the page, so for exam
## Output
Plugins output data by writing lines to stdout.\
Data is first written to stdout and then a _command_ is written to stdout.\
-First `add_tab` command is expected, followed by multiple `add_body_item`. The body items are put in the tab that is output before the body items.
+First `add_tab` command is expected, followed by multiple `add_body_item`. The body items are put in the tab that is output before the body items.\
+In plugins you may need to output newlines (\n) or carriage return (\r), in those cases replace newline with ascii 1 (\x01) and carriage return with ascii 2 (\x02).\
+Text color/font bold, etc can be set by using ANSI escape codes, see https://en.wikipedia.org/wiki/ANSI_escape_code and https://gist.github.com/JBlond/2fea43a3049b38287e5e9cefc87b2124 for example.
### add_tab
The add_tab command expects `title` data, for example:
```bash