radiorec/radiorec.py

23 lines
748 B
Python
Raw Normal View History

2013-09-11 10:46:47 +02:00
#!/usr/bin/env python3
2013-09-11 16:10:16 +02:00
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
2013-09-11 10:46:47 +02:00
2013-09-11 11:06:13 +02:00
"""
This script records internet radio streams. It can be used in conjunction
with "at" or "crontab".
"""
2013-09-11 10:46:47 +02:00
import argparse
import configparser
import urllib.request
2013-09-11 16:10:16 +02:00
def main():
2013-09-12 15:23:00 +02:00
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()
2013-09-11 16:10:16 +02:00
if __name__ == '__main__':
main()