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

Configure Feed

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

refactor debug/error messages to send to STDERR

Ducky 8d137a2d 9a3cabba

+4 -20
-2
src/commands/old_cmds.sh
··· 311 311 312 312 if [[ -n "$actor" && -n "$key" ]]; then 313 313 atfile.util.override_actor "$actor" 314 - atfile.util.print_override_actor_debug 315 314 316 315 atfile.say.debug "Getting record...\nโ†ณ NSID: $_nsid_upload\nโ†ณ Repo: $_username\nโ†ณ Key: $key" 317 316 record="$(com.atproto.repo.getRecord "$_username" "$_nsid_upload" "$key")" ··· 562 561 else 563 562 if [[ $username != $_username ]]; then 564 563 atfile.util.override_actor "$username" 565 - atfile.util.print_override_actor_debug 566 564 fi 567 565 fi 568 566
-1
src/commands/update.sh
··· 30 30 update_did="$_dist_username" 31 31 32 32 atfile.util.override_actor "$update_did" 33 - atfile.util.print_override_actor_debug 34 33 35 34 atfile.say.debug "Getting latest release..." 36 35 latest_release_record="$(com.atproto.repo.getRecord "$update_did" "self.atfile.latest" "self")"
-8
src/entry.sh
··· 318 318 "bsky"|"fyi") 319 319 if [[ -z "$2" ]]; then 320 320 atfile.util.override_actor "$_username" 321 - atfile.util.print_override_actor_debug 322 321 atfile.profile "$_command" "$_username" 323 322 else 324 323 atfile.profile "$_command" "$2" ··· 331 330 [[ -z "$2" ]] && atfile.die "<key> not set" 332 331 if [[ -n "$3" ]]; then 333 332 atfile.util.override_actor "$3" 334 - atfile.util.print_override_actor_debug 335 333 fi 336 334 337 335 atfile.invoke.print "$2" ··· 344 342 [[ -z "$2" ]] && atfile.die "<key> not set" 345 343 if [[ -n "$3" ]]; then 346 344 atfile.util.override_actor "$3" 347 - atfile.util.print_override_actor_debug 348 345 fi 349 346 350 347 atfile.invoke.download "$2" ··· 354 351 [[ -z "$2" ]] && atfile.die "<key> not set" 355 352 if [[ -n "$3" ]]; then 356 353 atfile.util.override_actor "$3" 357 - atfile.util.print_override_actor_debug 358 354 fi 359 355 360 356 atfile.invoke.download "$2" 1 ··· 387 383 [[ -z "$2" ]] && atfile.die "<key> not set" 388 384 if [[ -n "$3" ]]; then 389 385 atfile.util.override_actor "$3" 390 - atfile.util.print_override_actor_debug 391 386 fi 392 387 393 388 atfile.invoke.get "$2" ··· 399 394 # BUG: Keys with periods in them can't be used as a cursor 400 395 401 396 atfile.util.override_actor "$2" 402 - atfile.util.print_override_actor_debug 403 397 404 398 atfile.invoke.list "$3" 405 399 else 406 400 if [[ -n "$3" ]]; then 407 401 atfile.util.override_actor "$3" 408 - atfile.util.print_override_actor_debug 409 402 fi 410 403 atfile.invoke.list "$2" 411 404 fi ··· 470 463 [[ -z "$2" ]] && atfile.die "<key> not set" 471 464 if [[ -n "$3" ]]; then 472 465 atfile.util.override_actor "$3" 473 - atfile.util.print_override_actor_debug 474 466 fi 475 467 476 468 atfile.invoke.get_url "$2"
+2 -2
src/shared/say.sh
··· 44 44 message="$1" 45 45 46 46 if [[ $_debug == 1 ]]; then 47 - atfile.say "$message" "Debug" 35 47 + atfile.say "$message" "Debug" 35 >&2 48 48 fi 49 49 } 50 50 51 51 function atfile.say.die() { 52 52 message="$1" 53 - atfile.say "$message" "Error" 31 31 1 53 + atfile.say "$message" "Error" 31 31 1 >&2 54 54 } 55 55 56 56 function atfile.say.inline() {
+2 -7
src/shared/util.sh
··· 921 921 if [[ "$_fmt_blob_url" != "$_fmt_blob_url_default" ]]; then 922 922 export _fmt_blob_url="$_fmt_blob_url_default" 923 923 fi 924 + 925 + atfile.say.debug "Overridden identity\nโ†ณ DID: $_username\nโ†ณ PDS: $_server\nโ†ณ Blob URL: $_fmt_blob_url" 924 926 } 925 927 926 928 # NOTE: This is to help during sourcing if atfile.uitl.override_actor() has ··· 970 972 โ•‘ Do not upload copyrighted files! โ•‘ 971 973 โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•" 972 974 fi 973 - } 974 - 975 - # HACK: We don't normally atfile.say() in the atfile.util.* namespace, but 976 - # atfile.until.override_actor() is in this namespace and it would be nice 977 - # to have a debug output for it when called in the main command case 978 - function atfile.util.print_override_actor_debug() { 979 - atfile.say.debug "Overridden identity\nโ†ณ DID: $_username\nโ†ณ PDS: $_server\nโ†ณ Blob URL: $_fmt_blob_url" 980 975 } 981 976 982 977 function atfile.util.print_seconds_since_start_debug() {