|
|
@ -2,9 +2,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
import praw
|
|
|
|
import praw
|
|
|
|
import ConfigParser
|
|
|
|
import ConfigParser
|
|
|
|
|
|
|
|
import argparse
|
|
|
|
from datetime import datetime, timedelta
|
|
|
|
from datetime import datetime, timedelta
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
parser = argparse.ArgumentParser()
|
|
|
|
|
|
|
|
parser.add_argument('-c', '--config', help="config file to use instead of shreddit.cfg")
|
|
|
|
|
|
|
|
args = parser.parse_args()
|
|
|
|
|
|
|
|
|
|
|
|
config = ConfigParser.RawConfigParser()
|
|
|
|
config = ConfigParser.RawConfigParser()
|
|
|
|
|
|
|
|
if args.config:
|
|
|
|
|
|
|
|
config.read(args.config)
|
|
|
|
|
|
|
|
else:
|
|
|
|
config.read('shreddit.cfg')
|
|
|
|
config.read('shreddit.cfg')
|
|
|
|
|
|
|
|
|
|
|
|
hours = config.getint('main', 'hours')
|
|
|
|
hours = config.getint('main', 'hours')
|
|
|
|