A Collection Of Bash Memery
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
761 B

#!/bin/bash
# bedia
# By FrailLeaf (Soft Girl Inc.)
# Links you upload will be stored in $uploads, so you don't have to bother
# uploading again (Atleast for the time until server isn't reset)
#
# Dependencies:
# 1. sxiv
# TUTORIAL:
# >Run the script
# >Sxiv window opens with the $picture_dir
# >navigate sxiv window, and mark chosen pictures with 'm' key.
# >quit with 'q'
# >you have now uploaded your files.
picture_dir=~/Pictures
upload_list=/tmp/tmpupload
uploads=/tmp/ircuploads
host="https://f.ruina.exposed/upload/"
sxiv -to "$picture_dir" > "$upload_list"
{
date >> "$uploads"
while read file
do
uwu=$(curl -s -H "Linx-Expiry: 86400" -T "$file" "$host")
echo "$uwu"
echo "$uwu" >> "$uploads"
done
} < "$upload_list"
rm "$upload_list"