{"id":37101896,"url":"https://github.com/obalunenko/amazon-orders","last_synced_at":"2026-01-14T12:21:45.036Z","repository":{"id":264923065,"uuid":"894639225","full_name":"obalunenko/amazon-orders","owner":"obalunenko","description":"Helper tools to parse amazon order repors files","archived":false,"fork":false,"pushed_at":"2025-11-24T17:45:46.000Z","size":928,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-28T06:07:11.256Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/obalunenko.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-11-26T17:58:24.000Z","updated_at":"2025-11-24T17:45:44.000Z","dependencies_parsed_at":"2025-01-27T14:25:58.149Z","dependency_job_id":"d3b5e396-a629-435d-b4c9-25e4596b5b39","html_url":"https://github.com/obalunenko/amazon-orders","commit_stats":null,"previous_names":["obalunenko/amazon-orders"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/obalunenko/amazon-orders","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/obalunenko%2Famazon-orders","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/obalunenko%2Famazon-orders/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/obalunenko%2Famazon-orders/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/obalunenko%2Famazon-orders/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/obalunenko","download_url":"https://codeload.github.com/obalunenko/amazon-orders/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/obalunenko%2Famazon-orders/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28420558,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2026-01-14T12:21:43.984Z","updated_at":"2026-01-14T12:21:45.028Z","avatar_url":"https://github.com/obalunenko.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# amazon-orders\n\nHelper tools to parse amazon order reports files\n\n\n\n### Program Structure\n\nThe program consists of several parts:\n\n1. **Flag Parsing and File Input**\n2. **CSV Parsing**\n3. **Order Processing**\n4. **Spending Calculation**\n\n### Running the Program\n\n#### Step 1: Prepare CSV Input File\n\nEnsure your CSV input file is correctly formatted and contains the necessary order data. The file should contain headers and data rows corresponding to the order fields.\nReports files could be downloaded from the following URL:\nhttps://www.amazon.com/hz/privacy-central/data-requests/preview.html\n\n#### Step 2: Build and Execute the Program\n\n1. **Compile the Program:**\n\n    ```bash\n      make build\n    ```\n\n2. **Run the Program:**\n\n    ```bash\n       ./bin/order_processor --input=\u003cpath/to/your/orders.csv\u003e\n    ```\n\n    Replace `\u003cpath_to_csv_file\u003e` with the path to your CSV input file.\n\n### Flag Details\n- `--input`: The flag to specify the path to the input CSV file. This is a required parameter.\n\n### Example\nHere's an example of how to run the program:\n\n```bash\n./order_processor --input=orders.csv\n```\n\n\n### Program Execution\nUpon running the program with the above command, it will:\n1. Read and parse the CSV input file.\n2. Extract and categorize orders based on their currencies.\n3. Calculate the total spending for each currency.\n4. Print the total spend per currency rounded to two decimal places.\n\n### Output\nThe output will be displayed in the console. Here’s an example of what the output might look like:\n\n```text\nTotal spend in USD: $1234.56\nTotal spend in EUR: €789.00\n```\n\n\n### Error Handling\nThe program includes basic error handling to ensure robustness:\n- If the input file is not provided or cannot be opened, a fatal log message will be displayed.\n- If there are parsing errors, appropriate error messages will be logged.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobalunenko%2Famazon-orders","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fobalunenko%2Famazon-orders","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fobalunenko%2Famazon-orders/lists"}