=====
|Header image|
|travis\_badge| |Code Climate| |Test Coverage| |Issue Count|
Python library to generate sparklines ▁▂▄▅▇█ in your shell based upon
relative ordering of data. ``lehar`` is a `Hindi`_ word which means
wave. ``lehar`` can be invoked via *commandline* also.
.. code:: bash
# Find commits by authors in a git repo
$ git shortlog -s | cut -f1 | lehar
▇▁▁▁▁▁▁▂▃▁▁█▁▁▂▃▅▁▁▁▂▆▁▁▁▂▁▁▁▁▂▇▁▅▆▁▁▁▄▁▁█▁▁▂▁▂▁
`Some cool usage`_
Demo
----
Installation
------------
Using ``homebrew``:
.. code:: bash
$ brew install lehar
Using ``pip``
::
$ pip install lehar
gi
API
---
lehar.draw(numbers,options)
~~~~~~~~~~~~~~~~~~~~~~~~~~~
numbers
^^^^^^^
``type`` : ``list``
options
^^^^^^^
| Only supported option is ``color``
| eg. ``color='red'``
Basic Usage
^^^^^^^^^^^
.. code:: python
>>> import lehar
# Strings
>>> lehar.draw(["0","1","2","3","4"])
'▁▂▄▆█'
# Numbers
>>> lehar.draw([0,1,2,3,4])
'▁▂▄▆█'
# Negatives
>>> lehar.draw([1,3,-34,12,44,81,0])
'▃▃▁▄▆█▃'
# Missing data
>>> lehar.draw([1,3,-34,'',12,44,'',81,0])
'▃▃▁ ▄▆ █▃'
Adding colors
^^^^^^^^^^^^^
.. code:: python
>>> lehar.draw(["0","1","2","3","4"],color="yellow")
>>> lehar.draw([1,3,-34,'',12,44,'',81,0],color="cyan")
Command line
------------
.. code:: bash
$ lehar 1 2 3 4 5
$ lehar -c red 1 2 3 4 5
$ echo "-c cyan 1 2 3 4 5" | lehar
$ lehar < input
Support
-------
``lehar`` supports both ``Python2`` & ``Python3``.
Contributing Guide
------------------
- Setup
.. code:: bash
$ git clone https://github.com/darxtrix/lehar
$ cd lehar
$ pip install -r requirements.txt
$ python setup.py develop
$ lehar
- Tests are located at ``lehar/tests.py`` and covergae tests are
located at ``.travis.yml``
.. code:: bash
$ python tests.py
- While sending a pull request increment the version at `VERSION`_ and
make sure the travis build passes.
License
-------
MIT © [Ankush Sharma](http://github.com/darxtrix)
.. _Hindi: https://en.wikipedia.org/wiki/Hindi
.. _Some cool usage: https://github.com/holman/spark/wiki/Wicked-Cool-Usage
.. _VERSION: https://github.com/darxtrix/lehar/blob/master/lehar/VERSION
.. |Header image| image:: docs/header.png
.. |travis\_badge| image:: https://travis-ci.org/darxtrix/lehar.svg?branch=master
.. |Code Climate| image:: https://codeclimate.com/github/darxtrix/lehar/badges/gpa.svg
:target: https://codeclimate.com/github/darxtrix/lehar
.. |Test Coverage| image:: https://codeclimate.com/github/darxtrix/lehar/badges/coverage.svg
:target: https://codeclimate.com/github/darxtrix/lehar/coverage
.. |Issue Count| image:: https://codeclimate.com/github/darxtrix/lehar/badges/issue_count.svg
:target: https://codeclimate.com/github/darxtrix/lehar
Metadata
Release files for lehar 0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lehar-0.4.tar.gz | 7.3 kB | Without provenance | Details for lehar-0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lehar-0.4-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for lehar-0.4-py2.py3-none-any.whl |
Total release size: 14.6 kB
Release files / lehar-0.4.tar.gz
| Download URL | lehar-0.4.tar.gz |
|---|---|
| Size | 7.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
09ed8ec66e72b612858d2b0c8e47d6535b8cf393b77f6a02b49c815f36737cd9
|
|
BLAKE2b-256 checksum How to use checksums |
773b6bd27337a2dd90d0556277bbac698828e6e0423dc52f1d0e194b3a85f8af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / lehar-0.4-py2.py3-none-any.whl
| Download URL | lehar-0.4-py2.py3-none-any.whl |
|---|---|
| Size | 7.3 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
b34436fedb8610c4228b916205352a166c4d1241cd7cb2024648ec80ebf8c059
|
|
BLAKE2b-256 checksum How to use checksums |
54737594752e6f05eb30d940ffedaf3bb99eb4af38bf322010cb6693bfb9a852
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for lehar 0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.