Skip to content

Commit a72221e

Browse files
committed
Doc, readme CLI
1 parent f9daa14 commit a72221e

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

README.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Features:
2828
- Convert amount from one currency to other.('USD 10$' to INR).
2929
- Currency symbols.
3030
- Currency names.
31+
- Command line interface (CLI).
3132

3233
Currency Source:
3334
-----------------
@@ -141,6 +142,16 @@ Usage Examples:
141142
>>> print c.get_symbol('GBP')
142143
£
143144
145+
- Use the CLI to get quick answers from the terminal / command line.
146+
147+
.. code-block:: bash
148+
149+
❯❯❯ forex-python -b EUR
150+
1.0 EUR = 81.0055 INR
151+
❯❯❯ forex-python -b EUR -d USD
152+
1.0 EUR = 1.1389 USD
153+
❯❯❯ forex-python -b EUR -d USD -a 3.14
154+
3.14 EUR = 3.576146 USD
144155
145156
You can view the complete `Documentation Here`_
146157

docs/source/usage.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,31 @@
11
Usage Examples:
22
===============
33

4+
Command Line Interface
5+
----------------------
6+
7+
- Display help and use the CLI to get quick answers from the terminal /
8+
command line.
9+
10+
.. code-block:: bash
11+
12+
❯❯❯ forex-python -h
13+
usage: forex-python [-h] [-b BASE] [-d DEST] [-a AMOUNT] [-n]
14+
15+
optional arguments:
16+
-h, --help show this help message and exit
17+
-b BASE, --base BASE Currency you are converting from. (default: USD)
18+
-d DEST, --dest DEST Currency you are converting to. (default: INR)
19+
-a AMOUNT, --amount AMOUNT
20+
Amount to convert. (default: 1.0)
21+
-n, --notify Display desktop alerts. (default: False)
22+
❯❯❯ forex-python -b EUR
23+
1.0 EUR = 81.0055 INR
24+
❯❯❯ forex-python -b EUR -d USD
25+
1.0 EUR = 1.1389 USD
26+
❯❯❯ forex-python -b EUR -d USD -a 3.14
27+
3.14 EUR = 3.576146 USD
28+
429
Currency Rates
530
--------------
631
1. list all latest currency rates for "USD"::

0 commit comments

Comments
 (0)