# I am the Watcher. I am your guide through this vast new twtiverse.
# 
# Usage:
#     https://watcher.sour.is/api/plain/users              View list of users and latest twt date.
#     https://watcher.sour.is/api/plain/twt                View all twts.
#     https://watcher.sour.is/api/plain/mentions?uri=:uri  View all mentions for uri.
#     https://watcher.sour.is/api/plain/conv/:hash         View all twts for a conversation subject.
# 
# Options:
#     uri     Filter to show a specific users twts.
#     offset  Start index for quey.
#     limit   Count of items to return (going back in time).
# 
# twt range = 1 15
# self = https://watcher.sour.is/conv/mlrqpsq
For compiling mkws's binaries on OpenBSD and Linux I run a set of commands via ssh, create a binary archive, pipe it to uuencode on the remote server and pipe it back to uudecode locally. Great use case for uuencode and uudecode pair.
@adi Why do you even need to encode it? 🤔
@adi Why do you even need to encode it? 🤔
@prologic Because I'm outputting it as "plain text".


ssh -T "$1" << EOF | uudecode
>&2 printf "Packing for %s\\n" "\$(uname)"
trap "rm -rf $tmp" EXIT INT HUP TERM
cd "$tmp"
...
f=mkws-"\$(uname | tr '[:upper:]' '[:lower:]')"@"$(echo "$5"| tr _ .)".tgz
tar -czf - ws.sh|uuencode "\$f"
>&2 printf "Writing %s\\n" "\$f"
EOF
}
@prologic Because I'm outputting it as "plain text". \n\n
\nssh -T "$1" << EOF | uudecode\n>&2 printf "Packing for %s\\\\n" "\\$(uname)"\ntrap "rm -rf $tmp" EXIT INT HUP TERM\ncd "$tmp"\n...\nf=mkws-"\\$(uname | tr '[:upper:]' '[:lower:]')"@"$(echo "$5"| tr _ .)".tgz\ntar -czf - ws.sh|uuencode "\\$f"\n>&2 printf "Writing %s\\\\n" "\\$f"\nEOF\n}\n
@prologic Because I'm outputting it as "plain text". \n\n
\nssh -T "$1" << EOF | uudecode\n>&2 printf "Packing for %s\\\\n" "\\$(uname)"\ntrap "rm -rf $tmp" EXIT INT HUP TERM\ncd "$tmp"\n...\nf=mkws-"\\$(uname | tr '[:upper:]' '[:lower:]')"@"$(echo "$5"| tr _ .)".tgz\ntar -czf - ws.sh|uuencode "\\$f"\n>&2 printf "Writing %s\\\\n" "\\$f"\nEOF\n}\n
@adi I see
@adi I see
@prologic Also check out:\n\n
\ntar -czf - ws.sh|uuencode "\\$f"\n>&2 printf "Writing %s\\\\n" "\\$f"\n
\n\n>&2 printf "Writing %s\\\\n" "\\$f" goes to stderr and doesn't interfere with uuencode which is getting it's input from stdout.
@prologic Also check out:


tar -czf - ws.sh|uuencode "\$f"
>&2 printf "Writing %s\\n" "\$f"


>&2 printf "Writing %s\\n" "\$f" goes to stderr and doesn't interfere with uuencode which is getting it's input from stdout.
@prologic Also check out:\n\n
\ntar -czf - ws.sh|uuencode "\\$f"\n>&2 printf "Writing %s\\\\n" "\\$f"\n
\n\n>&2 printf "Writing %s\\\\n" "\\$f" goes to stderr and doesn't interfere with uuencode which is getting it's input from stdout.
@prologic Also check out:\n\n
\ntar -czf - ws.sh|uuencode "\\$f"\n>&2 printf "Writing %s\\\\n" "\\$f"\n
\n\n>&2 printf "Writing %s\\\\n" "\\$f" goes to stderr and doesn't interfere with uudecode which is getting it's input from stdout.
@prologic @adi Can't edit, uudecode not uuencode, this one:\n\n
\nssh -T "$1" << EOF | uudecode\n
@prologic @adi Can't edit, uudecode not uuencode, this one:


ssh -T "$1" << EOF | uudecode
@prologic @adi Can't edit, uudecode not uuencode, this one:\n\n
\nssh -T "$1" << EOF | uudecode\n