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

Configure Feed

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

main โž” dev

Ducky 998c825f 732d49c8

+26 -20
+1
.vscode/settings.json
··· 5 5 "bsky", 6 6 "choo", 7 7 "devel", 8 + "didplc", 8 9 "exiftool", 9 10 "feedgens", 10 11 "jetstream",
+1 -1
atfile-install.sh
··· 38 38 v_major="$(printf "%04d\n" "$(echo "$version" | cut -d "." -f 1)")" 39 39 v_minor="$(printf "%04d\n" "$(echo "$version" | cut -d "." -f 2)")" 40 40 v_rev="$(printf "%04d\n" "$(echo "$version" | cut -d "." -f 3)")" 41 - echo "$(echo "${v_major}${v_minor}${v_rev}" | sed 's/^0*//')" 41 + echo "${v_major}${v_minor}${v_rev}" | sed 's/^0*//' 42 42 } 43 43 44 44 function xrpc_get() {
+1 -1
atfile.sh
··· 44 44 author="zio" 45 45 did="did:web:zio.sh" 46 46 repo="https://tangled.sh/@zio.sh/atfile" 47 - version="0.10.11" 47 + version="0.11" 48 48 year="$(date +%Y)" 49 49 50 50 # Entry
+3 -3
src/commands/old_cmds.sh
··· 294 294 handler="$2" 295 295 296 296 function atfile.invoke.handle_atfile.is_temp_file_needed() { 297 - handler="$(echo "$1" | sed s/.desktop$//g)" 297 + handler="${1//.desktop/}" 298 298 type="$2" 299 299 300 300 handlers=( ··· 346 346 # shellcheck disable=SC2319 347 347 # shellcheck disable=SC2181 348 348 if [[ -n $handler ]] || [[ $? != 0 ]]; then 349 - atfile.say.debug "Opening '$key' ($file_type) with '$(echo "$handler" | sed s/.desktop$//g)'..." 349 + atfile.say.debug "Opening '$key' ($file_type) with '${handler//.desktop/}'..." 350 350 351 351 # HACK: Some apps don't like http(s)://; we'll need to handle these 352 352 if [[ $(atfile.invoke.handle_atfile.is_temp_file_needed "$handler" "$file_type") == 1 ]]; then ··· 742 742 if [[ -n $recipient ]]; then 743 743 file_type="application/prs.atfile.gpg-crypt" 744 744 elif [[ "$file_type" == "application/"* ]]; then 745 - file_extension="$(echo "$file_name" | sed 's:.*\.::')" 745 + file_extension="${file_name##*.}" 746 746 747 747 case "$file_extension" in 748 748 "car") file_type="application/prs.atfile.car" ;;
+6 -4
src/commands/release.sh
··· 70 70 fi 71 71 72 72 if [[ $line == *"# shellcheck disable"* ]]; then 73 - include_line=1 74 - (( test_ignore_count++ )) 73 + if [[ $line == *"=SC2154"* ]]; then 74 + include_line=0 75 + else 76 + include_line=1 77 + (( test_ignore_count++ )) 78 + fi 75 79 fi 76 80 77 81 if [[ $include_line == 1 ]]; then ··· 94 98 echo -e "\n# \"Four million lines of BASIC\"\n# - Kif Kroker (3003)" >> "$dist_path" 95 99 96 100 checksum="$(atfile.util.get_md5 "$dist_path")" 97 - 98 - echo "$dist_path" 99 101 100 102 echo "๐Ÿงช Testing..." 101 103 shellcheck_output="$(shellcheck --format=json "$dist_path" 2>&1)"
+1 -1
src/entry.sh
··· 212 212 213 213 if [[ $is_os_supported == 0 ]]; then 214 214 if [[ $_skip_unsupported_os_warn == 0 ]]; then 215 - atfile.die "Unsupported OS ($(echo "$_os" | sed s/unknown-//g))\nโ†ณ Set ${_envvar_prefix}_SKIP_UNSUPPORTED_OS_WARN=1 to ignore" 215 + atfile.die "Unsupported OS (${_os//unknown-/})\nโ†ณ Set ${_envvar_prefix}_SKIP_UNSUPPORTED_OS_WARN=1 to ignore" 216 216 else 217 217 atfile.say.debug "Skipping unsupported OS warning\nโ†ณ ${_envvar_prefix}_SKIP_UNSUPPORTED_OS_WARN is set ($_skip_unsupported_os_warn)" 218 218 fi
+3 -3
src/lexi/blue_zio_atfile.sh
··· 22 22 file="$1" 23 23 24 24 if [ ! -x "$(command -v mediainfo)" ]; then 25 - echo "$(blue.zio.atfile.meta__unknown "Unable to create record at time of upload (MediaInfo not installed)")" 25 + blue.zio.atfile.meta__unknown "Unable to create record at time of upload (MediaInfo not installed)" 26 26 return 27 27 fi 28 28 ··· 74 74 file="$1" 75 75 76 76 if [ ! -x "$(command -v exiftool)" ]; then 77 - echo "$(blue.zio.atfile.meta__unknown "Unable to create record during upload (ExifTool not installed)")" 77 + blue.zio.atfile.meta__unknown "Unable to create record during upload (ExifTool not installed)" 78 78 return 79 79 fi 80 80 ··· 144 144 file="$1" 145 145 146 146 if [ ! -x "$(command -v mediainfo)" ]; then 147 - echo "$(blue.zio.atfile.meta__unknown "Unable to create record during upload (MediaInfo not installed)")" 147 + blue.zio.atfile.meta__unknown "Unable to create record during upload (MediaInfo not installed)" 148 148 return 149 149 fi 150 150
+3 -2
src/shared/say.sh
··· 10 10 11 11 prefix_length=0 12 12 13 + # shellcheck disable=SC2154 13 14 if [[ $_os == "haiku" ]]; then 14 - message="$(echo "$message" | sed 's/โ†ณ/>/g')" 15 + message="${message//โ†ณ/>}" 15 16 fi 16 17 17 18 [[ -z $color_prefix_message ]] && color_prefix_message=0 ··· 40 41 fi 41 42 fi 42 43 43 - message="$(echo "$message" | sed -e "s|\\\n|\\\n$(atfile.util.repeat_char " " "$prefix_length")|g")" 44 + message="${message//\\n/\\n$(atfile.util.repeat_char " " "$prefix_length")}" 44 45 45 46 echo -n -e "${prefix}${color_message}$message\033[0m${suffix}" 46 47 }
+7 -5
src/shared/util.sh
··· 260 260 curl -H "User-Agent: $(atfile.util.get_uas)" -s -L -X GET "$endpoint/$actor" 261 261 } 262 262 263 + # shellcheck disable=SC2154 263 264 didplc_endpoint="$_endpoint_plc_directory" 264 265 didplc_doc="$(atfile.util.get_didplc_doc.request_doc "$didplc_endpoint" "$actor")" 265 266 266 267 if [[ "$didplc_doc" != "{"* ]]; then 268 + # shellcheck disable=SC2154 267 269 didplc_endpoint="$_endpoint_plc_directory_fallback" 268 270 didplc_doc="$(atfile.util.get_didplc_doc.request_doc "$didplc_endpoint" "$actor")" 269 271 fi 270 272 271 - echo "$(echo "$didplc_doc" | jq ". += {\"directory\": \"$didplc_endpoint\"}")" 273 + echo "$didplc_doc" | jq ". += {\"directory\": \"$didplc_endpoint\"}" 272 274 } 273 275 274 276 function atfile.util.get_didweb_doc_url() { 275 277 actor="$1" 276 - echo "https://$(echo "$actor" | sed "s/did:web://")/.well-known/did.json" 278 + echo "https://${actor//did:web:/}/.well-known/did.json" 277 279 } 278 280 279 281 function atfile.util.get_envvar() { ··· 502 504 input="$1" 503 505 index=$(( $2 + 1 )) 504 506 505 - echo "$(echo -e "$input" | sed -n "$(( index ))"p)" 507 + echo -e "$input" | sed -n "$(( index ))"p 506 508 } 507 509 508 510 function atfile.util.get_mediainfo_field() { ··· 771 773 found_line="$(grep "\b${variable}=" "$file")" 772 774 773 775 if [[ -n "$found_line" ]] && [[ ! "$found_line" == \#* ]]; then 774 - output="$(echo "$found_line" | sed "s|${variable}=||g")" 776 + output="${found_line#"${variable}"=}" 775 777 output="${output%\"}" 776 778 output="${output#\"}" 777 779 ··· 966 968 v_major="$(printf "%04d\n" "$(echo "$version" | cut -d "." -f 1)")" 967 969 v_minor="$(printf "%04d\n" "$(echo "$version" | cut -d "." -f 2)")" 968 970 v_rev="$(printf "%04d\n" "$(echo "$version" | cut -d "." -f 3)")" 969 - echo "$(echo "${v_major}${v_minor}${v_rev}" | sed 's/^0*//')" 971 + echo "${v_major}${v_minor}${v_rev}" | sed 's/^0*//' 970 972 } 971 973 972 974 function atfile.util.print_blob_url_output() {