#!/usr/bin/env python3

""""
exch
=====

A CLI application built using python to see currency exchange rates.

:copyright: (c) 2017 by Anshul Chauhan
"""

import click

CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help'])

@click.command(context_settings=CONTEXT_SETTINGS)
@click.option('--base', '-f', default='USD', type=str,
              help='The currency you are trying to convert from.',
              show_default=True)
@click.option('--target', '-t', default='INR', type=str,
              help='The currency you\'re converting to.',
              show_default=True)
@click.option('--value', '-v', default=1, type=float,
              help='The amount you want to convert.',
              show_default=True)
def cli(base, target, value):
    """
    Get the latetst currency exchange rates.

    It gets exchange rates from:

    \b
        - fixer.io
    """
    if base == target:
        click.echo('1.00')

@@ -160,16 +160,47 @@
 rt click
+%0Afrom exch.helpers import fixer
 %0A%0ACONTEX
@@ -254,16 +254,37 @@
 elp'%5D)%0A%0A
+__version__ = '0.1'%0A%0A
 @click.c
@@ -351,17 +351,17 @@
 ase', '-
-f
+b
 ', defau
@@ -371,32 +371,51 @@
 'USD', type=str,
+ show_default=True,
 %0A              h
@@ -411,37 +411,33 @@
           help='
-The c
+C
 urrency you are 
@@ -440,65 +440,25 @@
 are 
-trying to 
 convert
+ing
  from.'
-,%0A              show_default=True
 )%0A@c
@@ -511,16 +511,35 @@
 ype=str,
+ show_default=True,
 %0A       
@@ -555,13 +555,9 @@
 lp='
-The c
+C
 urre
@@ -587,41 +587,8 @@
 to.'
-,%0A              show_default=True
 )%0A@c
@@ -606,19 +606,20 @@
 ('--
-value
+amount
 ', '-
-v
+a
 ', d
@@ -626,16 +626,18 @@
 efault=1
+.0
 , type=f
@@ -641,16 +641,35 @@
 e=float,
+ show_default=True,
 %0A       
@@ -685,28 +685,15 @@
 lp='
-The a
+A
 mount 
-you want 
 to c
@@ -704,41 +704,8 @@
 rt.'
-,%0A              show_default=True
 )%0Ade
@@ -728,13 +728,14 @@
 et, 
-value
+amount
 ):%0A 
@@ -783,37 +783,8 @@
 nge 
-rates.%0A%0A    It gets exchange 
 rate
@@ -830,35 +830,50 @@
 %22%22%22%0A
+%0A
     
-if 
+output = fixer(
 base
- ==
+,
  target
-:%0A    
+, amount)%0A
     
@@ -887,12 +887,12 @@
 cho(
-'1.00'
+output
 )%0A

refactor the command arguments