From ca87f46c73a9990e6a66533a812998167cd32401 Mon Sep 17 00:00:00 2001 From: Alexandre Magno Date: Wed, 1 Jul 2015 06:49:31 -0300 Subject: [PATCH] Here paicemana is reduced for a workflow of Etherpad --- paicemana/scripts/cli.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/paicemana/scripts/cli.py b/paicemana/scripts/cli.py index 871b2a2..c5dcd21 100644 --- a/paicemana/scripts/cli.py +++ b/paicemana/scripts/cli.py @@ -4,6 +4,7 @@ import click from paicemana.textdownload import MarkdownDownload +from paicemana.mdanalyzer import MarkdownAnalyzer from urllib.error import HTTPError @@ -18,7 +19,12 @@ def cli(archive): if not archive: raise click.UsageError('try the -h/--help option') try: - MarkdownDownload(archive) + download = MarkdownDownload(archive) + analyzer = MarkdownAnalyzer(download.filename) + organizer = analyzer.getOrganizer() + translators = ['alexandre-mbm', 'jgpacker', 'vgeorge'] + organizer.distribute_for(translators) + print('\n%s\n\n%s\n' % (organizer, organizer.scores())) except HTTPError as e: click.echo(e)