@SuppressWarnings("unchecked")
public static void main(String[] args) {
GetTitlesCLI cli = new GetTitlesCLI(args);
ProgressLogger pl = new ProgressLogger("dumped {} titles", 10000);
cli.openOutput();
RecordReader<Article> reader = new RecordReader<Article>(
cli.getInput(), new JsonRecordParser<Article>(Article.class));
reader.filter(ShortTitleFilter.FEWER_THAN_THREE,
TypeFilter.MAIN_CATEGORY_TEMPLATE,
RedirectFilter.FILTER_OUT_REDIRECTS);
for (Article a : reader) {
pl.up();
cli.writeLineInOutput(a.getTitleInWikistyle());
}
cli.closeOutput();
}