{"id":16776271,"url":"https://github.com/darkarp/algorename","last_synced_at":"2025-06-11T03:03:42.192Z","repository":{"id":192940060,"uuid":"687779389","full_name":"darkarp/algorename","owner":"darkarp","description":"This utility is a Python script designed to rename files in a folder or an individual file by shifting each alphabetic character in the filenames to the left by 1.","archived":false,"fork":false,"pushed_at":"2023-09-06T17:17:52.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-16T18:21:22.609Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/darkarp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-06T01:47:46.000Z","updated_at":"2023-09-06T04:26:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"008c755c-fad9-458b-8b0f-44b5a897c949","html_url":"https://github.com/darkarp/algorename","commit_stats":null,"previous_names":["darkarp/file_change","darkarp/algorename"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkarp%2Falgorename","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkarp%2Falgorename/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkarp%2Falgorename/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkarp%2Falgorename/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/darkarp","download_url":"https://codeload.github.com/darkarp/algorename/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkarp%2Falgorename/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259189613,"owners_count":22819076,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T07:09:25.235Z","updated_at":"2025-06-11T03:03:42.129Z","avatar_url":"https://github.com/darkarp.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AlgoRename\n\n[![Build Status](https://img.shields.io/badge/build-passing-green)]()\n[![GitHub release](https://img.shields.io/github/release/darkarp/algorename.svg)](https://github.com/darkarp/algorename/releases/)\n[![License](https://img.shields.io/github/license/darkarp/algorename.svg)](https://github.com/darkarp/algorename/blob/main/LICENSE)\n\n\n## Table of Contents\n\n- [Introduction](#introduction)\n- [Prerequisites](#prerequisites)\n- [Installation](#installation)\n- [Usage](#usage)\n  - [Command Line Arguments](#command-line-arguments)\n- [Algorithm Loading](#algorithm-loading)\n- [Algorithm Listing](#algorithm-listing)\n- [Multiprocessing](#multiprocessing)\n- [Logging](#logging)\n- [License](#license)\n\n\n## Introduction\n\nThis utility is a Python script designed to rename files in a folder or an individual file based on a dynamically loaded algorithm. It utilizes multiprocessing for efficiency and can operate recursively on directories. The example algorithm shifts each alphabetic character in the filenames to the left by 1.\n\n## Prerequisites\n\n- Python 3.6+\n\n\n## Installation\n\n1. Clone the GitHub repository.\n   ```\n   git clone https://github.com/darkarp/algorename.git\n   ```\n2. Navigate to the project directory.\n   ```\n   cd algorename\n   ```\n3. Install the required Python packages.\n   ```\n   pip install -r requirements.txt\n   ```\n\n## Usage\n\n### Command Line Arguments\n\n1. To rename a single file:\n ```\n python algorename.py -f [path/to/your/file]\n ```\n\n2. To rename all files in a directory:\n ```\n python algorename.py -d [path/to/your/directory]\n ```\n\n3. To rename files recursively in a directory:\n ```\n python algorename.py -d [path/to/your/directory] -r\n ```\n\n4. For silent mode (suppress errors):\n ```\n python algorename.py -s (...)\n ```  \n\n5. To not create a log file:\n ```\n python algorename.py -nl (...)\n ```  \n\n6. To use a specific algorithm:\n ```\n python algorename.py -a [algorithm_name]\n ```  \n\n7. To list available algorithms:\n ```\n python algorename.py -l\n ```\n\n8. For help:\n ```\n python algorename.py -h\n ```\n\n## Algorithm Loading  \n\nThe script supports loading custom algorithms. Place your algorithm module under the `algorithms/` folder, and the script will be able to import it dynamically. Make sure to define a function called `apply_algorithm` within the module.\n\nThe environment variable `FCLOG_PATH` specifies the directories where the script will look for custom algorithm modules. You can modify this by changing your environment variables or by creating a `.env` file.\n\nExample:  \n\n- Windows: `FCLOG_PATH=C:\\path\\to\\algorithms;D:\\another\\path\\to\\algorithms`\n- Linux/Mac: `FCLOG_PATH=/path/to/algorithms:/another/path/to/algorithms`\n\n## Algorithm Listing  \n\nYou can list all available algorithms along with their metadata using the `-l` flag. This is useful for understanding what each algorithm does before using it.\n\n## Multiprocessing\n\nThis utility uses multithreading to efficiently rename multiple files in a directory. It uses `concurrent.futures.ThreadPoolExecutor` to speed up the renaming tasks.\n\n## Logging\n\nLogging is implemented with a rotating log file mechanism to ensure that it doesn't consume too much disk space over time. The log file will be generated in the same directory as the script, named `algorename.log`. \n\n- You can set the logging verbosity level via an environment variable `FCLOG_LEVEL`, which accepts values like `DEBUG`, `INFO`, `WARNING`, `ERROR`, and `CRITICAL`.\n- You can set the log file name via an environment variable `FCLOG_NAME`. This name will be converted to lower-case.\n- You can disable logging by specifying `-nl` argument.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarkarp%2Falgorename","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdarkarp%2Falgorename","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarkarp%2Falgorename/lists"}