incron

Crates.ioincron
lib.rsincron
version0.1.1
sourcesrc
created_at2023-02-19 08:06:46.556349
updated_at2023-02-19 09:28:51.765314
descriptionInspired by incron. You can configure to run scripts based on changes inside a directory
homepage
repository
max_upload_size
id788699
size31,240
P G Nithin Reddy (rednithin)

documentation

README

Motivation

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.

Installing

cargo install incron

Configuration

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\""
    }
  ]
}

Usage

# Start as a background process
incron start
# Stop background process
incron stop
# Restart background process
incron restart
# Run normally
incron debug
Commit count: 0

cargo fmt