From 751cb6abc85d758f4f6b100062b89f95b57cb5f9 Mon Sep 17 00:00:00 2001 From: Andros Fenollosa Date: Tue, 18 Apr 2023 12:56:23 +0200 Subject: [PATCH] Update files --- README.md | 41 +++++++++++++------ decompress.sh => dynamic-folder-decompress.sh | 0 ...file.sh => dynamic-folder-image-to-webp.sh | 0 ...-webp.sh => dynamic-folder-random-image.sh | 0 ...-image.sh => dynamic-folder-share-files.sh | 0 ...p4.sh => dynamic-folder-video-optimizer.sh | 4 +- high-battery.sh | 0 low-battery.sh | 0 send-my-inbox.sh | 1 - share-file.sh | 1 - 10 files changed, 30 insertions(+), 17 deletions(-) rename decompress.sh => dynamic-folder-decompress.sh (100%) rename download-file.sh => dynamic-folder-image-to-webp.sh (100%) rename image-to-webp.sh => dynamic-folder-random-image.sh (100%) rename random-image.sh => dynamic-folder-share-files.sh (100%) rename dynamic-video-to-mp4.sh => dynamic-folder-video-optimizer.sh (97%) delete mode 100644 high-battery.sh delete mode 100644 low-battery.sh delete mode 100644 send-my-inbox.sh delete mode 100644 share-file.sh diff --git a/README.md b/README.md index 58303a4..687697e 100644 --- a/README.md +++ b/README.md @@ -2,32 +2,47 @@ Collection of Bash scripts that execute functionalities in folders. -## Video to mp4 +## Video optmizer + +Folder that watches when new videos are added to a folder and optimizes them. + +### Requirements + +- `inotify-tools` +- `ffmpeg` + +Example in Debian. + +``` sh +sudo apt install inotify-tools ffmpeg +``` ### Install + +``` sh +curl -o dynamic-folders-video-optimizer https://raw.githubusercontent.com/tanrax/dynamic-folders/main/dynamic-folders-video-optimizer.sh && chmod +x dynamic-folders-video-optimizer && sudo mv dynamic-folders-video-optimizer /usr/local/bin +``` + ### Run +``` sh +dynamic-folders-video-optimizer [folder to watch] +``` + ### Service -```sh -wget /etc/systemd/system/github-runner-glosa.service -curl -o maza https://raw.githubusercontent.com/tanrax/maza-ad-blocking/master/maza && chmod +x maza && sudo mv maza /usr/local/bin -``` - ```ini [Unit] -Description=Github runner glosa -After=network.target +Description=Folder that watches when new videos are added to a folder and optimizes them. [Service] Restart=always RestartSec=5 -User=github -Group=github -Restart=always -WorkingDirectory=/home/github/actions-runner -ExecStart=/home/user/ +User=[user] +Group=[user] +WorkingDirectory=/home/[user] +ExecStart=dynamic-folders-video-optimizer [folder to watch] [Install] WantedBy=multi-user.target diff --git a/decompress.sh b/dynamic-folder-decompress.sh similarity index 100% rename from decompress.sh rename to dynamic-folder-decompress.sh diff --git a/download-file.sh b/dynamic-folder-image-to-webp.sh similarity index 100% rename from download-file.sh rename to dynamic-folder-image-to-webp.sh diff --git a/image-to-webp.sh b/dynamic-folder-random-image.sh similarity index 100% rename from image-to-webp.sh rename to dynamic-folder-random-image.sh diff --git a/random-image.sh b/dynamic-folder-share-files.sh similarity index 100% rename from random-image.sh rename to dynamic-folder-share-files.sh diff --git a/dynamic-video-to-mp4.sh b/dynamic-folder-video-optimizer.sh similarity index 97% rename from dynamic-video-to-mp4.sh rename to dynamic-folder-video-optimizer.sh index 07eb30b..f9dd87a 100755 --- a/dynamic-video-to-mp4.sh +++ b/dynamic-folder-video-optimizer.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # -- -# Description: Script that watches when new videos are added to a folder and optimizes them to mp4 for Web. +# Description: Script that watches when new videos are added to a folder and optimizes them. # -- # Requirements: Install inotify-tools and ffmpeg # Example Debian: $sudo apt install inotify-tools ffmpeg @@ -29,7 +29,7 @@ usage() { cat << EOF Usage: $PROGNAME [OPTION] -Watches when new videos are added to a folder and optimizes them to mp4 for Web. +Watches when new videos are added to a folder and optimizes them. Options: --folder [path] Folder path where new video will be monitored and optimized --help Display this usage message and exit diff --git a/high-battery.sh b/high-battery.sh deleted file mode 100644 index e69de29..0000000 diff --git a/low-battery.sh b/low-battery.sh deleted file mode 100644 index e69de29..0000000 diff --git a/send-my-inbox.sh b/send-my-inbox.sh deleted file mode 100644 index 8b13789..0000000 --- a/send-my-inbox.sh +++ /dev/null @@ -1 +0,0 @@ - diff --git a/share-file.sh b/share-file.sh deleted file mode 100644 index 8b13789..0000000 --- a/share-file.sh +++ /dev/null @@ -1 +0,0 @@ -