From: Ian Kelling Date: Thu, 23 Feb 2023 12:20:06 +0000 (-0500) Subject: fix alt text, i think X-Git-Url: https://vcs.fsf.org/?p=pdt.git;a=commitdiff_plain;h=af6ab4512d20c24edaea11a1c54184392bc34ae0 fix alt text, i think --- diff --git a/pdt.sh b/pdt.sh index d4952eb..a939326 100644 --- a/pdt.sh +++ b/pdt.sh @@ -114,7 +114,7 @@ toot() { # -m IMAGE_FILE = Uploads IMAGE_FILE. if MEDIA_FILE.txt exists, the last line of that file will be used as ALT_TEXT # unless -a has been used. pdt() { - local video media twitter_account gs_account mastodon_account video gs_arg alt_text network + local video media twitter_account gs_account mastodon_account video gs_arg network local do_mastodon do_twitter do_gnusocial local -a toot_args if [[ $pdttest ]]; then @@ -156,7 +156,6 @@ pdt() { ;; -a) alt_text="$2" - toot_args+=(--description "$alt_text" ) shift 2 ;; -m) @@ -190,6 +189,9 @@ pdt() { if [[ ! $alt_text && -r $media.txt && -s $media.txt ]]; then alt_text=$(tail -n1 $media.txt) fi + if [[ $alt_text ]]; then + toot_args+=(--description "$alt_text" ) + fi fi # if we have no argument if (( ! $# )); then @@ -336,7 +338,7 @@ pdt-pip-setup() { # generally only meant to be called internally from pdt-setup pdt-twitter-setup() { - # twitter setup + # twitter setup mkdir -p ~/src/twitter cd ~/src/twitter python3 -m virtualenv -p python3 venv