Compare commits

..
5 Commits
10 changed files with 152 additions and 3 deletions
Executable
+4
View File
@@ -0,0 +1,4 @@
for i;
do
openssl base64 -in "$i" -out "${i%.*}_base64.txt"
done
+10
View File
@@ -0,0 +1,10 @@
export IFS=$'\n';
for i;
do
newdir="$(basename "$i")"
mkdir ./"$newdir";
for j in $( find "$i" -iname *ogg -or -iname *m4v -or -iname *flac -or -iname *wav | sort );
do
ffmpeg -i "$j" -q 0 "$(basename "$i")/"$(basename "${j%.*}").mp3;
done
done
Executable
+4
View File
@@ -0,0 +1,4 @@
for i;
do
openssl base64 -d -in "$i" -out "${i%.*}.binary_file"
done
+4 -1
View File
@@ -3,6 +3,9 @@
#makine #makine
#wacom_id="Wacom Intuos Pro M Pen stylus" #wacom_id="Wacom Intuos Pro M Pen stylus"
#wacom_id=$(xsetwacom --list devices | grep stylus | grep -o [0-9]. | sed 's/\t//') #wacom_id=$(xsetwacom --list devices | grep stylus | grep -o [0-9]. | sed 's/\t//')
wacom_id=$(xsetwacom --list devices | grep stylus | grep 'id\: [0-9].' -o | grep [0-9]. -o) #wacom_id=$(xsetwacom --list devices | grep 'stylus' | grep 'id:.[0-9]' -o | grep '[0-9]' -o)
wacom_id=$(xsetwacom --list devices | grep 'stylus' | grep -E 'id:.[0-9]{1,3}' -o | grep -E '[0-9]{1,3}' -o)
xsetwacom --set "$(($wacom_id + 0))" button 2 3 xsetwacom --set "$(($wacom_id + 0))" button 2 3
xsetwacom --set "$(($wacom_id + 0))" button 3 2 xsetwacom --set "$(($wacom_id + 0))" button 3 2
xsetwacom --set "$(($wacom_id + 0))" threshold 50
+6
View File
@@ -0,0 +1,6 @@
for i;
do
search=$( exiftool -s3 -artist -title "$i" | xargs )
echo $search
syncedlyrics "$search" --synced-only -o "${i%.*}.lrc"
done
+73
View File
@@ -70,3 +70,76 @@ get_todays_review_folder (){
#get_todays_review_folder #get_todays_review_folder
###################################
#
##requires ffmpeg
#while getopts "s:b:r:" opt; do
# case ${opt} in
# s )
# size=$OPTARG
# sizealt=$(echo $size | sed 's/x/\:/')
# ;;
# b )
# vb=$OPTARG
# ;;
# r )
# fps=$OPTARG
# ;;
# \? )
# echo "Invalid option: $OPTARG" 1>&2
# ;;
# : )
# echo "Invalid option: $OPTARG requires an argument" 1>&2
# ;;
# esac
#done
#
#shift "$(($OPTIND -1))"
#
#g=6;
#color=999999;
#
#
#if [ -z "$fps" ]
#then
# r=59.9;
#else
# r=$fps;
#fi
#
#
#if [ -z "$size" ]
#then
# for i;
# do
# d=$(ffprobe -v error -select_streams v:0 -show_entries stream=duration -of default=noprint_wrappers=1:nokey=1 "$i");
# w=$(ffprobe -v error -select_streams v:0 -show_entries stream=width -of default=noprint_wrappers=1:nokey=1 "$i");
# h=$(ffprobe -v error -select_streams v:0 -show_entries stream=height -of default=noprint_wrappers=1:nokey=1 "$i");
# #ffmpeg -i "$i" -filter_complex "[0:v] fps=$fps [refpsd]; gradients=size="$w"x"$h":d=$d:c0=$color:c1=$color [box]; [refpsd] split [a][b];[a] palettegen [p];[box][b] overlay [overlayed];[overlayed][p] paletteuse" -q 0 -strict -2 -vb $vb -y ${i%.*}.gif ;
# ffmpeg -i "$i" -filter_complex "[0:v] fps=$fps [refpsd]; gradients=size="$w"x"$h":d=$d:c0=$color:c1=$color [box]; [refpsd] split [a][b];[a] palettegen=stats_mode=diff [p];[box][b] overlay [overlayed];[overlayed][p] paletteuse=dither=bayer:bayer_scale=2" -q 0 -strict -2 -vb $vb -y ${i%.*}.gif ;
# done;
#else
# for i;
# do
# echo $size
# d=$(ffprobe -v error -select_streams v:0 -show_entries stream=duration -of default=noprint_wrappers=1:nokey=1 "$i");
# #ffmpeg -i "$i" -filter_complex "[0:v] scale=$sizealt,fps=$fps [scaled]; gradients=size=$size:d=$d:c0=$color:c1=$color [box],[box][scaled] overlay [overlayed],[overlayed] split [i1][i2];[i1] palettegen [palette];[i2][palette] paletteuse" -q 0 -strict -2 -vb $vb -y ${i%.*}_$size.gif ;
# ffmpeg -i "$i" -filter_complex "[0:v] scale=$sizealt,fps=$fps [scaled]; gradients=size=$size:d=$d:c0=$color:c1=$color [box],[box][scaled] overlay [overlayed],[overlayed] split [i1][i2];[i1] palettegen=stats_mode=diff [palette];[i2][palette] paletteuse=dither=bayer:bayer_scale=2" -q 0 -strict -2 -vb $vb -y ${i%.*}_$size.gif ;
# done;
#fi
#
#
##/Volumes/pegasus/01_PROJECTS/18060_DSDC035_25_Days_Of_Christmas_2018/09_Graphics/05_Graphics_Output/01_GFX_Scenes/103018
#
#get_project_base () {
# dir=$(pwd)
# IFS='/' read -r a discs_root disc folder project a <<<"$dir"
# echo "/$discs_root/$disc/$folder/$project"
#}
#get_todays_review_folder (){
# base=$(get_project_base)
# review_folder=$(ls $base | grep -i review)
# echo $base/$review_folder
#}
#
##get_todays_review_folder
+28
View File
@@ -0,0 +1,28 @@
alpha="false"
while getopts "a" opt; do
case ${opt} in
a )
alpha="true"
;;
esac
done
shift "$(($OPTIND -1))"
for i;
do
echo $alpha
new_name=$(echo $i | sed -Er 's/\_(NL|PR)([_-])/\_VP9\2/');
if [ "$alpha" = "true" ]
then
ffmpeg -i "$i" -c:v libvpx-vp9 -pix_fmt yuva420p -b:v 0 -colorspace bt709 -color_trc bt709 -color_primaries bt709 -crf 10 -auto-alt-ref 0 "${new_name%.*}.webm" ##-vf "alphaextract" -c:v libvpx-vp9 -pix_fmt yuva420p -b:v 0 -colorspace bt709 -color_trc bt709 -color_primaries bt709 -crf 5 "${new_name%.*}_ALPHA.webm";
echo $new_name "w alpha"
else
ffmpeg -i "$i" -c:v libvpx-vp9 -pix_fmt yuv420p -b:v 0 -colorspace bt709 -color_trc bt709 -color_primaries bt709 -crf 10 "${new_name%.*}.webm";
echo $new_name
echo $new_name "no alpha"
fi
done;
+9
View File
@@ -0,0 +1,9 @@
for i;
do
pdf=$i
new_folder=${i%.*}
mkdir "$new_folder"
pdfimages "$i" -j "$new_folder"/page_
7z a -tzip "$new_folder".cbz "$new_folder"
rm -R "$pdf" "$new_folder"
done
+5 -2
View File
@@ -11,16 +11,19 @@ while getopts ":a" opt; do
esac esac
done done
format=bestvideo+bestaudio
export IFS=$'\n'; export IFS=$'\n';
for i; for i;
do do
#Audio--> #Audio-->
youtube-dl -x --audio-format vorbis --add-metadata --xattrs --embed-subs --embed-thumbnail --all-subs -o "%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s" -i -f bestaudio --audio-quality 192k "$i" #yt-dlp -x --audio-format vorbis --add-metadata --xattrs --embed-subs --embed-thumbnail --all-subs -o "%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s" -i -f bestaudio --audio-quality 192k "$i"
#youtube-dl --xattrs --embed-subs --embed-thumbnail --all-subs -o "%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s" -i -f bestaudio "$i" #youtube-dl --xattrs --embed-subs --embed-thumbnail --all-subs -o "%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s" -i -f bestaudio "$i"
#youtube-dl -o "%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s" -f $a "$i" #youtube-dl -o "%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s" -f $a "$i"
#youtube-dl --add-metadata --xattrs --embed-subs --embed-thumbnail --all-subs -o "%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s" -i -f bestvideo+bestaudio "$i" #youtube-dl --add-metadata --xattrs --embed-subs --embed-thumbnail --all-subs -o "%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s" -i -f bestvideo+bestaudio "$i"
#youtube-dl --add-metadata --xattrs --embed-subs --all-subs -o "%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s" -f bestvideo+bestaudio "$i" #youtube-dl --add-metadata --xattrs --embed-subs --all-subs -o "%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s" -f bestvideo+bestaudio "$i"
#VIDEO--> #VIDEO-->
#youtube-dl --add-metadata --xattrs --embed-subs --all-subs -o "%(playlist)s/%(playlist_index)s - %(title)s - %(format)s.%(ext)s" -i -f $format "$i" #yt-dlp --add-metadata --xattrs --embed-subs --all-subs -o "%(playlist)s/%(playlist_index)s - %(title)s - %(format)s.%(ext)s" -i -f $format "$i"
yt-dlp --add-metadata --xattrs --embed-subs --all-subs -o "%(playlist)s/%(playlist_index)s - %(title)s - %(format)s.%(ext)s" -i "$i"
done; done;
+9
View File
@@ -0,0 +1,9 @@
import json
import struct
with open("/yorchnet-guindos/ai/models/Lora/drawix8.safetensors", "rb") as f:
length_of_header = struct.unpack('<Q', f.read(8))[0]
header_data = f.read(length_of_header)
header = json.loads(header_data)
print(header) # should be a dict that contains what you need