diff options
| author | Fuwn <[email protected]> | 2023-09-21 13:17:23 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-09-21 13:17:23 -0700 |
| commit | ca41eb0e4c01b6648efff3dc6a2c73ef820d8223 (patch) | |
| tree | 0833eceb6cb7a057b982f22e4de8a391eeee9dbf | |
| parent | docs(readme): add alias hint (diff) | |
| download | suzuri-ca41eb0e4c01b6648efff3dc6a2c73ef820d8223.tar.xz suzuri-ca41eb0e4c01b6648efff3dc6a2c73ef820d8223.zip | |
feat(suzuri): minimal mode
| -rwxr-xr-x | suzuri | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -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\n\n%s\n%s\n%s\n%s\n" \ + printf "%s\n\n%s\n%s\n%s\%s\n\n%s\n%s\n%s\n%s\n" \ "usage: sumi token [folder]" \ "positional arguments:" \ " token sumi.news session token" \ @@ -12,7 +12,8 @@ if [[ -z "${token}" ]]; then "environment variables:" \ " SUZURI_TOKEN substitution for [token]" \ " SUZURI_FOLDER substitution for [folder]" \ - " SUZURI_REVERSE reverse the output feed" + " SUZURI_REVERSE reverse the output feed" \ + " SUZURI_MINIMAL output only linked titles" exit fi @@ -36,4 +37,8 @@ if [[ -n "${SUZURI_REVERSE}" ]]; then body="$(echo "${body}" | tac)" fi +if [[ -n "${SUZURI_MINIMAL}" ]]; then + body="$(echo "${body}" | grep "##" | sed "s/##//")" +fi + echo "${body}" | glow |