bash scripts i use these days
This commit is contained in:
parent
f9f45cf1fc
commit
92b37b7730
26
bash/dl.sh
Executable file
26
bash/dl.sh
Executable file
@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
starttime=$(date)
|
||||
yt-dlp --output "%(upload_date)s - %(title)s - [%(id)s].%(ext)s" \
|
||||
--format "bv*[ext=mp4]+ba/best" \
|
||||
--sponsorblock-remove all \
|
||||
-a "$@" \
|
||||
--download-archive "done.txt"
|
||||
|
||||
for file in *.webm
|
||||
do
|
||||
#surely there's a smarter way to just download mp4? or just prefer not webm?
|
||||
ffmpeg -i "$file" "$file.mp4"
|
||||
#rm "$file"
|
||||
done
|
||||
|
||||
if [ $(wc -l < "$@") -eq $(wc -l < done.txt) ]
|
||||
then
|
||||
echo "looks like all downloads worked. :)"
|
||||
rm "$@"
|
||||
rm done.txt
|
||||
fi
|
||||
|
||||
echo "started $starttime"
|
||||
echo "completed $(date)"
|
||||
echo "(idk how to datemath)"
|
21
bash/fix_screenshot_names.sh
Executable file
21
bash/fix_screenshot_names.sh
Executable file
@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
# vlc MUST have a screenshot prefix. -_-
|
||||
|
||||
cd ~/Pictures/0/screenshots
|
||||
while :
|
||||
do
|
||||
sleep 600
|
||||
for i in ./*
|
||||
do
|
||||
if [[ "$i" == ./Screenshot_* ]]
|
||||
then
|
||||
mv "$i" "$(echo $i | sed 's/Screenshot_//')"
|
||||
fi
|
||||
|
||||
if [[ "$i" == ./vlcsnap-* ]]
|
||||
then
|
||||
mv "$i" "$(echo $i | sed 's/vlcsnap-//')"
|
||||
fi
|
||||
done
|
||||
done
|
10
bash/trashpurge.sh
Executable file
10
bash/trashpurge.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
# you'll need trash-cli
|
||||
while :
|
||||
do
|
||||
sleep 60
|
||||
trash-empty
|
||||
done
|
||||
|
||||
# for fuck's sake just stop with the goddamn trash
|
Loading…
Reference in New Issue
Block a user