Giter Club home page Giter Club logo

numbers's Introduction

Numbers

Numbers is a Haskell library and commandline tool to retrieve trivia about numbers from the open Numbers API.

Installation

Use stack to install:

stack build
stack install

Commandline usage

numbers [OPTIONS] [NUMBER | DATE]

Categories:
  -t --trivia                           Get a trivia entry (default)
  -m --math                             Get a math entry
  -y --year                             Get a year entry
  -d --date                             Get a date entry
Response options:
  -f --fragment                         Return the entry as a sentence
                                        fragment
     --default=MESSAGE                  Show this message if requested number
                                        has no entry
Lookup options:
  -n --notfound=CEIL | FLOOR | DEFAULT  Selects an alternative if requested
                                        number has no entry
     --min=INT                          Lower limit for random entries
     --max=INT                          Upper limit for random entries
Common flags:
  -h --help                             Display help message
  -V --version                          Print version information

NUMBER can be a single integer, an interval (from..to) or a
comma-separated list of both.

DATE specifies month and day of month separated by a dot, slash or dash.

Without any arguments a number or date is randomly chosen by the API.

Library usage

All library modules should be documented well enough. You can build the docs using stack:

stack haddock

numbers's People

Contributors

modul avatar

Watchers

 avatar  avatar

numbers's Issues

Handle response status

Right now it may happen that the request returns with a Bad Gateway or Internal Server error, this should be handled better than just returning the HTML page of the response.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.