dirqd

Crates.iodirqd
lib.rsdirqd
version0.1.0
sourcesrc
created_at2024-09-05 19:35:15.258334
updated_at2024-09-05 19:35:15.258334
descriptionInvoke processes based on incoming files in a directory
homepage
repositoryhttps://github.com/kennep/dirqd/
max_upload_size
id1365058
size29,846
Kenneth Wang Pedersen (kennep)

documentation

README

dirqd

This is a deamon that listes for new files in a directory. For each file matching a given pattern, it invokes a process with the filename as an argument, and after the process completes, it either deletes the file or moves it to a different directory.

Build status

Download

Pre-compiled binaries for Linux, Windows and (Intel) macOS are available on the releases page.

Building

If you have Rust and Cargo installed, you can download the source and build it yourself in the regular way:

$ cargo build

Usage

Invoke processes based on incoming files in a directory

Usage: dirqd.exe [OPTIONS] <DIRECTORY> [COMMAND]...

Arguments:
  <DIRECTORY>   Directory to watch
  [COMMAND]...  Command to invoke

Options:
  -p, --pattern <PATTERN>
          Files must match this shell pattern [default: *]
  -P, --processed-queue <PROCESSED_QUEUE>
          After successfully processing, move files here. Cannot be used with --delete
      --delete
          After successful processing, delete file. Cannot be used with --processed-queue
  -E, --error-queue <ERROR_QUEUE>
          If invoking command fails, move files here. Cannot be used with --delete-on-error
      --delete-on-error
          If invoking command fails, delete file. Cannot be used with --error-queue
  -h, --help
          Print help
  -V, --version
          Print version

Feedback

Feedback, PRs, etc. are most welcome.

Commit count: 0

cargo fmt