Added some arguments

This commit is contained in:
Martin Brodbeck 2013-09-12 15:23:00 +02:00
parent 24b0956280
commit 41394fa027

View file

@ -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()