Implement CLI Entry Point with Comprehensive Argument Parsing#12
Draft
Implement CLI Entry Point with Comprehensive Argument Parsing#12
Conversation
Co-authored-by: fedem-p <56798675+fedem-p@users.noreply.github.com>
Co-authored-by: fedem-p <56798675+fedem-p@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Implement CLI Entry Point
Implement CLI Entry Point with Comprehensive Argument Parsing
Sep 14, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements a complete command-line interface for the PhotoSort application as specified in issue #1. The CLI provides a user-friendly interface for organizing photos and videos by date and location using metadata.
Key Features Implemented
CLI Commands:
photosort /path/to/photos- Default organize commandphotosort /path/to/photos --scan- Generate scan reportphotosort /path/to/photos --command organize --dry-run- Preview changes without moving filesCommand Line Options:
--command {scan,organize}or-c- Specify operation mode (default: organize)--scan- Shorthand for scan command--output DIRor-o- Custom output directory (default: input_path/sorted)--dry-runor-n- Preview mode without file operations--report-file FILEor-r- Custom scan report location--log-file FILEor-l- Custom operation log location--verboseor-v- Enable detailed outputError Handling:
Implementation Details
The CLI is built using Python's
argparsemodule with:The implementation includes placeholder functions
run_scan_command()andrun_organize_command()that are ready to be connected to the scanner and organizer modules once they are implemented.Testing
Added comprehensive test coverage with 27 unit tests covering:
Test Results:
Usage Examples
The CLI is now ready to be integrated with the core PhotoSort functionality for metadata extraction, file scanning, and photo organization.
Fixes #1.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
install.python-poetry.orgcurl -sSL REDACTED(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.