aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2023-09-21 13:22:21 -0700
committerFuwn <[email protected]>2023-09-21 13:22:21 -0700
commit9ad6787cb9192cc408a04c453e89fec91d75529b (patch)
tree40af28254252f52966a063ecab52da203d8afc20
parentfeat(suzuri): minimal mode (diff)
downloadsuzuri-9ad6787cb9192cc408a04c453e89fec91d75529b.tar.xz
suzuri-9ad6787cb9192cc408a04c453e89fec91d75529b.zip
feat(suzuri): raw mode
-rwxr-xr-xsuzuri11
1 files changed, 8 insertions, 3 deletions
diff --git a/suzuri b/suzuri
index 3609d5a..05c0891 100755
--- a/suzuri
+++ b/suzuri
@@ -4,7 +4,7 @@ token="${1:-"${SUZURI_TOKEN}"}"
folder="${2:-"${SUZURI_FOLDER}"}"
if [[ -z "${token}" ]]; then
- printf "%s\n\n%s\n%s\n%s\%s\n\n%s\n%s\n%s\n%s\n" \
+ printf "%s\n\n%s\n%s\n%s\%s\n%s\n\n%s\n%s\n%s\n%s\n" \
"usage: sumi token [folder]" \
"positional arguments:" \
" token sumi.news session token" \
@@ -13,7 +13,8 @@ if [[ -z "${token}" ]]; then
" SUZURI_TOKEN substitution for [token]" \
" SUZURI_FOLDER substitution for [folder]" \
" SUZURI_REVERSE reverse the output feed" \
- " SUZURI_MINIMAL output only linked titles"
+ " SUZURI_MINIMAL output only linked titles" \
+ " SUZURI_RAW output raw markdown"
exit
fi
@@ -41,4 +42,8 @@ if [[ -n "${SUZURI_MINIMAL}" ]]; then
body="$(echo "${body}" | grep "##" | sed "s/##//")"
fi
-echo "${body}" | glow
+if [[ -n "${SUZURI_RAW}" ]]; then
+ echo "${body}"
+else
+ echo "${body}" | glow
+fi