{"id":41426462,"url":"https://github.com/eitol/document_color_meter","last_synced_at":"2026-01-23T14:17:04.832Z","repository":{"id":135226958,"uuid":"298917912","full_name":"Eitol/document_color_meter","owner":"Eitol","description":"Service to measure the amount of color in an image or document","archived":false,"fork":false,"pushed_at":"2020-09-27T00:25:08.000Z","size":11332,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-22T00:15:56.410Z","etag":null,"topics":["black","color","measure","measurement","meter","while"],"latest_commit_sha":null,"homepage":"","language":"Go","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/Eitol.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}},"created_at":"2020-09-26T23:41:30.000Z","updated_at":"2020-12-30T18:17:07.000Z","dependencies_parsed_at":"2024-01-12T18:39:08.962Z","dependency_job_id":"6e319992-46cc-47a5-929a-fd955743433b","html_url":"https://github.com/Eitol/document_color_meter","commit_stats":{"total_commits":1,"total_committers":1,"mean_commits":1.0,"dds":0.0,"last_synced_commit":"4d46a89d02a79ea5e18072ff3994d7722cdda291"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Eitol/document_color_meter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eitol%2Fdocument_color_meter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eitol%2Fdocument_color_meter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eitol%2Fdocument_color_meter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eitol%2Fdocument_color_meter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Eitol","download_url":"https://codeload.github.com/Eitol/document_color_meter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eitol%2Fdocument_color_meter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28693779,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T14:15:13.573Z","status":"ssl_error","status_checked_at":"2026-01-23T14:09:05.534Z","response_time":59,"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":["black","color","measure","measurement","meter","while"],"created_at":"2026-01-23T14:17:04.188Z","updated_at":"2026-01-23T14:17:04.817Z","avatar_url":"https://github.com/Eitol.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Service to measure the amount of color in an image or document\n\nYou must see the spanish documentation in:\n\n[./doc/document_color_meter.pdf](./doc/document_color_meter.pdf)\n\n\n#### What does this software do?\n\n#### INPUT:\n \nAn image or document \n\nSupported input formats:\n- Image: JPEG, PNG, SVG\n- Document: \n    - Word (doc, docx)\n    - Excel (xls, xlsx)\n    - PowerPoint (ppt, pttx)\n    - OpenOffice/LibreOffice (odt)\n    - PDF        \n\n\n#### OUTPUT:\n\nThe measure of the color per each page\n\nFor example:\n\nThe next image contains equal content of black, color, gray and white:\n\n![Flow](./api_front/core/test_util/testdata/multicolor.jpg)\n\nThen the output is the next:\n\n```json\n{\n    \"documentName\": \"multicolor.png\",\n    \"responseStatus\": \"success\",\n    \"result\": {\n        \"pages\": {\n            \"1\": {\n                \"totalColorPercentage\": 25,\n                \"percentageByColor\": {\n                    \"black\": 25,\n                    \"color\": 25,\n                    \"gray\": 25,\n                    \"white\": 25\n                }\n            }\n        },\n        \"pagesCount\": 1,\n        \"documentType\": \"image/png\"\n    },\n    \"details\": \"\",\n    \"binarizedPages\": null,\n    \"outPath\": \"\"\n}\n```\n\nTo reproduce this do the following:\n##### Step 1: Start the project\n```bash\ndocker-compose up\n```\n\n##### Step 2: Do the request using curl (or postman) \n \n```bash\ncurl --location --request POST 'localhost:8080/measure_color' \\\n--form 'binarize=false' \\\n--form 'whiteThreshold=0' \\\n--form 'blackThreshold=0' \\\n--form 'grayThreshold=0' \\\n--form 'file=@github.com/Eitol/document_color_meter/api_front/core/test_util/testdata/multicolor.png'\n```\n\nNote: Change the path of the image\n\n# Internal\n\n### Flow\nThe detail of the flow is the next\n![Flow](./doc/flow.png)\n\n### Architecture\n\nThe system is made up of 3 services. \nExpose an HTTP1 / JSON api\n\nInternally it communicates with two gRPC services\n\n![Components](./doc/components.png)\n\n#### How to run?\n\n\n\nYou should see an output like this:\n\n![Flow](./doc/run_out.png)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feitol%2Fdocument_color_meter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feitol%2Fdocument_color_meter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feitol%2Fdocument_color_meter/lists"}