Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/relrod/googlecalculator-scala

A client to Google Calculator in Scala using JSoup.
https://github.com/relrod/googlecalculator-scala

Last synced: 13 days ago
JSON representation

A client to Google Calculator in Scala using JSoup.

Awesome Lists containing this project

README

        

GoogleCalculator for Scala
==========================

[![Build Status](https://secure.travis-ci.org/CodeBlock/GoogleCalculator-scala.png)](http://travis-ci.org/CodeBlock/GoogleCalculator-scala)

This is just a very simple wrapper around Google Calculator, similar to what
WWW::Google::Calculator does for Perl.

Using it
========

```scala
scala> import me.elrod.GoogleCalculator._
import me.elrod.GoogleCalculator._

scala> GoogleCalculator.calculate("2 + 2")
res0: String = 2 + 2 = 4

scala> GoogleCalculator.calculate("3 GB to MB")
res1: String = 3 gigabytes = 3072 megabytes

scala> GoogleCalculator.calculate("pi")
res2: String = pi = 3.14159265
```

License
=======

3-clause BSD, same as Scala itself.

Contributions
=============

Glady accepted!