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
Xrule should be moved toYlocation. - Directories
Xshould match a custom defined structureY. Defined by the user in structure.example.php.
The configuration of the project is based on 3 files, located in src/config/.
locations: the core paths that the tool is going to use to perform its tasks.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).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/.
Regarding composer, the project uses the Illuminate packages Collection and Support. They can be installed like this:
composer installThe 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.htmlAnd it looks like this:
