{"id":22898578,"url":"https://github.com/trustmaster/metric-proxy","last_synced_at":"2025-04-01T01:52:58.932Z","repository":{"id":267010593,"uuid":"900019457","full_name":"trustmaster/metric-proxy","owner":"trustmaster","description":"Proxy for web pages converting imperial units to metric units","archived":false,"fork":false,"pushed_at":"2024-12-07T16:43:17.000Z","size":46,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-07T02:47:26.942Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/trustmaster.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-07T16:40:43.000Z","updated_at":"2024-12-07T16:43:21.000Z","dependencies_parsed_at":"2024-12-07T17:38:27.577Z","dependency_job_id":null,"html_url":"https://github.com/trustmaster/metric-proxy","commit_stats":null,"previous_names":["trustmaster/metric-proxy"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trustmaster%2Fmetric-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trustmaster%2Fmetric-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trustmaster%2Fmetric-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trustmaster%2Fmetric-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trustmaster","download_url":"https://codeload.github.com/trustmaster/metric-proxy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246569008,"owners_count":20798341,"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":"2024-12-14T00:33:59.138Z","updated_at":"2025-04-01T01:52:58.912Z","avatar_url":"https://github.com/trustmaster.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Metric Proxy\n\nMetric Proxy is a Cloudflare Worker project designed to handle and process metrics efficiently. It fetches HTML content from a given URL, converts imperial units to metric units, and returns the modified HTML content.\n\n## Getting Started\n\n### Prerequisites\n\n- Node.js\n- npm\n- Cloudflare Wrangler CLI\n\n### Installation\n\n1. Clone the repository:\n   ```sh\n   git clone https://github.com/yourusername/metric-proxy.git\n   cd metric-proxy\n   ```\n\n2. Install dependencies:\n   ```sh\n   npm install\n   ```\n\n## How It Works\n\nThe main functionality is implemented in the [`convertHTMLToMetric`](src/index.ts) function in [src/index.ts](src/index.ts). This function:\n\n1. Fetches HTML content from a given URL.\n2. Uses regular expressions to find and convert imperial units (e.g., cups, ounces, pounds) to metric units (e.g., milliliters, grams).\n3. Returns the modified HTML content.\n\nThe worker listens for incoming requests, extracts the URL from the request, fetches the HTML content, processes it using `convertHTMLToMetric`, and returns the modified HTML content.\n\n### Development\n\nTo start the development server, run:\n```sh\nnpm run dev\n```\n\n### Deployment\n\nTo deploy the project to Cloudflare Workers, run:\n```sh\nnpm run deploy\n```\n\n### Testing\n\nTo run the tests, use:\n```sh\nnpm test\n```\n\n## License\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrustmaster%2Fmetric-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrustmaster%2Fmetric-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrustmaster%2Fmetric-proxy/lists"}