librarian: Move/rename according a set of rules

[ data, library, program ] [ Propose Tags ] [ Report a vulnerability ]

Move/rename according a set of rules.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0, 0.1.0.1, 0.2.0.0, 0.2.0.1
Change log changelog.md
Dependencies base (>=4 && <5), containers (<0.9), dhall (>=1 && <2), directory (<1.4), easy-file (<0.3), either (>=5 && <6), Glob (<0.11), librarian, optparse-applicative (<0.20), pcre2 (<2.4), pretty-show (<1.11), text (<2.2), time (<1.17) [details]
Tested with ghc ==9.2.8
License ISC
Author Gautier DI FOLCO
Maintainer gautier.difolco@gmail.com
Uploaded by gdifolco at 2026-10-05T08:49:33Z
Category Data
Home page http://github.com/blackheaven/librarian
Distributions
Executables librarian
Downloads 199 total (11 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2026-10-05 [all 1 reports]

Readme for librarian-0.2.0.1

[back to package description]

Librarian

Move/rename according a set of rules.

Example

With example/cctv.dhall:

let L = ../format.dhall

in  [ L.Rule::{
      , name = "All footages"
      , match = "CCTV/**/*.*m*"
      , actions =
        [ L.Action.Type.Move
            { inputPattern = "CCTV/(.*)/(\\d+)\\.mp4"
            , newName = "sorted/$2/$1.mp4"
            }
        ]
      }
    ]
$ librarian -r examples/cctv.dhall
Move [All footages] './CCTV/garage/220520.mp4' -> './sorted/220520/garage.mp4'
Move [All footages] './CCTV/garage/220521.mp4' -> './sorted/220521/garage.mp4'
Move [All footages] './CCTV/garage/220522.mp4' -> './sorted/220522/garage.mp4'
Move [All footages] './CCTV/garage/220523.mp4' -> './sorted/220523/garage.mp4'
Move [All footages] './CCTV/garden/220520.mp4' -> './sorted/220520/garden.mp4'
Move [All footages] './CCTV/garden/220521.mp4' -> './sorted/220521/garden.mp4'
Move [All footages] './CCTV/garden/220522.mp4' -> './sorted/220522/garden.mp4'
Move [All footages] './CCTV/garden/220523.mp4' -> './sorted/220523/garden.mp4'
Perform? (y/n)