Crates.io | incron |
lib.rs | incron |
version | 0.1.1 |
source | src |
created_at | 2023-02-19 08:06:46.556349 |
updated_at | 2023-02-19 09:28:51.765314 |
description | Inspired by incron. You can configure to run scripts based on changes inside a directory |
homepage | |
repository | |
max_upload_size | |
id | 788699 |
size | 31,240 |
The main motivation for building this is because DaVinci Resolve Free does not support lot of media codecs. Hence this automatically helps in running a script to convert videos to desired format. Ofcourse you can specify whatever script you want to run.
cargo install incron
You need to add configuration at ~/.config/incronrs/config.json
Example: This runs a task of converting video whenever files/folders are created or moved around.
{
"logfile": "/tmp/incron.log",
"pidfile": "/tmp/incron.pid",
"jobs": [
{
"label": "Hey this is first task",
"watch": "/home/nithin/HDD/Videos",
"events": [
"Create(File)",
"Create(Folder)",
"Modify(Name(To))"
],
"command": "/home/nithin/Git/incron-rs/scripts/convertvideo.py \"$watched\" \"$filename\" \"$event\" \"/home/nithin/HDD/TVideos\""
}
]
}
# Start as a background process
incron start
# Stop background process
incron stop
# Restart background process
incron restart
# Run normally
incron debug