Metadata-Version: 2.1
Name: calcu
Version: 1.0.0
Summary: Very simple Python calculator for your terminal
Author-email: Chris Arderne <chris@rdrn.me>
License: MIT License        
        Copyright (c) 2020 Chris Arderne        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.        
Project-URL: homepage, https://github.com/carderne/calcu
Keywords: calculator,cli
Classifier: Environment :: Console
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: Unix
Classifier: Programming Language :: Python
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: black ; extra == 'dev'
Requires-Dist: build ; extra == 'dev'
Requires-Dist: flake8 ; extra == 'dev'
Requires-Dist: isort ; extra == 'dev'
Requires-Dist: mypy ; extra == 'dev'
Requires-Dist: pre-commit ; extra == 'dev'
Requires-Dist: pytest ; extra == 'dev'
Requires-Dist: pytest-cov ; extra == 'dev'
Requires-Dist: setuptools-scm ; extra == 'dev'
Requires-Dist: tox ; extra == 'dev'
Requires-Dist: twine ; extra == 'dev'

# calcu
[![publish](https://github.com/carderne/calcu/actions/workflows/publish.yml/badge.svg)](https://github.com/carderne/calcu/actions/workflows/publish.yml)

A simple calculator for your CLI.

(It uses Python's `eval()` and spits out the result, with some prettifying.)

![example-gif](usage.gif)

## Installation
```bash
pip install calcu
```

## Usage
Type `c` followed by your expression.

Example:
```bash
c 2+2
             = 4
```

Refer to the result of the previous calculation with an underscore `_`:
```bash
c _+10
             = 14
```

Do multiplication and exponentiation:
```bash
c 2 x 3^2
             = 18
# you can also use * and ** but then you must
# wrap your expression in quotes ' ' or bash will mess it up
# eg: c '2*3**2'
```

And dividing and brackets:
```bash
c [2+10]/10
             = 1.2
# as above, the square brackets are to stop bash cleverness
# if you want to use regular brackets, use quotes
# eg: c '(2+10)/10
```

Use any function from Python's `math` library:
```bash
c log[e] x pi
             = 3.141592654
```

It returns the appropriate number of decimal values, up to 9.
