Skip to content

Commit

Permalink
Doc, readme CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwinvis committed Jan 17, 2019
1 parent f9daa14 commit a72221e
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Features:
- Convert amount from one currency to other.('USD 10$' to INR).
- Currency symbols.
- Currency names.
- Command line interface (CLI).

Currency Source:
-----------------
Expand Down Expand Up @@ -141,6 +142,16 @@ Usage Examples:
>>> print c.get_symbol('GBP')
£
- Use the CLI to get quick answers from the terminal / command line.

.. code-block:: bash
❯❯❯ forex-python -b EUR
1.0 EUR = 81.0055 INR
❯❯❯ forex-python -b EUR -d USD
1.0 EUR = 1.1389 USD
❯❯❯ forex-python -b EUR -d USD -a 3.14
3.14 EUR = 3.576146 USD
You can view the complete `Documentation Here`_

Expand Down
25 changes: 25 additions & 0 deletions docs/source/usage.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,31 @@
Usage Examples:
===============

Command Line Interface
----------------------

- Display help and use the CLI to get quick answers from the terminal /
command line.

.. code-block:: bash
❯❯❯ forex-python -h
usage: forex-python [-h] [-b BASE] [-d DEST] [-a AMOUNT] [-n]
optional arguments:
-h, --help show this help message and exit
-b BASE, --base BASE Currency you are converting from. (default: USD)
-d DEST, --dest DEST Currency you are converting to. (default: INR)
-a AMOUNT, --amount AMOUNT
Amount to convert. (default: 1.0)
-n, --notify Display desktop alerts. (default: False)
❯❯❯ forex-python -b EUR
1.0 EUR = 81.0055 INR
❯❯❯ forex-python -b EUR -d USD
1.0 EUR = 1.1389 USD
❯❯❯ forex-python -b EUR -d USD -a 3.14
3.14 EUR = 3.576146 USD
Currency Rates
--------------
1. list all latest currency rates for "USD"::
Expand Down

0 comments on commit a72221e

Please sign in to comment.