Nomen project


Contents:

Definition

What is Nomen?

Nomen logoThe Nomen project is a multi-purpose rename tool to consistently rename the base name as well as the extension of files in a variety of ways and also to remove unnecessary whitespaces from directory names.




History

Where the project started — the story so far.

A few years ago, a buddy asked me if it would be possible to develop a tool that consistently renames files based on the directory name they are stored in. So, I wrote an application called AutoRename exactly for that purpose.

It simply renamed each file inside a directory using the directory name, a separator and a consecutive number, to keep the files in chronological order. Quite some people used it to rename and organize their picture files within a few seconds (at least for those files they did not want to rename manually).

The project worked fine, but I did not like the facts that it could not be used for scripting purposes and that it was only running on Windows operating systems. Due to this, I decided to redevelop the tool.

So, Nomen (Latin for "name") is the platform independent and enhanced successor of AutoRename. Another nice side effect is that the new project is significantly faster than its predecessor.



Details

Further information about the project.

Python poweredThe Nomen project is written in Python and platform independent.

Even though, its predecessor came with a graphical user interface, this project does not have one, yet, but therefore it can be used for scripting purposes.

Basically, Nomen allows to consistently rename the base name as well as the extension of files and to remove unnecessary whitespaces from directory names.

For now, it is capable of the following, briefly stated:

  • Convert the case of the base name (prefix or stem) of files.
  • Convert the case of the extension (suffix) of files.
  • Adjust differently spelled extensions from files of the same file type.
  • Rename base names based on the name of the directory where the files are stored in.
  • Modify base names by adding, removing or replacing certain strings.
  • Remove leading, trailing and duplicate whitespaces from directory names.

It also comes with an integrated simulation mode that simulates the rename process and writes the details into a report file. This allows checking which files would have been renamed.


Please use this project with care to avoid data damage or loss!

It is strongly recommended to simulate every rename process first to check which files would have been renamed. As a matter of fact, there is no function to undo the changes done by this tool, so you should be aware of what you are doing. If not, do not use this tool.

Improper use (e. g. modifying files inside system directories) will corrupt your system!

Details about the components of the project can be found below.

Plans for the future:

  • Additional component to replace an user-defined string inside the base name of a file.
  • Platform independent graphical user interface (based on Qt, using PySide).


Components

What the project consists of and what each component is for.

Nomen Directory Name Space Modifier

The directory name space modifier is a simple tool that removes leading, trailing as well as duplicate whitespaces from directory names or inserts and removes spaces next to punctuation characters.


Nomen File Extension Case Converter

The file extension case converter converts the case of file extensions either to lowercase, title case or uppercase.


Nomen File Extension Renamer

The file extension renamer adjusts differently spelled file extensions from files of the same file type to get consistent extensions.


Nomen File Name Case Converter

The file name case converter converts the case of the base name of files either to lowercase, title case, uppercase or a user-defined mixed case.

This component also comes with a feature that allows using config files to convert the case of certain strings always to lowercase, title case, uppercase or a user-defined mixed case, no matter which target case was given.


Nomen File Name Modifier

The file name modifier is a basic component that adds, removes or replaces a user-defined string inside the base name of files.


Nomen File Renamer

The file renamer renames the base name of files based on the name of the directory where the files are stored in and adds a unique numeric ID.

This component comes with different rename modes (e. g. to keep the files in chronological order) and also allows to exclude files and directories using an exclude pattern which supports wildcards as well as regular expression syntax.



Requirements

Stuff that is required to get Nomen running.

Software requirements:

  • Python framework (either of them, further information can be found here)
    • Python 2.x (version 2.7 or higher is recommended, may also work with earlier versions)
    • Python 3.x (version 3.2 or higher is recommended, may also work with earlier versions)


Usage

How to use Nomen.

The following usage example shows how to execute the Python script on the shell of a Unix-like system.

If you do not know, how to run Python scripts on your operating system, you may click here.

The project also comes with some help files which contain fundamental documentation as well as usage examples for each component of the project.

Usually, each script requires command-line arguments to operate. So, to get an overview of all arguments available, simply run the script with the --help argument. For example:


$ ./nomen-fileren.py --help
usage: nomen-fileren.py -d DIRECTORY -m {fill-gaps,keep-order,rename-new} [-c]
                        [--confirm] [--custom-name CUSTOM_NAME]
                        [--exclude EXCLUDE_PATTERN]
                        [--explicit EXPLICIT_PATTERN] [-h] [--ignore-file-ext]
                        [--ignore-symlinks] [-p PADDING] [-r] [--regex]
                        [-s SEPARATOR] [--simulate REPORT_FILE] [--version]

Rename the base name of files within a directory and (if requested) in all of
its sub-directories based on the name of the directory where the files are
stored in and add a unique numeric ID.

required arguments:
  -d DIRECTORY, --directory DIRECTORY
                        directory that contains the files to process
  -m {fill-gaps,keep-order,rename-new},
  --rename-mode {fill-gaps,keep-order,rename-new}
                        rename mode to use

optional arguments:
  -c, --case-sensitive  do not ignore the case of the given exclude or
                        explicit pattern
  --confirm             skip the confirmation prompt and instantly rename
                        files
  --custom-name CUSTOM_NAME
                        custom file name (instead of the directory name where
                        the files are stored in)
  --exclude EXCLUDE_PATTERN
                        pattern to exclude certain files (case-insensitive,
                        multiple patterns separated via semicolon)
  --explicit EXPLICIT_PATTERN
                        explicit pattern to only process certain files (case-
                        insensitive, multiple patterns separated via
                        semicolon)
  -h, --help            print this help message and exit
  --ignore-file-ext     ignore file extensions when numerating files
  --ignore-symlinks     ignore symbolic links
  -p PADDING, --padding PADDING
                        set a user-defined numeric padding (if no user-defined
                        padding value is given, it will be set automatically
                        based on the amount of files per directory, default is
                        0)
  -r, --recursive       process the given directory recursively
  --regex               use regex syntax for the exclude or explicit pattern
                        instead of just asterisk wildcards and semicolon
                        separators (for details see the section 'Regular
                        expression operations' inside the Python
                        documentation)
  -s SEPARATOR, --separator SEPARATOR
                        use a user-defined character or string as a separator
                        between the directory name and the unique numeric ID
                        (default is ' ')
  --simulate REPORT_FILE
                        simulate the rename process and write the details into
                        a report file
  --step STEP           steps between each numeric ID (default is 1)
  --version             print the version number and exit

Further information and usage examples can be found inside the documentation
file for this script.
$


Download

Download the project.

Below you can download the latest version of the project for different Python frameworks. Further information about these frameworks can be found here.


Version:


2.3.4




Nomen logo

Release date:


2016-07-12




File size:


< 60 KB




Current state:
Frozen
Frozen
Details












License:



MIT License


Framework:


Python 2.x
Python 3.x


Download:


tgz | zip
tgz | zip