Small collection of Bash scripts to launch functionalities in folders when new files appear, such as optimizing videos, converting images or battery management.
Go to file
Andros Fenollosa 751cb6abc8 Update files
2023-04-18 12:56:23 +02:00
dynamic-folder-decompress.sh Update files 2023-04-18 12:56:23 +02:00
dynamic-folder-image-to-webp.sh Update files 2023-04-18 12:56:23 +02:00
dynamic-folder-random-image.sh Update files 2023-04-18 12:56:23 +02:00
dynamic-folder-share-files.sh Update files 2023-04-18 12:56:23 +02:00
dynamic-folder-video-optimizer.sh Update files 2023-04-18 12:56:23 +02:00
LICENSE Initial commit 2023-03-21 19:06:21 +01:00
README.md Update files 2023-04-18 12:56:23 +02:00

Dynamic folders

Collection of Bash scripts that execute functionalities in folders.

Video optmizer

Folder that watches when new videos are added to a folder and optimizes them.

Requirements

  • inotify-tools
  • ffmpeg

Example in Debian.

sudo apt install inotify-tools ffmpeg

Install

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

dynamic-folders-video-optimizer [folder to watch]

Service

[Unit]
Description=Folder that watches when new videos are added to a folder and optimizes them.

[Service]
Restart=always
RestartSec=5
User=[user]
Group=[user]
WorkingDirectory=/home/[user]
ExecStart=dynamic-folders-video-optimizer [folder to watch]

[Install]
WantedBy=multi-user.target

Development

Check syntax

shellcheck [script]