mirror of
https://github.com/tanrax/bash-folders.git
synced 2024-11-14 14:35:42 +01:00
Small collection of Bash scripts to launch functionalities in folders when new files appear, such as optimizing videos, converting images or battery management.
dynamic-folder-decompress.sh | ||
dynamic-folder-image-to-webp.sh | ||
dynamic-folder-random-image.sh | ||
dynamic-folder-share-files.sh | ||
dynamic-folder-video-optimizer.sh | ||
LICENSE | ||
README.md |
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-folder-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]