Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 40 lines (28 sloc) 986 Bytes
#!/usr/bin/env python
if __name__ == "__main__":
import re
import tablib
import logging
import datetime
import collections
from argparse import ArgumentParser, FileType
from core import HEADERS
from core.parsers.mention import Mention
date_prefix ="%Y%m%d")
parser = ArgumentParser()
parser.add_argument('input', metavar='INPUT', type=open)
parser.add_argument("-o", "--output", default="%s-newsclips.xls" % date_prefix)
args = parser.parse_args()
log = logging.getLogger('newsclips.main')
data = tablib.Dataset(headers=HEADERS)
for line in args.input:
item = {}
line = line.strip()
if not line:
mention = Mention(line)
book = tablib.Databook((data, data.filter(["in-the-news"])))
with open(args.output, 'wb') as fp:
Something went wrong with that request. Please try again.