Automated renaming of JPEG files according to their creation date and time.
Category | Badges |
---|---|
Foundation | |
GitHub Info |
NameDaTaken is a Python 3 code that automates renaming of media files according their creation date and time following the format YYYY-MM-DD HH.MM.SS.ext
, commonly used by Dropbox.
To run NameDaTaken, the code requires Python 3 and its exifread
module. So, the instructions to download and install NameDaTaken and to create a conda environment that includes exifread are presented below.
Minimal set of commands to install NameDaTaken on Linux, MacOS, or Windows (with the Windows Subsystem for Linux). Last tested on 29 April 2020:
If you have an installation of Conda in your system, please skip to step 2. Otherwise, Miniconda is required and the installer is available from the the Anaconda website. To download the installer from the terminal (in Linux or the Windows Subsystem for Linux):
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
(Note) If you use MacOS, replace Linux
by MacOSX
on the previous command.
Run the installer following the on-screen instructions:
bash Miniconda3-latest-Linux-x86_64.sh
After the installation is complete, close the terminal and start a new shell.
(Optional) Disable automatic activation of the base conda environment:
conda config --set auto_activate_base false
NameDaTaken requires Python 3 and modules to extract the EXIF and ID3 data out of media files. Conda offers the possibility of creating an environment that contains all the dependencies required by NameDaTaken. To download and install the required software tools in a new NDT environment execute the command below and follow the on-screen instructions:
conda create -n NDT python=3.8 exifread mutagen -c conda-forge
To use the recently created NDT environment, activate it:
conda activate NDT
In you file system navigate to the location where you would like to place the root directory of NameDaTaken and clone it from its corresponding GitHub repository:
git clone https://github.com/carlosborca/NameDaTaken.git
The code uses the current working directory as a reference point for execution and it will rename all the files that match the supported media extensions on that directory. Therefore, one needs to navigate to the folder where the media files are located and execute the Python 3 code there, within the NDT environment.
conda activate NDT
cd /To/Directory/Where/The/Files/Are/
python /Path/to/NameDaTaken/namedataken/namedataken.py
The first and third command can be grouped and automated by doing something horrific like creating an alias in ~/.bashrc
, for example:
alias NameDaTaken="conda activate NDT; python ~/Gits/NameDaTaken/namedataken/namedataken.py; conda deactivate"
Copyright (c) 2023, Carlos H. Borca