{"id":26047874,"url":"https://github.com/larsniet/image-renamer","last_synced_at":"2025-10-25T12:38:48.590Z","repository":{"id":281065680,"uuid":"944097379","full_name":"larsniet/image-renamer","owner":"larsniet","description":"A Python application that renames image and video files based on their creation date from metadata.","archived":false,"fork":false,"pushed_at":"2025-03-07T13:45:28.000Z","size":257,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-23T11:56:30.370Z","etag":null,"topics":["image-processing","pyqt6","python"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/modern-image-renamer/","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/larsniet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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":"2025-03-06T19:27:39.000Z","updated_at":"2025-03-07T13:56:25.000Z","dependencies_parsed_at":"2025-03-06T20:36:49.576Z","dependency_job_id":null,"html_url":"https://github.com/larsniet/image-renamer","commit_stats":null,"previous_names":["larsniet/image-renamer"],"tags_count":35,"template":false,"template_full_name":null,"purl":"pkg:github/larsniet/image-renamer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/larsniet%2Fimage-renamer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/larsniet%2Fimage-renamer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/larsniet%2Fimage-renamer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/larsniet%2Fimage-renamer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/larsniet","download_url":"https://codeload.github.com/larsniet/image-renamer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/larsniet%2Fimage-renamer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002074,"owners_count":26083285,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["image-processing","pyqt6","python"],"created_at":"2025-03-07T23:14:41.046Z","updated_at":"2025-10-09T21:10:38.555Z","avatar_url":"https://github.com/larsniet.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Image Renamer\n\n[![Tests](https://github.com/larsniet/image-renamer/actions/workflows/tests.yml/badge.svg)](https://github.com/larsniet/image-renamer/actions/workflows/tests.yml)\n[![codecov](https://codecov.io/gh/larsniet/image-renamer/branch/main/graph/badge.svg)](https://codecov.io/gh/larsniet/image-renamer)\n[![PyPI version](https://badge.fury.io/py/modern-image-renamer.svg)](https://badge.fury.io/py/modern-image-renamer)\n[![GitHub release (latest by date)](https://img.shields.io/github/v/release/larsniet/image-renamer)](https://github.com/larsniet/image-renamer/releases)\n\nA Python application that renames image and video files based on their creation date from metadata.\n\n## Problem Solved\n\nDigital cameras often reset their file numbering when SD cards are formatted, making it difficult to organize photos chronologically. This application automatically renames all images and videos in a folder using their creation date and time from the metadata.\n\n## Features\n\n- Renames image files using the creation date from EXIF metadata\n- Optional support for video files (mp4, mov, avi, etc.)\n- Falls back to file creation time if no EXIF data is available\n- Supports JPG, JPEG, PNG, NEF, CR2, and ARW file formats\n- Optional backup of original files\n- Customizable filename format\n- Prevents duplicate filenames by adding a counter\n- Option to remove duplicate files instead of renaming them\n- Beautiful and user-friendly GUI interface\n- Remembers your previous settings\n\n## Screenshots\n\n![Image Renamer GUI](./screenshots/gui.png)\n\n## Requirements\n\n- Python 3.6 or higher\n- Pillow library (for reading EXIF data)\n- PyQt6 (for the GUI version)\n\n## Installation\n\n### Quick Install (Prebuilt Binaries)\n\nThe easiest way to get started is to download the pre-built executable for your operating system:\n\n1. Go to the [Releases page](https://github.com/larsniet/image-renamer/releases/latest)\n2. Download the appropriate file for your system:\n   - **Windows**: Download `imagerenamer-windows.exe` and double-click to run\n     - **Note on Windows Security**: Some antivirus software (including Windows Defender) may flag the Windows executable as suspicious. This is a common false positive for Python applications packaged with PyInstaller. See [Windows Security Note](#windows-security-note) below for details.\n   - **macOS**: Download `imagerenamer-macos.zip`, extract and open the app\n     - **Important**: When first opening the app, you may see a security warning. Instead of clicking the app directly, right-click (or Ctrl+click) on it and select \"Open\" from the menu. When prompted, click \"Open\" again. You only need to do this once.\n   - **Linux**: Download `imagerenamer-linux`, make it executable with `chmod +x imagerenamer-linux`, and run it\n\nNo installation is required - just download and run!\n\n### From Source\n\n1. Clone this repository:\n   ```bash\n   git clone https://github.com/larsniet/image-renamer.git\n   cd image-renamer\n   ```\n\n2. Install the package:\n   ```bash\n   pip install -e .\n   ```\n\n### From PyPI\n\n```bash\npip install modern-image-renamer\n```\n\n## Usage\n\n### GUI Application\n\nThere are several ways to launch the GUI:\n\n```bash\n# If installed via pip\nimagerenamer-gui\n\n# Or\npython -m imagerenamer.gui\n\n# Or from the source directory\n./scripts/imagerenamer-gui\n```\n\nThe GUI application provides an intuitive interface to:\n- Select your image folder\n- Choose from preset date formats or create a custom one\n- Create backups of original files (optional)\n- View real-time progress with a detailed log\n\n### Command Line Interface\n\nFor command-line usage:\n\n```bash\n# If installed via pip\nimagerenamer /path/to/images\n\n# Or\npython -m imagerenamer.cli /path/to/images\n\n# Or from the source directory\n./scripts/imagerenamer-cli /path/to/images\n```\n\nWith backup option:\n\n```bash\nimagerenamer /path/to/images --backup\n```\n\nWith custom filename format:\n\n```bash\nimagerenamer /path/to/images --format \"%Y%m%d_%H%M%S\"\n```\n\nIncluding video files:\n\n```bash\nimagerenamer /path/to/images --include-videos\n```\n\nRemoving duplicates instead of renaming them:\n\n```bash\nimagerenamer /path/to/images --remove-duplicates\n```\n\n### Command Line Arguments\n\n- `folder`: Path to the folder containing images (required)\n- `-b, --backup`: Create backup of original files\n- `-f, --format`: Format string for the new filename (default: '%Y-%m-%d_%H-%M-%S')\n- `-r, --remove-duplicates`: Remove duplicates instead of renaming them with suffixes\n- `--include-videos`: Include video files (mp4, mov, avi, etc.) in addition to images\n- `-v, --version`: Show version information and exit\n\n## Format String Options\n\nThe format string follows Python's `strftime()` format codes:\n\n- `%Y`: 4-digit year (e.g., 2023)\n- `%m`: 2-digit month (01-12)\n- `%d`: 2-digit day (01-31)\n- `%H`: 2-digit hour (00-23)\n- `%M`: 2-digit minute (00-59)\n- `%S`: 2-digit second (00-59)\n\nExample formats:\n\n- `%Y-%m-%d_%H-%M-%S` → 2023-04-25_14-30-15.jpg (default)\n- `%Y%m%d_%H%M%S` → 20230425_143015.jpg\n- `%Y-%m-%d_%Hh%Mm%Ss` → 2023-04-25_14h30m15s.jpg\n\n## Project Structure\n\n```\nimage-renamer/          # Project root\n├── LICENSE             # MIT license file\n├── README.md           # Project documentation\n├── requirements.txt    # Dependencies\n├── setup.py            # Package installation\n├── pyproject.toml      # Modern Python packaging\n├── .coveragerc         # Coverage configuration\n├── pytest.ini          # pytest configuration\n├── release.sh          # Release automation script\n├── resources/          # Application resources\n│   └── icon.png        # Application icon\n├── imagerenamer/       # Main package\n│   ├── __init__.py     # Package init, version info\n│   ├── core.py         # Core functionality\n│   ├── cli.py          # Command-line interface\n│   └── gui.py          # GUI interface\n├── scripts/            # Entry points\n│   ├── imagerenamer-cli\n│   └── imagerenamer-gui\n├── tests/              # Test suite\n│   ├── conftest.py     # pytest configuration\n│   ├── test_core.py    # Core functionality tests\n│   ├── test_cli.py     # CLI tests\n│   └── test_gui.py     # GUI tests\n└── .github/workflows/  # CI/CD workflows\n    ├── build.yml       # Build workflow for releases\n    ├── publish.yml     # PyPI publishing workflow\n    └── tests.yml       # Testing workflow\n```\n\n## Running Tests\n\nThe project includes a comprehensive test suite using pytest. To run the tests:\n\n```bash\n# Install test dependencies\npip install pytest pytest-cov\n\n# Run the tests\npytest\n\n# Run tests with coverage report\npytest --cov=imagerenamer\n```\n\nThe test suite includes:\n- Unit tests for core functionality\n- Command-line interface tests\n- GUI component tests (without launching the actual GUI)\n\n## Releases\n\n### Automated Builds\n\nThis project uses GitHub Actions to automatically build and release packages for Windows, macOS, and Linux. When a new release tag is pushed (e.g., `v1.0.0`), the following happens:\n\n1. Tests are run on all supported platforms\n2. A new GitHub Release is created\n3. Binary packages are built for each platform:\n   - Windows: Standalone `.exe` file (zipped)\n   - macOS: Standalone `.app` bundle (zipped)\n   - Linux: Standalone executable (tarball)\n4. Python package is published to PyPI\n\n### Creating a New Release\n\nThis project includes an automated release script to simplify the process:\n\n#### Using the Release Scripts\n\n**Only for macOS/Linux users:**\n```bash\n./release.sh 1.0.1\n```\n\nThese scripts will:\n1. Ensure you're on the main branch\n2. Run tests to verify everything works\n3. Update the version number in the code\n4. Commit and push the version change\n5. Create and push a Git tag\n6. GitHub Actions will automatically build and publish the release\n\n#### Manual Release Process\n\nIf you prefer to release manually:\n\n1. Update the version in `imagerenamer/__init__.py`\n2. Commit the change: `git commit -m \"Bump version to X.Y.Z\"`\n3. Push to main: `git push origin main`\n4. Create a tag: `git tag vX.Y.Z`\n5. Push the tag: `git push origin vX.Y.Z`\n\n### Manual Installation from Releases\n\nYou can download the latest binary release for your platform from the [Releases page](https://github.com/larsniet/image-renamer/releases).\n\n- **Windows**: Download and run `imagerenamer-windows.exe`\n- **macOS**: \n  1. Download and extract `imagerenamer-macos.zip`\n  2. Move `Image Renamer.app` to your Applications folder\n  3. **Bypassing Security Warning**: When first launching, right-click (or Ctrl+click) on the app and select \"Open\" from the menu, then click \"Open\" in the dialog. This is only needed the first time you run the app.\n  4. Alternatively, you can go to System Preferences → Security \u0026 Privacy → General and click \"Open Anyway\"\n- **Linux**: Download `imagerenamer-linux`, make it executable with `chmod +x imagerenamer-linux`, and run it\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Troubleshooting\n\n### Windows Security Note\n\nSome Windows security software, including Windows Defender, may flag the Windows executable (`imagerenamer-windows.exe`) as potentially unwanted. This is a **false positive** that commonly occurs with Python applications packaged using PyInstaller.\n\nIf you encounter this issue, you have several options:\n\n1. **Unblock the file**:\n   - Right-click on the downloaded file\n   - Select \"Properties\"\n   - Check the \"Unblock\" checkbox at the bottom of the Properties dialog\n   - Click \"Apply\" and \"OK\"\n\n2. **Add an exclusion in Windows Defender**:\n   - Open Windows Security\n   - Go to \"Virus \u0026 threat protection settings\"\n   - Under \"Exclusions,\" click \"Add or remove exclusions\"\n   - Add an exclusion for the file or folder\n\n3. **Alternative installation methods**:\n   - Install from PyPI: `pip install modern-image-renamer`\n   - Clone and run from source (see [From Source](#from-source) section)\n\nThis application is open-source, and all code can be inspected in the GitHub repository. The executable is built automatically by GitHub Actions from the source code without any modifications.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flarsniet%2Fimage-renamer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flarsniet%2Fimage-renamer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flarsniet%2Fimage-renamer/lists"}