{"id":30583398,"url":"https://github.com/hex0cter/media-organiser","last_synced_at":"2025-08-29T08:38:00.523Z","repository":{"id":308963947,"uuid":"1034033143","full_name":"hex0cter/media-organiser","owner":"hex0cter","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-08T22:26:29.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-09T00:20:26.274Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hex0cter.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2025-08-07T18:23:36.000Z","updated_at":"2025-08-08T22:26:32.000Z","dependencies_parsed_at":"2025-08-09T00:20:28.158Z","dependency_job_id":"13b8b746-d8ad-4a7c-8443-51a902653d68","html_url":"https://github.com/hex0cter/media-organiser","commit_stats":null,"previous_names":["hex0cter/media-organiser"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/hex0cter/media-organiser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex0cter%2Fmedia-organiser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex0cter%2Fmedia-organiser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex0cter%2Fmedia-organiser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex0cter%2Fmedia-organiser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hex0cter","download_url":"https://codeload.github.com/hex0cter/media-organiser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex0cter%2Fmedia-organiser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272657475,"owners_count":24971553,"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-08-29T02:00:10.610Z","response_time":87,"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":[],"created_at":"2025-08-29T08:37:58.656Z","updated_at":"2025-08-29T08:38:00.513Z","avatar_url":"https://github.com/hex0cter.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Photo \u0026 Video Organizer\n\nA simple but powerful Bash script to organize photos and videos from a source directory into a structured `YYYY/MM-Month` destination directory based on their metadata.\n\n## Features\n\n-   **Metadata-First Approach**: Uses the most reliable date from the file's metadata (`DateTimeOriginal`, `CreateDate`, etc.).\n-   **Smart Fallback**: If no EXIF or metadata date is found, it uses the file system's creation or modification time (whichever is older).\n-   **Broad File Support**: Works with common photo (`.jpg`, `.png`) and video (`.mov`, `.mp4`, `.avi`) formats.\n-   **Safe Renaming**: Renames files to a `YYYY-MM-DD_HH_MM_SS` format.\n-   **No Overwrites**: Automatically adds a numeric suffix (e.g., `_1`, `_2`) to prevent overwriting files with the same timestamp.\n-   **Dry Run Mode**: Preview the changes without actually moving any files using the `-n` or `--dry-run` flag.\n-   **Platform**: Compatible with macOS.\n\n## Requirements\n\nThis script requires `exiftool` to be installed.\n\n-   **On macOS (using Homebrew):**\n    ```sh\n    brew install exiftool\n    ```\n\n## Usage\n\nFirst, make the script executable:\n```sh\nchmod +x sort-photo.sh\n```\n\nThen, run the script with a source and destination directory:\n\n```sh\n./sort-photo.sh [OPTIONS] SOURCE_DIR DEST_DIR\n```\n\n### Arguments\n\n-   `SOURCE_DIR`: The directory containing the unsorted photos and videos.\n-   `DEST_DIR`: The root directory where the organized files will be moved.\n\n### Options\n\n-   `-f`, `--force`: Process files even if they don't have EXIF data (uses file system time as a fallback).\n-   `-n`, `--dry-run`: Show what would be done without actually moving any files.\n-   `-h`, `--help`: Display the help message.\n\n### Example\n\nTo sort files from `~/Desktop/Unsorted` into `~/Pictures/Organized`, including files without metadata, and perform a dry run first:\n\n```sh\n# First, do a dry run to see what will happen\n./sort-photo.sh -n -f ~/Desktop/Unsorted ~/Pictures/Organized\n\n# If everything looks good, run it for real\n./sort-photo.sh -f ~/Desktop/Unsorted ~/Pictures/Organized\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhex0cter%2Fmedia-organiser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhex0cter%2Fmedia-organiser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhex0cter%2Fmedia-organiser/lists"}