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
|
||||
|
||||
|
||||
##### `q`
|
||||
Quit.
|
||||
##### `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 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:
|
||||
argv = argv.split()
|
||||
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']:
|
||||
sys.exit()
|
||||
elif argv[0] in ['date', 'd']:
|
||||
|
Loading…
Reference in New Issue
Block a user