{"id":27642415,"url":"https://github.com/ecomdev/download-magento-images-rs","last_synced_at":"2025-04-23T23:55:51.446Z","repository":{"id":269752535,"uuid":"908020623","full_name":"EcomDev/download-magento-images-rs","owner":"EcomDev","description":"CLI tool to download images from a store based on its database table","archived":false,"fork":false,"pushed_at":"2025-04-09T13:25:46.000Z","size":46,"stargazers_count":16,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-04-23T23:55:46.770Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/EcomDev.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":"2024-12-24T22:25:54.000Z","updated_at":"2025-02-01T19:03:30.000Z","dependencies_parsed_at":"2024-12-27T17:15:42.296Z","dependency_job_id":null,"html_url":"https://github.com/EcomDev/download-magento-images-rs","commit_stats":null,"previous_names":["ecomdev/download-magento-images-rs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EcomDev%2Fdownload-magento-images-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EcomDev%2Fdownload-magento-images-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EcomDev%2Fdownload-magento-images-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EcomDev%2Fdownload-magento-images-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EcomDev","download_url":"https://codeload.github.com/EcomDev/download-magento-images-rs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250535065,"owners_count":21446506,"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":"2025-04-23T23:55:50.896Z","updated_at":"2025-04-23T23:55:51.430Z","avatar_url":"https://github.com/EcomDev.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Media Downloader Tool\n\nThe Media Downloader Tool is a Rust-based application for downloading media files from a remote source while utilizing batched processing and high concurrency. This tool supports downloading large volumes of media efficiently and includes progress tracking.\n\n## Features\n\n- **Batch Processing:** Efficiently fetches and processes media in configurable batches.\n- **Concurrency Control:** Controls the number of concurrent download clients.\n- **Progress Tracking:** Displays a progress bar for the media download process.\n- **Error Handling:** Reports failed, skipped, and completed downloads.\n- **Database Integration:** Reads media data from a MySQL database table.\n\n## Prerequisites\n\nBefore starting, ensure you have the following installed on your machine:\n\n- [Rust](https://www.rust-lang.org/tools/install) (version `1.83.0` or later is recommended)\n- Magento database with the necessary table (`catalog_product_entity_media_gallery`)\n\n## Installation\n\n\n1. Clone this repository:\n   ```bash\n   git clone \u003crepository-url\u003e\n   cd \u003crepository-directory\u003e\n   ```\n\n2. Build the project:\n   ```bash\n   cargo build --release\n   ```\n\n3. Set up your MySQL database connection and ensure the `catalog_product_entity_media_gallery` table is populated with entries.\n\n## Usage\n\nRun the tool with the following command:\n\n```bash\nUsage: ecomdev-download-magento-images [OPTIONS] \u003cBASE_URL\u003e\n\nArguments:\n  \u003cBASE_URL\u003e  Base URL for media download\n\nOptions:\n  -p, --base-path \u003cBASE_PATH\u003e        Directory path [default: pub/media]\n  -u, --user-agent \u003cUSER_AGENT\u003e      User agent [default: \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 Edg/125.0.0.0\"]\n  -c, --max-clients \u003cMAX_CLIENTS\u003e    Max number of clients to create for downloading [default: 100]\n  -b, --batch-size \u003cBATCH_SIZE\u003e      Max number of items to fetch per batch [default: 10000]\n  -d, --database-url \u003cDATABASE_URL\u003e  Database URL to use of connection [default: mysql://magento:magento@localhost/magento]\n  -h, --help                         Print help\n```\n\n## Development\n\nTo develop or test this tool, follow these steps:\n\n1. Ensure `sqlx` knows about your database schema by running:\n   ```bash\n   export DATABASE_URL=mysql://user:password@localhost/db\n   cargo sqlx prepare -- --lib\n   ```\n\n2. Run in development mode:\n   ```bash\n   cargo run -- [OPTIONS]\n   ```\n\n3. Test the application with mock data or a test database.\n\n## Contributing\n\nContributions are welcome! Please follow these steps:\n\n1. Fork this repository.\n2. Create a branch with your feature or fix:\n   ```bash\n   git checkout -b feature/my-feature\n   ```\n3. Commit your changes and push your branch:\n   ```bash\n   git push origin feature/my-feature\n   ```\n4. Open a pull request for review.\n\n## License\n\nThis project is licensed under the MIT License. See the `LICENSE` file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fecomdev%2Fdownload-magento-images-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fecomdev%2Fdownload-magento-images-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fecomdev%2Fdownload-magento-images-rs/lists"}