This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Small script to delete all archives in the given vault | |
# Based on https://docs.aws.amazon.com/amazonglacier/latest/dev/deleting-an-archive-using-cli.html | |
# Setup: account-id and vault-name | |
account=${1:-882328332680} | |
vault=${2:-DS216J_001132719CB4_1} | |
# Start the job to retrieve archive ids |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Example: ~/tvshows.sh (from within the desired folder) | |
ext=( *.mkv ) | |
for e in "${ext[@]}" | |
do | |
for f in "$e" | |
do | |
if [ -f "$f" ]; then | |
episode=`echo "$f" | grep -oP 'S[0-9]{2}E[0-9]{2}'` | |
echo "Processing $episode" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Example: ~/tvshow.sh file-without-extention mkv mp4 | |
input="$1.$2" | |
output="$1.$3" | |
echo "$input --> $output" | |
if [ -f "$input" ]; | |
then | |
ffmpeg -hide_banner -i "$input" -map 0:v -c:v copy -map 0:a -c:a copy -map 0:a:0 -c:a:0 aac -map 0:s -c:s mov_text -map_metadata 0 -movflags +faststart "$output" && \ | |
rm "$input" | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ -z "$1" ]; then | |
echo "Need to pass the year to process" | |
else | |
YEAR=$1 | |
echo "Processing year $YEAR" | |
for f in $(ls $YEAR.7z.*) | |
do | |
echo "Uploading $f" | |
rclone --config ~/.config/rclone/rclone.conf copy --progress $f 1and1:/Pictures/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ -z "$1" ]; then | |
echo "Need to pass the folder to process (year)" | |
elif [ ! -d "$1" ]; then | |
echo "Invalid folder: $1" | |
else | |
echo "Processing $1" | |
echo "Zipping..." | |
DOSSIER=$1 | |
7za a -xr@${HOME}/exclude.txt -m0=Copy -v1000M $DOSSIER.7z $DOSSIER |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/volume1/@appstore/python3/bin/python3 | |
import logging | |
import os | |
import sys | |
from os.path import join | |
import subprocess | |
import locale | |
import requests # not standard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/volume1/@appstore/python3/bin/python3 | |
import logging | |
import os | |
import subprocess | |
from os import listdir | |
from os.path import isfile, join | |
from xml.dom import minidom | |
import locale |