Delete unused script which records and converts at the same time.
[recordtv.git] / src / recordtv
blob8837df3eeeaf56f4bc1d04ee0bae918f1fe1ed31
1 #!/usr/bin/python
3 from optparse import OptionParser
4 import rtv_download, rtv_schedule, rtv_tvguide, rtv_delete
5 from rtv_config import GTVGConfig
7 def main():
8 parser = OptionParser()
10 parser.add_option( "-d", "--download-listings", action="store_true",
11 dest="download", default = False,
12 help="download listings using XMLTV" )
14 parser.add_option("-s", "--schedule-recordings", action="store_true",
15 dest="schedule", default=False,
16 help="schedule today's recordings")
18 parser.add_option("-e", "--delete-old", action="store_true",
19 dest="delete", default=False,
20 help="deleted recordings marked as deleted in web interface")
22 parser.add_option("-i", "--interactive", action="store_true",
23 dest="interactive", default=False,
24 help="ask the user if input is needed")
26 parser.add_option("-n", "--install-dir", dest="install_dir",
27 help="supply the install directory", metavar="INSTDIR" )
29 parser.add_option("-g", "--generate-html-guide", action="store_true",
30 dest="generate_html", default=False,
31 help="generate a TV guide in HTML form")
33 parser.add_option("-t", "--test-all", action="store_true",
34 dest="test_all", default=False,
35 help="run all tests")
37 parser.set_defaults( install_dir=".." )
39 ( options, args ) = parser.parse_args()
41 config = GTVGConfig( options, args )
43 if options.download:
44 rtv_download.download( config )
46 if options.schedule:
47 rtv_schedule.schedule( config )
49 if options.delete:
50 rtv_delete.delete( config )
52 if options.generate_html:
53 rtv_tvguide.generate( config )
55 if options.test_all:
56 rtv_schedule.test_schedule( config )
58 if __name__ == "__main__":
59 main()