Skip to content
/ imgname Public

🦀 Encode the capture date of your photos in nice looking 8.3 format filenames

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

nalsai/imgname

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Imgname

A command line app similar to ImgReName, but written in Rust 🦀, with the ability to convert the name back to the date.

It names the files by making a letter out of the year and the month (2000=A ,2001=B, ...) (January=A, February=B, ...). If the day of the month is less than or equal to 9, it directly uses the number, otherwise it also turns it into a letter (10=A, 11=B, ...). The time value is calculated using hour * 3600 + minute * 60 + second.

This results in a name like AA100000 for 2000-01-01 00:00:00 and ZLV86399 for 2025-12-31 23:59:59. These values are the minimum and maximum date currently supported. Other dates will have non alphanumeric characters in their name.

It also recognizes multiple files with the same name but a different extension, and will move/rename them together. This is useful when you have a JPEG file and a RAW file with the same name.

Usage: imgname [OPTIONS] <COMMAND>

Commands:
  rename       Rename the specified file(s)
  move         Move the specified file(s) into the subfolder YYYY-MM-DD
  rename-move  Rename and moves the specified file(s)
  get-date     Get the date from the specified filename(s)
  get-name     Get the name from the specified date(s) in the format: "2016:05:04 03:02:01"
  help         Print this message or the help of the given subcommand(s)

Options:
  -f, --filetime        Use last modification time of file instead of exif metadata (can't be combined with -p)
  -p, --pxl             Use the filename (in the format PXL_20200820_141005222) instead of exif metadata (can't be combined with -f)
  -o, --offset <HOURS>  Offset in hours to add to the date (use this to set the timezone for videos)
  -h, --help            Print help

Installing

git clone [email protected]:Nalsai/imgname.git
cd imgname
cargo install --path .

# Install shell completion (replace HASH with the output at compile time, path may vary depending on your system)
sudo install -m644 ./target/release/build/imgname-HASH/out/imgname.bash /usr/share/bash-completion/completions/imgname  # Bash
sudo install -m644 ./target/release/build/imgname-HASH/out/imgname.fish /usr/share/fish/completions/imgname.fish        # Fish
sudo install -m644 ./target/release/build/imgname-HASH/out/_imgname /usr/share/zsh/site-functions/_imgname              # Zsh

License

Imgname is distributed under the terms of both the MIT License and the Apache License (Version 2.0).

See LICENSE-MIT and LICENSE-APACHE for details.

About

🦀 Encode the capture date of your photos in nice looking 8.3 format filenames

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages