Merge branch 'new-features'

Conflicts:
	atomstrom.py
This commit is contained in:
Ronald Schaten 2013-04-03 23:05:08 +02:00
commit 91d1cf552e

View File

@ -247,6 +247,9 @@ if __name__ == '__main__':
parser.add_argument('-f', '--fetch', action='store_true', help='fetch all feeds')
parser.add_argument('-s', '--single', action='store_true', help='send single mails')
parser.add_argument('-d', '--daily', action='store_true', help='send daily digest')
parser.add_argument('-l', '--list', action='store_true', help='list all configured feeds')
parser.add_argument('-e', '--delete', action='store', type=int, metavar='ID', help='delete feed <ID> from configuration')
parser.add_argument('-r', '--reset', action='store', type=int, metavar='ID', help='reset data for feed <ID>')
args = parser.parse_args()
if args.fetch:
@ -261,7 +264,13 @@ if __name__ == '__main__':
receiver = [config.get('email', 'receiver_name'), config.get('email', 'receiver_address')]
prefix = config.get('email', 'prefix_digest')
mail_daily_digest(session, sender, receiver, prefix)
if not (args.fetch or args.single or args.daily):
if args.list:
print 'TODO: list all configured feeds'
if args.delete:
print 'TODO: delete feed <%d>' % args.delete
if args.reset:
print 'TODO: reset feed <%d>' % args.reset
if not (args.fetch or args.single or args.daily or args.list or args.delete or args.reset):
parser.print_help()
session.commit()