GithubHelp home page GithubHelp logo

datr's Introduction

DatR

A simple application to sort files (especially pictures) by their date.

How it works

DatR will first look if a file includes EXIF data. If so it will choose the earliest among DateTime, DateTimeDigitized and DateTimeOriginal. If not it will try to find a creation date and as a last resort the modification date. Once a date is aquired, DatR will either copy or move the files into their new folders according to the specified pattern.

How to install

Download binary

Download the Linux binary from https://github.com/wutscher/datr/releases/tag/release

Compile from Source

  1. Clone this repository
  2. run cargo build --release
  3. run cargo install --path .

If you havn't already add the ~/.cargo/bin directory to your PATH.

How to use

Usage: datr [OPTIONS] --input <INPUT> --output <OUTPUT>

Options:

-i, --input <INPUT> The root folder containing the images

-o, --output <OUTPUT> Where the sorted images are placed

-r, --recursive Makes the operation recursive through folders

-m, --move Moves your files instead of copying them

-f, --format <FORMAT> The format of the resulting folder structure ('/' will create subfolders) https://docs.rs/chrono/latest/chrono/format/strftime/index.html [default: %Y-%m-%d]

-c, --cleanup Removes empty folders after sorting (NOT IMPLEMENTED)

-h, --help Print help information

-V, --version Print version information

Example:

datr -r -m -c -i ./photos -o ./sorted_photos -f "%Y-%m-%d"

might create the following structure:

photos
│
└─ <files>

sorted_photos
│
└─ 2020-10-31
│  │
│  └─ <files>
└─ 2020-11-01
│  │
│  └─ <files>
└─ 2020-11-03
  │
  └─ <files>

datr -r -m -c -i ./photos -o ./sorted_photos -f "%Y/%m/%d"

might create the following structure:

photos
│
└─ <files>

sorted_photos
│
└─ 2020
  │
  └─ 10
  │  │
  │  └─ 31
  │     │
  │     └─ <files>
  └─ 11
     │
     └─ 1
     │  │
     │  └─ <files>
     │
     └─ 3
        │
        └─ <files>

Contribution

I made this for my own personal use but I welcome anyone who wants to expand or improve it. If no major bugs appear, I will most likely not be updating this app.

datr's People

Contributors

wutscher avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.