aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md5
-rwxr-xr-xsuzuri8
2 files changed, 10 insertions, 3 deletions
diff --git a/README.md b/README.md
index 96518f3..3d231a0 100644
--- a/README.md
+++ b/README.md
@@ -10,12 +10,13 @@ Obtain your sumi.news token via the `s` cookie on sumi.news.
### `--help`
-```
+```text
usage: sumi [token] [folder]
```
-Optionally, omit the token and folder arguments and export the environment variables `SUZURI_TOKEN` and `SUZURI_FOLDER`.
+Optionally, omit the token and folder arguments and export the environment
+variables `SUZURI_TOKEN` and `SUZURI_FOLDER`.
### Dependencies
diff --git a/suzuri b/suzuri
index 32e792e..5de455e 100755
--- a/suzuri
+++ b/suzuri
@@ -22,4 +22,10 @@ else
curl_command+=("https://sumi.news/")
fi
-"${curl_command[@]}" | pup '.mt-6' | html2md -i | glow
+body="$("${curl_command[@]}" | pup '.mt-6' | html2md -i)"
+
+if [[ -n "${SUZURI_REVERSE}" ]]; then
+ body="$(echo "${body}" | tac)"
+fi
+
+echo "${body}" | glow