{"id":15715815,"url":"https://github.com/gnapse/metric","last_synced_at":"2025-10-19T15:38:02.024Z","repository":{"id":2420301,"uuid":"3388795","full_name":"gnapse/metric","owner":"gnapse","description":"Java Unit Conversion Library","archived":false,"fork":false,"pushed_at":"2014-09-05T18:43:58.000Z","size":212,"stargazers_count":4,"open_issues_count":1,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-29T13:11:21.453Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://gnapse.com/metric","language":"Java","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/gnapse.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}},"created_at":"2012-02-08T16:13:12.000Z","updated_at":"2025-01-03T01:43:44.000Z","dependencies_parsed_at":"2022-09-17T11:20:41.715Z","dependency_job_id":null,"html_url":"https://github.com/gnapse/metric","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnapse%2Fmetric","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnapse%2Fmetric/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnapse%2Fmetric/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnapse%2Fmetric/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gnapse","download_url":"https://codeload.github.com/gnapse/metric/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249795202,"owners_count":21326777,"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-10-03T21:43:09.908Z","updated_at":"2025-10-19T15:38:01.899Z","avatar_url":"https://github.com/gnapse.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Metric: Unit Conversion for Java\n================================\n\nMetric is a Java library that processes unit conversion queries written in natural language.  It currently understands only English, but it aims at supporting other languages in the future.  Among the major highlights, it supports currency conversion and unit prefixes, both [SI prefixes](http://en.wikipedia.org/wiki/SI_prefix) and [binary prefixes](http://en.wikipedia.org/wiki/Binary_prefix). It also stores numberic values internally, and performs calculations, using arbitrary precision fractions, so there's absolutely no loss of precision in the conversions.\n\nThe library loads unit definitions from a *universe definition file*, where properties and their units are declared and defined. Refer to the sample file included in the project to get an idea of the syntax and features supported.\n\nDownloading and building the project\n------------------------------------\n\nFirst of all, clone the repo or [download the zipball](https://github.com/gnapse/metric/zipball/master) and extract it.  Then, open a terminal and\ngo to the root folder of the project, and build it with Maven.\n\n    $ mvn assembly:assembly\n\nThis generates a couple of jar packages inside the `target/` subdirectory within the project root, one with dependencies included, and the other one without dependencies, just the library.  You can use it as a library in your own project, or you can run the jar file itself to try a small command-line application included.\n\nTrying out the command-line app\n-------------------------------\n\nStanding in the project root folder, after building the project as instructed above, you can run unit conversion queries by invoking the jar file as an application, and passing the query as command-line arguments.\n\n    $ java -jar target/metric-0.01-jar-with-dependencies.jar 100 miles per hour in meters per second\n    100 mi / h = 44.704 m / s\n\nIt'll print out the answer to standard output, as shown above.\n\nWhat's next\n-----------\n\nFeel free to contribute.  This project is just starting and any suggestions of new features, improvements and bug fixes are welcome.\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgnapse%2Fmetric","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgnapse%2Fmetric","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgnapse%2Fmetric/lists"}