plint

French poetry validator (local mirror of https://gitlab.com/a3nm/plint)
git clone https://a3nm.net/git/plint/
Log | Files | Refs | README

commit e8727be9df17d00e95d07d31db8ce198a85f971c
parent b5c164147bdb74a3242740be48894bbb0e9f4598
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Sun, 16 Dec 2012 00:00:30 +0100

Merge ulminfo:poetlint

Diffstat:
plint_irc.py | 10++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/plint_irc.py b/plint_irc.py @@ -58,7 +58,7 @@ def manage(line, silent=False): return False if not leading_cap(text): return False - errors = template.check(text) + errors = template.check(text, quiet=True) if len(errors) > 0 and (text.rstrip().endswith("...") or text.rstrip().endswith("…")): # it might be a call @@ -68,8 +68,12 @@ def manage(line, silent=False): else: lbuf = [l] return True + quiet = False for error in errors: - print(error.report()) + if error == None: + quiet = True + if not quiet: + print(error.report()) if len(errors) == 0: buf = "" if not silent: @@ -88,6 +92,8 @@ if len(sys.argv) not in [3, 4]: file=sys.stderr) sys.exit(1) +localization.init_locale() + f = open(sys.argv[1]) x = f.read() f.close()