Instant calculating from the terminal into the terminal
Project description
bashcalc
Instant calculating from the terminal into the terminal
bashcalc
is an instant command-line tool for calculating directly mathematical expression into the terminal.
It is designed for working on cluster-server, where numbers or expressions have to be calculated without starting a new application or blogging any terminal windows. Therefore it will just show the result and immediately close. For this purpose, it is a pure python
based and does not require any additional packages.
The idea is to have a simplistic tool that can quickly plot the results to the screen with various options:
- simple example
╰─ bashcalc 1230/2
>>> 615
- advanced example
╰─ pipenv run bashcalc "2*exp(3+(2//3))"
>>> 40.1710738463753358473695698194205760955810546875
- advanced example with rounded output
╰─ pipenv run bashcalc "2*exp(3+(2//3))" -r 5
>>> 40.17107
- advanced example as scientific output
╰─ pipenv run bashcalc "2*exp(3+(2//3))" -s 5 -b
>>> 4.01711E+1
Installation
pip install bashcalc
or
pip install https://github.com/Anselmoo/bashcalc.git
or
python setup.py install
Options
╰─ pipenv run bashcalc -h
usage: bashcalc [-h] [-c COLOR] [-b] [-u] [-i] [-r ROUND] [-s SCIENCE] [-v]
infile
copy or rename any file(s) to a hash-secured filename via terminal
positional arguments:
infile Write the mathematic expression like: "(2 + 4) * 3"
optional arguments:
-h, --help show this help message and exit
-c COLOR, --color COLOR
define the color of the output. The following options
are available:default, black,
red, green, yellow,
blue, magenta, cyan,
lightgray, darkgray,
lightred, lightgreen,
lightyellow, lightblue,
lightmagenta, lightcyan,
white
-b, --bold Print results in bold mode
-u, --underlined Print results in underlined mode
-i, --int Result will be printed as intiger-value
-r ROUND, --round ROUND
Result will be printed as rounded float-value for
given number of digits
-s SCIENCE, --science SCIENCE
Result will be printed in scientific notation
-v, --version displays the current version of bashcalc
Author
Contributions
I'm happy to accept how to improve batchplot; please forward your issues or pull requests.
Keep in mind that pull requests have to pass TravisCI in combination with flake8, black, and pydocstyle.
License
The source code of bashplot
is licensed under the MIT license.
CHANGES
Changes
TODO
TODO
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file bashcalc-1.0.tar.gz
.
File metadata
- Download URL: bashcalc-1.0.tar.gz
- Upload date:
- Size: 10.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d258701c09627da21720dbf1729bf7d7ade764fa32305c1646467e11e248e75 |
|
MD5 | 1dc068902012cd85eb325a1cb5858dee |
|
BLAKE2b-256 | e87ad33518c1ebff14487cc85e9642c28943128c65058ed9b59408237ea67feb |
File details
Details for the file bashcalc-1.0-py3.7.egg
.
File metadata
- Download URL: bashcalc-1.0-py3.7.egg
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3abc97d0b03e5a2c548557621715886f12752d656ef9c2cb86258b063d8e7d05 |
|
MD5 | 0c1f7f1897a8bcc0a1a401777c86abd1 |
|
BLAKE2b-256 | cdd8df3a3fbe967ac0ae4f64c1b8812b7182445fddc0a1d98c36cdf6f45f27d7 |
File details
Details for the file bashcalc-1.0-py3-none-any.whl
.
File metadata
- Download URL: bashcalc-1.0-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f344da1b033840bdb0bf6416684628a8e7d01a0ed28259212c4160961b8ff62 |
|
MD5 | 931de64b06707aabf4066eba1662631f |
|
BLAKE2b-256 | 90f49991cba2c060f2e8858074d9d92b5edd54766641ae26832ddfaa6aa00ce3 |