diff --git a/radiorec.py b/radiorec.py index b463aaf..97af199 100755 --- a/radiorec.py +++ b/radiorec.py @@ -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()