{"id":13722998,"url":"https://github.com/OctopyID/GPhotoCLI","last_synced_at":"2025-05-07T16:31:45.674Z","repository":{"id":77883514,"uuid":"605580197","full_name":"OctopyID/GPhotoCLI","owner":"OctopyID","description":"GPhoto streamlines the photo uploading process and helps you keep your photo library organized","archived":false,"fork":false,"pushed_at":"2024-09-11T20:39:44.000Z","size":83,"stargazers_count":21,"open_issues_count":0,"forks_count":5,"subscribers_count":0,"default_branch":"main","last_synced_at":"2024-11-12T23:43:10.227Z","etag":null,"topics":["google","google-photos","laravel","laravel-zero"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/OctopyID.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"SupianIDz","ko_fi":"SupianIDz"}},"created_at":"2023-02-23T13:12:14.000Z","updated_at":"2024-09-11T20:39:47.000Z","dependencies_parsed_at":"2023-12-27T22:47:59.550Z","dependency_job_id":null,"html_url":"https://github.com/OctopyID/GPhotoCLI","commit_stats":{"total_commits":8,"total_committers":1,"mean_commits":8.0,"dds":0.0,"last_synced_commit":"0ade9e2843c594da9cd3bb767a0cdb84ae91c233"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OctopyID%2FGPhotoCLI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OctopyID%2FGPhotoCLI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OctopyID%2FGPhotoCLI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OctopyID%2FGPhotoCLI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OctopyID","download_url":"https://codeload.github.com/OctopyID/GPhotoCLI/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252915366,"owners_count":21824550,"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":["google","google-photos","laravel","laravel-zero"],"created_at":"2024-08-03T01:01:35.324Z","updated_at":"2025-05-07T16:31:40.654Z","avatar_url":"https://github.com/OctopyID.png","language":"PHP","funding_links":["https://github.com/sponsors/SupianIDz","https://ko-fi.com/SupianIDz"],"categories":["Projects using Laravel Zero"],"sub_categories":[],"readme":"# Google Photo CLI\n\nGPhoto streamlines the photo uploading process and helps you keep your photo library organized. Say goodbye to manual\nphoto uploads and hello to efficient photo management with\nGPhoto.\n\n## Features\n\n- **No Duplicate Processing** - GPhoto uses a cache with keys based on hash files to ensure that the same files are not\n  processed repeatedly, saving you time and storage.\n- **No Duplicate Album Names** - GPhoto fetches album names from Google and compares them to ensure there are no\n  duplicates, helping you keep your photo library organized and easy\n  to navigate.\n- **Automatic Token Refresh** - GPhoto automatically refreshes the token if an error occurs during the photo upload\n  process, ensuring a seamless and uninterrupted uploading\n  experience.\n- **Secure Local Storage** - All authentication data and cache is securely stored locally to ensure your privacy and\n  security. GPhoto does not collect any information from you.\n\n## Installation\n\nPlease make sure you have the following requirements installed below:\n\n- PHP 8.1 with curl, inotify, pcntl, and bcmatch extensions.\n\nDownload the latest release from the [releases page](https://github.com/OctopyID/GPhotoCLI/releases) or clone this\nrepository.\n\nDue to hardware limitations of the Apple Silicon chipsets on macOS, the `ext-inotify` extension is not supported. Consequently, we offer two different build variants to handle this\nsituation:\n\n1. **Non-inotify Variant:** This is a standard variant that doesn't rely on the `inotify` extension. It involves the following step:\n    - When a new token is generated, the current process should be manually stopped.\n    - After stopping the process, rerun the upload command to recognize and use the new token in the build process.\n\n\n2. **Inotify Variant:** This variant provides an automated process, leveraging the 'inotify' feature available on Linux. It works as follows:\n    - The build process automatically detects when a new token is generated - without the need for human intervention.\n    - Therefore, there's no need to manually stop and rerun the process - saving time and reducing possible errors.\n\nPlease note that the Inotify variant offers a more efficient and seamless experience but it is not compatible with macOS environment that use Apple Silicon chipsets. On the other\nhand, this variant is highly recommended for Linux users who have the `inotify` extension installed and enabled.\n\n## Usage\n\nBefore using this application, you need to create a Google Cloud Platform project and enable the Google Photos Library\nAPI and create\na [OAuth 2.0 Client ID](https://developers.google.com/photos/library/guides/overview#authorization).\n\nThe authentication file should look like this :\n\n```json\n{\n    \"web\": {\n        \"client_id\": \"xxxxxxx.apps.googleusercontent.com\",\n        \"project_id\": \"xxxxxxx\",\n        \"auth_uri\": \"https://accounts.google.com/o/oauth2/auth\",\n        \"token_uri\": \"https://oauth2.googleapis.com/token\",\n        \"auth_provider_x509_cert_url\": \"https://www.googleapis.com/oauth2/v1/certs\",\n        \"client_secret\": \"xxxxxxx\",\n        \"redirect_uris\": [\n            \"http://localhost:3000\"\n        ]\n    }\n}\n```\n\n### 1. Authorization Token\n\n```bash\nphp gphoto auth:create foo --auth=./path/to/auth.json --host=http://localhost:3000\n```\n\nThe expired token can be renewed with the following command\n\n```bash\nphp gphoto auth:reload foo\n```\n\nMake sure you register http://localhost:3000 on Authorised redirect URIs and no service uses this port.\n\n### 2. Photos\n\n#### 2.1 Upload Single File\n\n```bash\nphp gphoto upload:photo ./path/to/photo.png --auth=foo\n```\n\nor you can use ` --album` to upload to a specific album.\n\n```bash\nphp gphoto upload:photo ./path/to/MyPicture.png --auth=foo --album=\"My Album\"\n```\n\n#### 2.2 Upload Multiple Files\n\nTo upload multiple files, you need to create a directory that contains all photos with the following structure:\n\n```\n. Pictures\n├── MyPicture 1.jpg\n├── MyPicture 2.jpg\n├── MyPicture 3.jpg\n└── MyPicture 4.jpg\n```\n\n```bash\nphp gphoto upload:photo ./path/to/Pictures --auth=foo\n```\n\nor you can use ` --album` to upload to a specific album.\n\n```bash\nphp gphoto upload:photo ./path/to/Pictures --auth=foo --album=\"My Album\"\n```\n\n### 3. Albums\n\n#### 3.1 Show List of Albums\n\n```bash\nphp gphoto list:albums --auth=foo\n``` \n\n#### 3.2 Upload Single Album\n\nTo upload a single album, you need to create a directory that contains all photos with the following structure:\n\n```\n. MyAlbum\n├── MyPicture 1.jpg\n├── MyPicture 2.jpg\n├── MyPicture 3.jpg\n├── MyPicture 4.jpg\n└── MyPicture 5.jpg\n```\n\n```bash\nphp gphoto upload:album ./path/to/MyAlbum --auth=foo\n```\n\nThis will upload all files in the `MyAlbum` directory to Google Photos and create an album with the `MyAlbum` name.\n\n#### 3.3 Upload Multiple Albums\n\nTo upload multiple albums, you need to create a directory that contains all albums with the following structure:\n\n```\n. MyAlbumCollection\n├── MyAlbum 1\n│   ├── MyPicture 1.jpg\n│   ├── MyPicture 2.jpg\n│   ├── MyPicture 3.jpg\n│   └── MyPicture 4.jpg\n│\n└── MyAlbum 2\n    ├── MyPicture 1.jpg\n    ├── MyPicture 2.jpg\n    ├── MyPicture 3.jpg\n    └── MyPicture 4.jpg\n```\n\n```bash\nphp gphoto upload:album ./path/to/MyAlbumCollection --auth=foo --multiple\n```\n\nThis will upload all files in the `MyAlbumCollection` directory to Google Photos and create an album with `MyAlbum 1`\nand `MyAlbum 2` names.\n\n## Credits\n\n- [Supian M](https://github.com/SupianIDz)\n- [Octopy ID](https://github.com/OctopyID)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOctopyID%2FGPhotoCLI","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FOctopyID%2FGPhotoCLI","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOctopyID%2FGPhotoCLI/lists"}