Pushing everything
This commit is contained in:
10
scripts/pshell/CleanMarvelRivalsCrashReports.bat
Executable file
10
scripts/pshell/CleanMarvelRivalsCrashReports.bat
Executable file
@@ -0,0 +1,10 @@
|
||||
@echo off
|
||||
setlocal
|
||||
set "targetFolder=%LOCALAPPDATA%\Marvel\Saved\Crashes"
|
||||
|
||||
echo Deleting files in %targetFolder%
|
||||
del /q "%targetFolder%\*"
|
||||
|
||||
echo Done!
|
||||
endlocal
|
||||
pause
|
||||
@@ -5,7 +5,7 @@ filename=$1
|
||||
if [ -z "$filename" ]; then
|
||||
echo "You must provide a file for the script."
|
||||
echo "Example:"
|
||||
echo " `basename $0` foo.mp4"
|
||||
echo " $(basename $0) foo.mp4"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -14,6 +14,8 @@ if [ ! -f "$filename" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
friendly_filename=`sed -E 's/[^[:alnum:][:space:]]+/_/g' <<< "$filename"`
|
||||
friendly_filename=$(sed -E 's/[^[:alnum:][:space:]]+/_/g' <<<"$filename")
|
||||
|
||||
ffmpeg -i $filename -vframes 1 ${friendly_filename}-image.png
|
||||
command="ffmpeg -i $filename -vframes 1 ${friendly_filename}-image.png"
|
||||
echo $command
|
||||
$command
|
||||
|
||||
@@ -1,19 +1,31 @@
|
||||
#!/bin/bash
|
||||
|
||||
show_help() {
|
||||
echo "Usage: $(basename $0) [--input|-i input_file] [--crop|-c width:height] [--trim-start start] [--trim-end end] [--crf crf_value] [--fps new_fps] [--scale new_video_resolution] [--merge-audio] [--remove-audio] --output|-o output_file"
|
||||
echo """Usage: $(basename $0) \
|
||||
[--input|-i input_file] \
|
||||
[--crop|-c width:height] \
|
||||
[--trim-start start] \
|
||||
[--trim-end end] \
|
||||
[--crf crf_value] \
|
||||
[--fps new_fps] \
|
||||
[--scale new_video_resolution] \
|
||||
[--merge-audio] \
|
||||
[--remove-audio] \
|
||||
[--volume-multiplier] \
|
||||
--output|-o output_file"""
|
||||
echo "Options:"
|
||||
echo " --input|-i Specify the input video file (required)."
|
||||
echo " --crop|-c Specify the width:height for video cropping."
|
||||
echo " --trim-start Specify the start timestamp for video trimming."
|
||||
echo " --trim-end Specify the end timestamp for video trimming."
|
||||
echo " --crf Specify the CRF value for video compressing."
|
||||
echo " --fps Specify the new frames per second for the video."
|
||||
echo " --scale Scale the video to a new resolution."
|
||||
echo " --merge-audio Merge all audio tracks into the main track."
|
||||
echo " --remove-audio Suppress all audio and remove audio tracks."
|
||||
echo " --audio-track-no Selects a specific audio track for the output"
|
||||
echo " --output|-o Specify the output filename (required)."
|
||||
echo " --input|-i Specify the input video file (required)."
|
||||
echo " --crop|-c Specify the width:height for video cropping."
|
||||
echo " --trim-start Specify the start timestamp for video trimming."
|
||||
echo " --trim-end Specify the end timestamp for video trimming."
|
||||
echo " --crf Specify the CRF value for video compressing."
|
||||
echo " --fps Specify the new frames per second for the video."
|
||||
echo " --scale Scale the video to a new resolution."
|
||||
echo " --merge-audio Merge all audio tracks into the main track."
|
||||
echo " --remove-audio Suppress all audio and remove audio tracks."
|
||||
echo " --volume-multiplier Changes the video's volume with a multiplier."
|
||||
echo " --audio-track-no Selects a specific audio track for the output"
|
||||
echo " --output|-o Specify the output filename (required)."
|
||||
}
|
||||
|
||||
remove_audio() {
|
||||
@@ -37,6 +49,7 @@ new_fps=""
|
||||
scale=""
|
||||
merge_audio=false
|
||||
remove_audio=false
|
||||
volume_multiplier=""
|
||||
audio_track_no=1
|
||||
output_file=""
|
||||
|
||||
@@ -82,6 +95,10 @@ while [ "$#" -gt 0 ]; do
|
||||
remove_audio=true
|
||||
shift
|
||||
;;
|
||||
--volume-multiplier)
|
||||
volume_multiplier="$2"
|
||||
shift 2
|
||||
;;
|
||||
--audio-track-no)
|
||||
audio_track_no="$2"
|
||||
shift
|
||||
@@ -104,7 +121,7 @@ if [ -z "$output_file" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$crop" ] && [ -z "$trim_start" ] && [ -z "$trim_end" ] && [ -z "$crf" ] && [ -z "$new_fps" ] && [ "$merge_audio" = false ] && [ -z "$scale" ] && [ "$remove_audio" = false ]; then
|
||||
if [ -z "$crop" ] && [ -z "$trim_start" ] && [ -z "$trim_end" ] && [ -z "$crf" ] && [ -z "$new_fps" ] && [ "$merge_audio" = false ] && [ -z "$scale" ] && [ "$remove_audio" = false ] && [ -z "$volume_multiplier" ]; then
|
||||
echo "Error: At least one optional parameter is required."
|
||||
exit 1
|
||||
fi
|
||||
@@ -171,6 +188,10 @@ if [ -n "$scale" ]; then
|
||||
ffmpeg_command+=" -s $scale"
|
||||
fi
|
||||
|
||||
if [ -n "$volume_multiplier" ]; then
|
||||
ffmpeg_command+=" -filter:a \"volume=$volume_multiplier\""
|
||||
fi
|
||||
|
||||
if [ "$merge_audio" = true ]; then
|
||||
num_audio_streams=$(ffprobe -loglevel error -select_streams a -show_entries stream=codec_type -of csv=p=0 "$input_file" | wc -l)
|
||||
ffmpeg_command+=" -filter_complex amerge=inputs=$num_audio_streams"
|
||||
|
||||
@@ -229,7 +229,7 @@ show_folder_selection_list_and_fill_selected_folder_variable() {
|
||||
existing_folders=()
|
||||
|
||||
fill_existing_folders_array() {
|
||||
ignore_paths=("artists" "kinks" "ideas" "irl")
|
||||
ignore_paths=("artists" "kinks" "ideas")
|
||||
ignore_paths_depth_2=("artists" "favorites")
|
||||
ignore_paths_depth_last=("no-source" ".bsky.social")
|
||||
|
||||
|
||||
3
scripts/shell/poetryRunDev.sh
Executable file
3
scripts/shell/poetryRunDev.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
poetry run python main.py
|
||||
4
scripts/shell/poetryRunEditor.sh
Executable file
4
scripts/shell/poetryRunEditor.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
. $(poetry env info --path)/bin/activate
|
||||
$EDITOR
|
||||
@@ -1,8 +1,8 @@
|
||||
SCRCPY_PATH="/mnt/e/programs/scrcpy-win64-v2.5"
|
||||
SCRCPY_PATH="/mnt/e/programs/scrcpy-win64-v2.7"
|
||||
|
||||
if [ ! -d "$SCRCPY_PATH" ]; then
|
||||
echo "The program's path does not exist ($SCRCPY_PATH)."
|
||||
exit 1
|
||||
echo "The program's path does not exist ($SCRCPY_PATH)."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
$SCRCPY_PATH/scrcpy.exe --turn-screen-off --stay-awake --power-off-on-close --max-size=1024
|
||||
$SCRCPY_PATH/scrcpy.exe --turn-screen-off --stay-awake --power-off-on-close # --max-size=1024
|
||||
|
||||
Reference in New Issue
Block a user