Help in interactive mode
This commit is contained in:
parent
ea7a9926a2
commit
faab574f82
@ -26,13 +26,13 @@ Reverse conversion direction (EUR to specified currency, instead of specified cu
|
|||||||
|
|
||||||
Calculate interactively on stdin
|
Calculate interactively on stdin
|
||||||
|
|
||||||
|
##### `q`, `exit`, `quit`
|
||||||
##### `q`
|
Quit the program.
|
||||||
Quit.
|
|
||||||
##### `AMOUNT CURRENCY`
|
##### `AMOUNT CURRENCY`
|
||||||
Convert AMOUNT euros to CURRENCY.
|
Convert AMOUNT euros to CURRENCY.
|
||||||
##### `CURRENCY AMOUNT`
|
##### `CURRENCY AMOUNT`
|
||||||
Convert AMOUNT CURRENCY to euros.
|
Convert AMOUNT CURRENCY to euros.
|
||||||
|
##### `d`, `date`
|
||||||
|
Print the date the data is from.
|
||||||
|
|
||||||
|
|
||||||
|
7
crawl.py
7
crawl.py
@ -71,6 +71,13 @@ vals_group.add_argument(
|
|||||||
def _process_stdin(argv: str, res: utils.CurrencyResult) -> None:
|
def _process_stdin(argv: str, res: utils.CurrencyResult) -> None:
|
||||||
argv = argv.split()
|
argv = argv.split()
|
||||||
try:
|
try:
|
||||||
|
if argv[0] in ['h', 'man', 'help']:
|
||||||
|
print("""Usage:
|
||||||
|
q | exit | quit: Quit the program.
|
||||||
|
AMOUNT CURRENCY: Convert AMOUNT euros to CURRENCY.
|
||||||
|
CURRENCY AMOUNT: Convert AMOUNT CURRENCY to euros.
|
||||||
|
d | date: Print the date which the data is from.
|
||||||
|
""")
|
||||||
if argv[0] in ['q', 'exit', 'quit']:
|
if argv[0] in ['q', 'exit', 'quit']:
|
||||||
sys.exit()
|
sys.exit()
|
||||||
elif argv[0] in ['date', 'd']:
|
elif argv[0] in ['date', 'd']:
|
||||||
|
Loading…
Reference in New Issue
Block a user