https://github.com/ryosan-470/factordb-go
FactorDB CLI written by Golang
https://github.com/ryosan-470/factordb-go
cli factordb golang
Last synced: 6 months ago
JSON representation
FactorDB CLI written by Golang
- Host: GitHub
- URL: https://github.com/ryosan-470/factordb-go
- Owner: ryosan-470
- License: mit
- Created: 2017-06-03T08:53:56.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-09T09:44:28.000Z (about 9 years ago)
- Last Synced: 2024-06-20T00:37:46.798Z (about 2 years ago)
- Topics: cli, factordb, golang
- Language: Go
- Size: 30.3 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# FactorDB CLI
[](https://circleci.com/gh/ryosan-470/factordb-go)
[](https://ci.appveyor.com/project/ryosan-470/factordb-go/)
[](https://github.com/ryosan-470/factordb-go/blob/master/LICENSE.md)
[](https://codecov.io/gh/ryosan-470/factordb-go)
[](https://github.com/ryosan-470/factordb-go/releases)
The [FactorDB](https://factordb.com) is the database to store known factorizations for any number.
This tool can use on your command line.
Although I have already written [factordb-pycli](https://github.com/ryosan-470/factordb-pycli) with Python before, I want to use this tool on several platforms like on Windows machine and ARM Linux.
## Build & Installation (on macOS)
If you use macOS, you should follow the instruction.
### Requirements
* Go >= 1.8
* glide
```bash
$ brew install go glide
```
### Build
```bash
$ make deps
$ make
$ bin/factordb --help
NAME:
factordb - The CLI for factordb.com
USAGE:
factordb [global options] command [command options] [arguments...]
VERSION:
0.0.1
COMMANDS:
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--json Return response formated JSON
--help, -h show help
--version, -v print the version
```
After installation, you should copy a binary to your PATH.
## Windows
Download pre-build binary from [here](https://github.com/ryosan-470/factordb-go/releases).
| Platform | Status |
|:---------|:-------:|
|Windows|[](https://ci.appveyor.com/project/ryosan-470/factordb-go/)|
## CLI
If you want to know the result of factorization of 16, you should type like this:
```bash
$ factordb 16
2 2 2 2
```
If you want to know more detail of result, you can get an answer of JSON format.
```bash
$ factordb --json 16
{"id": "https://factordb.com/?id=2", "status": "FF", "factors": [2, 2, 2, 2]}
```
# License
MIT