{"id":20551600,"url":"https://github.com/clarketm/ncalc","last_synced_at":"2025-04-14T11:31:25.344Z","repository":{"id":57531324,"uuid":"98473800","full_name":"clarketm/ncalc","owner":"clarketm","description":"Command line utility for quick number base conversions ( ascii / binary / octal / decimal / hexadecimal )","archived":false,"fork":false,"pushed_at":"2019-04-15T05:26:22.000Z","size":46207,"stargazers_count":20,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-28T00:44:05.725Z","etag":null,"topics":["ascii","base-conversion","binary","cli","decimal","executable","golang","hexadecimal","number-converter","octal"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/clarketm.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}},"created_at":"2017-07-26T23:30:26.000Z","updated_at":"2024-06-07T01:40:40.000Z","dependencies_parsed_at":"2022-09-06T17:21:46.225Z","dependency_job_id":null,"html_url":"https://github.com/clarketm/ncalc","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clarketm%2Fncalc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clarketm%2Fncalc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clarketm%2Fncalc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clarketm%2Fncalc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clarketm","download_url":"https://codeload.github.com/clarketm/ncalc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248871780,"owners_count":21175290,"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":["ascii","base-conversion","binary","cli","decimal","executable","golang","hexadecimal","number-converter","octal"],"created_at":"2024-11-16T02:32:25.578Z","updated_at":"2025-04-14T11:31:25.319Z","avatar_url":"https://github.com/clarketm.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [ncalc](https://godoc.org/github.com/clarketm/ncalc)\n\nCommand line utility for *quick* number base conversions ( **ascii** / **binary** / **octal** / **decimal** / **hexadecimal** ).\n\n[![release-badge](https://img.shields.io/github/release/clarketm/ncalc.svg)](https://github.com/clarketm/ncalc/releases)\n[![circleci-badge](https://circleci.com/gh/clarketm/ncalc.svg?style=shield)](https://circleci.com/gh/clarketm/ncalc)\n\n```shell\n\nNAME:\n    ncalc – number base converter.\n\nSYNOPSIS:\n    ncalc [ opts... ] [ number|character ]\n\nOPTIONS:\n    -h, --help                  print usage.\n    -i, --input format          input format. see FORMATS. (default: decimal|ascii)\n    -o, --output format         output format. see FORMATS. (default: all)\n    -q, --quiet                 suppress printing of output format type(s)\n    -v, --version               print version number.\n\nFORMATS:\n    (a)scii                     character\n    (b)inary                    base 2\n    (o)ctal                     base 8\n    (d)ecimal                   base 10\n    (h)exadecimal               base 16\n\nEXAMPLES:\n    ncalc \"6\"                               # output `decimal` number `6` in `all` formats\n    ncalc \"G\"                               # output `ascii` character `G` in `all` formats\n    ncalc -i a \"f\"                          # output `ascii` character `f` in `all` formats\n    ncalc -i decimal -o ascii \"15\"          # output `decimal` number `15` as `ascii`\n    ncalc --input h --output o \"ff\"         # output `hexadecimal` number `ff` as `octal`\n\n```\n## Installation\n\n#### Golang\n```shell\n$ go get -u github.com/clarketm/ncalc\n```\n\n#### Install script\n```shell\n$ git clone \"https://github.com/clarketm/ncalc.git\"\n$ cd ncalc \u0026\u0026 sudo sh install.sh\n```\n\n#### Source (Mac/Linux)\n```shell\n# List of builds: https://github.com/clarketm/ncalc/releases/\n\n$ BUILD=darwin_amd64.tar.gz     # Mac (64 bit)\n# BUILD=linux_amd64.tar.gz      # Linux (64 bit)\n\n$ BIN_DIR=/usr/local/bin        # `bin` install directory\n$ mkdir -p $BIN_DIR\n\n$ curl -L https://github.com/clarketm/ncalc/releases/download/v1.1.2/$BUILD | tar xz -C $BIN_DIR        # install\n```\n\n#### Source (Windows)\n* https://github.com/clarketm/ncalc/releases/download/v1.1.2/windows_amd64.zip\n\n\n## Usage\n\n#### Convert `ascii` to `decimal`\n```bash\n# Short form\n$ ncalc -i a -o d 'w'\n\ndecimal: 119\n\n\n# Long form\n$ ncalc -i ascii -o decimal 'w'\n\ndecimal: 119\n\n\n# Very long form\n$ ncalc --input ascii --output decimal 'w'\n\ndecimal: 119\n\n\n# Quite mode (-q|--quiet)\n$ ncalc -q -i ascii --output decimal 'w'\n\n119\n```\n\n#### Convert `decimal` to `binary`\n```shell\n$ ncalc -i decimal -o binary 170\n\nbinary: 10101010\n```\n\n#### Convert `binary` to `decimal`\n```shell\n$ ncalc -i b -o d 10101010\n\ndecimal: 170\n```\n\n#### Convert `ascii` to `all` formats\n```shell\n$ ncalc -i a 'G'\n\nascii: 'G'\nbinary: 1000111\noctal: 107\ndecimal: 71\nhexadecimal: 47\n```\n\n---\n\nYou can see the full reference documentation for the **ncalc** package at [godoc.org](https://godoc.org/github.com/clarketm/ncalc), or through go's standard documentation system:\n```bash\n$ godoc -http=:6060\n\n# Open browser to: \"http://localhost:6060/pkg/github.com/clarketm/ncalc\"  to view godoc.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclarketm%2Fncalc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclarketm%2Fncalc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclarketm%2Fncalc/lists"}