Skip to content

mnlcz/directory-mapping

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Directory Mapping

Goal

The idea of this project is to have a tool to handle many directories that have a particular structure in common. For example: handling drives that store multimedia (e.g. movies) in a custom directory format.

The tool (eventually) should be capable of performing mass renaming, validating directories, rearranging files, enforcing rules such as:

  • Files that match X rule should be moved to Y location.
  • Directories X should match a custom defined structure Y. Defined by the user in structure.example.php.

Configuration

The configuration of the project is based on 3 files, located in src/config/.

  1. locations: the core paths that the tool is going to use to perform its tasks.
  2. mappings: the rules that match a directory name to a prefix, for the rename logic. This file can be generated automatically (eventually via a cli argument, now as a function parameter).
  3. structure: the predicate that's going to be used to determine if a directory is in a 'correct' state. E.g. continuing with the movies example, one could define the predicate to ensure each directory has the following sub-directories: <franchise>/series/ and <franchise>/movies/.

Dependencies

Regarding composer, the project uses the Illuminate packages Collection and Support. They can be installed like this:

composer install

The project also (optionally) uses phpDocumentor. The user can use this tool to generate a website with the documentation for the project:

phpdoc 

This will generate a website in build/api. That can be accessed like this, for example:

firefox ./build/api/index.html

And it looks like this:

website

About

Tool to manipulate and organize directories with user-defined rules

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages