initital upload
This commit is contained in:
3
.config
Normal file
3
.config
Normal file
@@ -0,0 +1,3 @@
|
||||
IN=/Transcode
|
||||
MOVIES=/Video/Spielfilme
|
||||
SHOWS=/Video/Serien
|
||||
11
backup
Normal file
11
backup
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
#Creates a backup of all Docker-Volumes and pushes them to G-Drive
|
||||
#
|
||||
|
||||
cd /Docker
|
||||
for verz in $(ls -d1)
|
||||
do
|
||||
tar -cvzf $verz.tar.gz $verz
|
||||
done
|
||||
|
||||
rclone move /Docker/*.tar.gz gdrive:/Backup --verbose --transfers 4 --checkers 20 --stats 10s
|
||||
9
clean_docker
Executable file
9
clean_docker
Executable file
@@ -0,0 +1,9 @@
|
||||
for cont in $(docker ps --all -q)
|
||||
do
|
||||
docker rm $cont
|
||||
done
|
||||
|
||||
for image in $(docker images -q)
|
||||
do
|
||||
docker rmi $image
|
||||
done
|
||||
12
crypto
Executable file
12
crypto
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
sleep 2
|
||||
case $1 in
|
||||
|
||||
start) gocryptfs -passfile /root/enc-pwd /mnt/G-Cache/Video /mnt/Video;
|
||||
gocryptfs -passfile /root/enc-pwd /crypt/output /crypt/input;
|
||||
unionfs -o cow /crypt/input=RW:/mnt/Video=RO /Video;;
|
||||
stop) umount /Video;
|
||||
umount /crypt/input;
|
||||
umount /mnt/Video;;
|
||||
|
||||
esac
|
||||
17
filecounter
Executable file
17
filecounter
Executable file
@@ -0,0 +1,17 @@
|
||||
basis=$1
|
||||
zaehler=0
|
||||
ls>/tmp/filelist.txt
|
||||
while read datei
|
||||
#for datei in "$(ls)"
|
||||
do
|
||||
let zaehler=$zaehler+1
|
||||
if [[ $zaehler -lt 10 ]]
|
||||
then
|
||||
mv "$datei" ${basis}0${zaehler}.counted 2>/dev/null
|
||||
echo "$datei --> ${basis}0${zaehler}.counted"
|
||||
else
|
||||
mv "$datei" ${basis}${zaehler}.counted 2>/dev/null
|
||||
echo "$datei --> ${basis}${zaehler}.counted"
|
||||
fi
|
||||
done < /tmp/filelist.txt
|
||||
rm /tmp/filelist.txt
|
||||
30
flush-scans
Executable file
30
flush-scans
Executable file
@@ -0,0 +1,30 @@
|
||||
if [ $# != 1 ]
|
||||
then
|
||||
user="marcus"
|
||||
else
|
||||
user=$1
|
||||
fi
|
||||
|
||||
ablage="/volume1/Ablage"
|
||||
jahr=$(date +'%Y')
|
||||
|
||||
cd $ablage
|
||||
if [ -e $ablage/input/stop ]
|
||||
then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
mkdir -pv $ablage/$user/$jahr
|
||||
mv input/*.pdf $ablage/$user/$jahr
|
||||
cd $ablage/$user/$jahr
|
||||
for datei in $(ls *.pdf)
|
||||
do
|
||||
verz=$(echo $datei|cut -d "_" -f1)
|
||||
mkdir -v $verz 2>/dev/null
|
||||
mv -v $datei $verz
|
||||
done
|
||||
rmdir *
|
||||
cd $ablage
|
||||
rm -Rvf input;mkdir input
|
||||
date > input/stop
|
||||
11
flush-skunk
Executable file
11
flush-skunk
Executable file
@@ -0,0 +1,11 @@
|
||||
cd /volume1/Skunk/tmp
|
||||
if [[ -s stop ]]
|
||||
then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
mv *.mp4 ../XpliciteArt
|
||||
/var/services/homes/marcus/CloudStation/scripts/sort-skunk /volume1/Skunk/XpliciteArt
|
||||
mv /volume1/Skunk/XpliciteArt/*.mp4 .
|
||||
rmdir /volume1/Skunk/XpliciteArt/*
|
||||
echo "Lastrun $(date)" > stop
|
||||
21
flush_doku
Executable file
21
flush_doku
Executable file
@@ -0,0 +1,21 @@
|
||||
cd /Archiv/Video/Dokus || mkdir -pv /Archiv/Video/Dokus
|
||||
cd /Archiv/Video/Dokus
|
||||
clear
|
||||
echo "============== Doku Files ======================"
|
||||
echo "Name der Dokumentation?:"
|
||||
read doku
|
||||
echo "Suffix?"
|
||||
read suffix
|
||||
cd /Volumes/Video/Transcode
|
||||
|
||||
if [ -d /Volumes/Video/Dokus/${doku} ]
|
||||
then
|
||||
/Users/marcus/skripte/filecounter zzz_Teil
|
||||
mv -v /Volumes/Video/Dokus/${doku}/* .
|
||||
else
|
||||
mkdir -pv /Volumes/Video/Dokus/${doku}
|
||||
fi
|
||||
|
||||
/Users/marcus/skripte/filecounter Teil
|
||||
/Users/marcus/skripte/mvext counted $suffix
|
||||
mv -v * /Volumes/Video/Dokus/${doku}
|
||||
24
flush_movies
Executable file
24
flush_movies
Executable file
@@ -0,0 +1,24 @@
|
||||
. /root/bin/.config
|
||||
cd $IN
|
||||
counter=0
|
||||
until [ $counter = 64 ]
|
||||
do
|
||||
let counter=$counter+1
|
||||
rename " " "_" *
|
||||
done
|
||||
|
||||
clear
|
||||
echo "============== Video Files ====================="
|
||||
echo
|
||||
ls -lh
|
||||
|
||||
for datei in $(ls )
|
||||
do
|
||||
echo $datei
|
||||
read zielname
|
||||
if [ $zielname != "x" ]
|
||||
then
|
||||
mv -v $datei $MOVIES/$zielname
|
||||
fi
|
||||
done
|
||||
|
||||
28
flush_season
Executable file
28
flush_season
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
. /root/bin/.config
|
||||
cd $SHOWS || mkdir -pv $SHOWS
|
||||
cd $SHOWS
|
||||
clear
|
||||
echo "============== Episode Files ==================="
|
||||
ls
|
||||
cd $IN
|
||||
echo Name der Serie?:
|
||||
read serie
|
||||
clear
|
||||
ls -d $SHOWS/${serie}/* 2>/dev/null && echo
|
||||
echo Nummer der Staffel?:
|
||||
read season
|
||||
echo Dateiendung?
|
||||
read suffix
|
||||
|
||||
if [ -d $SHOWS/${serie}/Season_${season} ]
|
||||
then
|
||||
/root/bin/filecounter zzz_${serie}_${season}x
|
||||
mv -v * $SHOWS/${serie}/Season_${season}
|
||||
else
|
||||
mkdir -pv $SHOWS/${serie}/Season_${season}
|
||||
mv -v * $SHOWS/${serie}/Season_${season}
|
||||
fi
|
||||
cd $SHOWS/${serie}/Season_${season}
|
||||
/root/bin/filecounter ${serie}_${season}x
|
||||
/root/bin/mvext counted $suffix
|
||||
34
flush_video
Executable file
34
flush_video
Executable file
@@ -0,0 +1,34 @@
|
||||
. /root/bin/.config
|
||||
cd $IN
|
||||
until diff /tmp/now /tmp/then
|
||||
do
|
||||
ls > /tmp/now
|
||||
find . > filelist.txt
|
||||
while read datei
|
||||
do
|
||||
mv "$datei" .
|
||||
done < filelist.txt
|
||||
rm filelist.txt
|
||||
rm -i *ample*
|
||||
rm -v *.URL *.ini *.doc *.png *.txt *.jpg *.sfv *.srt *.nfo *.sub *.idx *.txt *.url 2>/dev/null
|
||||
rm -v $(find . -name .DS_Store) 2>/dev/null
|
||||
rmdir *
|
||||
ls > /tmp/then
|
||||
done
|
||||
rm /tmp/now /tmp/then
|
||||
clear
|
||||
echo "============== Video Files ====================="
|
||||
ls -lh
|
||||
echo
|
||||
ls -lh|wc -l
|
||||
echo
|
||||
echo "m=Spielfime d=Dokus s=Serien"
|
||||
read auswahl
|
||||
|
||||
case $auswahl in
|
||||
|
||||
m) /root/bin/flush_movies;;
|
||||
d) /root/bin/flush_doku;;
|
||||
s) /root/bin/flush_season;;
|
||||
|
||||
esac
|
||||
9
mvext
Executable file
9
mvext
Executable file
@@ -0,0 +1,9 @@
|
||||
alt=$1
|
||||
neu=$2
|
||||
|
||||
for datei in $(ls *.${alt})
|
||||
do
|
||||
name=$(echo $datei|cut -d "." -f1)
|
||||
ziel=$(echo ${name}.${neu})
|
||||
mv $datei $ziel
|
||||
done
|
||||
2
push_gdrive
Executable file
2
push_gdrive
Executable file
@@ -0,0 +1,2 @@
|
||||
rclone move /crypt/output gdrive:/Video --verbose --transfers 4 --checkers 20 --stats 10s
|
||||
cp /mnt/G-Cache/Video/gocrypt* /crypt/output
|
||||
31
sort-skunk
Executable file
31
sort-skunk
Executable file
@@ -0,0 +1,31 @@
|
||||
if [[ $# -lt 1 ]]
|
||||
then
|
||||
echo "Usage: $0 Basedirectory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
base=$1
|
||||
cd $base
|
||||
ls -1 *.mp4 > filelist.txt
|
||||
while read datei
|
||||
do
|
||||
folder=$(echo $datei|cut -d "-" -f1|cut -d " " -f1-$(echo $datei|cut -d "-" -f1|wc -w))
|
||||
mkdir -v "$folder" 2>/dev/null
|
||||
mv -v "${folder}"*.mp4 "$folder"
|
||||
done < filelist.txt
|
||||
rm filelist.txt
|
||||
|
||||
ls -1 |grep -v mp4 > dirlist.txt
|
||||
while read folder
|
||||
do
|
||||
cd "$folder"
|
||||
ls -1 "$folder"*.mp4>filelist.txt
|
||||
while read datei
|
||||
do
|
||||
newname=$(echo $datei|cut -d "-" -f2-99|cut -d " " -f2-99)
|
||||
mv "$datei" "$newname"
|
||||
done < filelist.txt
|
||||
rm filelist.txt
|
||||
cd $base
|
||||
done < dirlist.txt
|
||||
rm dirlist.txt
|
||||
Reference in New Issue
Block a user