Added some arguments
This commit is contained in:
parent
24b0956280
commit
41394fa027
1 changed files with 6 additions and 1 deletions
|
@ -11,7 +11,12 @@ import configparser
|
|||
import urllib.request
|
||||
|
||||
def main():
|
||||
# TODO: Implement argparse
|
||||
parser = argparse.ArgumentParser(description='This program records internet radio streams.')
|
||||
parser.add_argument('station', type=str, help='Name of the radio station '
|
||||
'(see config file for a list)')
|
||||
parser.add_argument('duration', type=int, help='Recording time in minutes')
|
||||
parser.add_argument('name', nargs='?', type=str, help='A name for the recording')
|
||||
args = parser.parse_args()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
Loading…
Reference in a new issue