๐Ÿ“ฆโž”๐Ÿฆ‹ Store and retrieve files on the Atmosphere
35
fork

Configure Feed

Select the types of activity you want to include in your feed.

[#16] bsky: fix/ignore shellcheck warnings

Ducky a56edc33 2eb9ebfb

+15 -14
+15 -14
src/commands/bsky_profile.sh
··· 1 1 #!/usr/bin/env bash 2 2 3 3 function atfile.bsky_profile() { 4 - app="$1" 5 - actor="$2" 4 + actor="$1" 6 5 7 6 [[ $_output_json == 1 ]] && atfile.die "Command not available as JSON" 8 7 9 8 function atfile.bsky_profile.get_pretty_date() { 9 + # shellcheck disable=SC2317 10 10 atfile.util.get_date "$1" "%Y-%m-%d %H:%M:%S" 11 11 } 12 12 13 13 if [[ -z "$actor" ]]; then 14 + # shellcheck disable=SC2154 14 15 actor="$_username" 15 16 else 16 17 resolved_did="$(atfile.util.resolve_identity "$actor")" 17 18 error="$(atfile.util.get_xrpc_error $? "$resolved_did")" 18 19 [[ -n "$error" ]] && atfile.die.xrpc_error "Unable to resolve '$actor'" "$resolved_did" 19 20 20 - actor="$(echo $resolved_did | cut -d "|" -f 1)" 21 + actor="$(echo "$resolved_did" | cut -d "|" -f 1)" 21 22 fi 22 23 23 24 bsky_profile="$(app.bsky.actor.getProfile "$actor")" ··· 34 35 count_packs="$(echo "$bsky_profile" | jq -r '.associated.starterPacks')" 35 36 count_posts="$(echo "$bsky_profile" | jq -r '.postsCount')" 36 37 date_created="$(echo "$bsky_profile" | jq -r '.createdAt')" 37 - date_created="$(atfile.profile.get_pretty_date "$date_created")" 38 + date_created="$(atfile.bsky_profile.get_pretty_date "$date_created")" 38 39 date_indexed="$(echo "$bsky_profile" | jq -r '.indexedAt')" 39 - date_indexed="$(atfile.profile.get_pretty_date "$date_indexed")" 40 + date_indexed="$(atfile.bsky_profile.get_pretty_date "$date_indexed")" 40 41 did="$(echo "$bsky_profile" | jq -r '.did')" 41 42 handle="$(echo "$bsky_profile" | jq -r '.handle')" 42 43 name="$(echo "$bsky_profile" | jq -r '.displayName')" ··· 60 61 type="๐ŸŸฆ Labeler" 61 62 fi 62 63 63 - [[ $(atfile.util.is_null_or_empty "$count_feeds") == 1 ]] && count_feeds="0" || count_feeds="$(atfile.util.fmt_int $count_feeds)" 64 - [[ $(atfile.util.is_null_or_empty "$count_followers") == 1 ]] && count_followers="0" || count_followers="$(atfile.util.fmt_int $count_followers)" 65 - [[ $(atfile.util.is_null_or_empty "$count_following") == 1 ]] && count_following="0" || count_following="$(atfile.util.fmt_int $count_following)" 66 - [[ $(atfile.util.is_null_or_empty "$count_likes") == 1 ]] && count_likes="0" || count_likes="$(atfile.util.fmt_int $count_likes)" 67 - [[ $(atfile.util.is_null_or_empty "$count_lists") == 1 ]] && count_lists="0" || count_lists="$(atfile.util.fmt_int $count_lists)" 68 - [[ $(atfile.util.is_null_or_empty "$count_packs") == 1 ]] && count_packs="0" || count_packs="$(atfile.util.fmt_int $count_packs)" 69 - [[ $(atfile.util.is_null_or_empty "$count_posts") == 1 ]] && count_posts="0" || count_posts="$(atfile.util.fmt_int $count_posts)" 64 + [[ $(atfile.util.is_null_or_empty "$count_feeds") == 1 ]] && count_feeds="0" || count_feeds="$(atfile.util.fmt_int "$count_feeds")" 65 + [[ $(atfile.util.is_null_or_empty "$count_followers") == 1 ]] && count_followers="0" || count_followers="$(atfile.util.fmt_int "$count_followers")" 66 + [[ $(atfile.util.is_null_or_empty "$count_following") == 1 ]] && count_following="0" || count_following="$(atfile.util.fmt_int "$count_following")" 67 + [[ $(atfile.util.is_null_or_empty "$count_likes") == 1 ]] && count_likes="0" || count_likes="$(atfile.util.fmt_int "$count_likes")" 68 + [[ $(atfile.util.is_null_or_empty "$count_lists") == 1 ]] && count_lists="0" || count_lists="$(atfile.util.fmt_int "$count_lists")" 69 + [[ $(atfile.util.is_null_or_empty "$count_packs") == 1 ]] && count_packs="0" || count_packs="$(atfile.util.fmt_int "$count_packs")" 70 + [[ $(atfile.util.is_null_or_empty "$count_posts") == 1 ]] && count_posts="0" || count_posts="$(atfile.util.fmt_int "$count_posts")" 70 71 [[ $(atfile.util.is_null_or_empty "$handle") == 1 ]] && handle="handle.invalid" 71 72 [[ $(atfile.util.is_null_or_empty "$name") == 1 ]] && name="$handle" 72 73 ··· 78 79 \e[37m$(atfile.util.repeat_char "-" $name_length)\e[0m 79 80 $bio_formatted \e[37m$(atfile.util.repeat_char "-" 3)\e[0m 80 81 ๐Ÿ”Œ @$handle โˆ™ #๏ธโƒฃ $did 81 - โฌ‡๏ธ $count_followers $(atfile.util.get_int_suffix $count_followers "\e[37mFollower\e[0m" "\e[37mFollowers\e[0m") โˆ™ โฌ†๏ธ $count_following \e[37mFollowing\e[0m โˆ™ โญ๏ธ $count_likes \e[37mLikes\e[0m 82 - ๐Ÿ“ƒ $count_posts $(atfile.util.get_int_suffix $count_followers "\e[37mPost\e[0m" "\e[37mPosts\e[0m") โˆ™ โš™๏ธ $count_feeds $(atfile.util.get_int_suffix $count_feeds "\e[37mFeed\e[0m" "\e[37mFeeds\e[0m") โˆ™ ๐Ÿ“‹ $count_lists $(atfile.util.get_int_suffix $count_lists "\e[37mList\e[0m" "\e[37mLists\e[0m") โˆ™ ๐Ÿ‘ฅ $count_packs $(atfile.util.get_int_suffix $count_packs "\e[37mPack\e[0m" "\e[37mPacks\e[0m") 82 + โฌ‡๏ธ $count_followers $(atfile.util.get_int_suffix "$count_followers" "\e[37mFollower\e[0m" "\e[37mFollowers\e[0m") โˆ™ โฌ†๏ธ $count_following \e[37mFollowing\e[0m โˆ™ โญ๏ธ $count_likes $(atfile.util.get_int_suffix "$count_likes" "\e[37mLike\e[0m" "\e[37mLikes\e[0m") 83 + ๐Ÿ“ƒ $count_posts $(atfile.util.get_int_suffix "$count_followers" "\e[37mPost\e[0m" "\e[37mPosts\e[0m") โˆ™ โš™๏ธ $count_feeds $(atfile.util.get_int_suffix "$count_feeds" "\e[37mFeed\e[0m" "\e[37mFeeds\e[0m") โˆ™ ๐Ÿ“‹ $count_lists $(atfile.util.get_int_suffix "$count_lists" "\e[37mList\e[0m" "\e[37mLists\e[0m") โˆ™ ๐Ÿ‘ฅ $count_packs $(atfile.util.get_int_suffix "$count_packs" "\e[37mPack\e[0m" "\e[37mPacks\e[0m") 83 84 $type โˆ™ โœจ $date_created โˆ™ ๐Ÿ•ท๏ธ $date_indexed 84 85 \e[37m$(atfile.util.repeat_char "-" 3)\e[0m 85 86 ๐Ÿฆ‹ https://bsky.app/profile/$actor\n"