From 36a4b78e676e1b7f211cbfe86fdf207629eeb1d1 Mon Sep 17 00:00:00 2001 From: Laurent Bachelier Date: Fri, 20 Jun 2014 17:57:29 +0200 Subject: [PATCH] make_man: Tell that it was generated automatically So people don't waste time altering them, but alter the source instead. --- tools/make_man.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/make_man.py b/tools/make_man.py index 07282ef436..7c1ccc2065 100755 --- a/tools/make_man.py +++ b/tools/make_man.py @@ -160,6 +160,7 @@ def analyze_application(app, script_name): helptext = re.sub(cmd_re, format_title, helptext) helptext = helptext.replace("-", r"\-") coding = r'.\" -*- coding: utf-8 -*-' + comment = r'.\" This file was generated automatically by tools/make_man.sh.' header = '.TH %s 1 "%s" "%s %s"' % (script_name.upper(), time.strftime("%d %B %Y"), script_name, app.VERSION.replace('.', '\\&.')) name = ".SH NAME\n%s \- %s" % (script_name, application.SHORT_DESCRIPTION) @@ -222,7 +223,7 @@ def analyze_application(app, script_name): # Skip internal applications. footer += "\n\n.SH SEE ALSO\nHome page: http://weboob.org/applications/%s" % application.APPNAME - mantext = u"%s\n%s\n%s\n%s\n%s\n%s" % (coding, header, name, helptext, condition, footer) + mantext = u"%s\n%s\n%s\n%s\n%s\n%s\n%s" % (coding, comment, header, name, helptext, condition, footer) with open(os.path.join(BASE_PATH, DEST_DIR, "%s.1" % script_name), 'w+') as manfile: for line in mantext.split('\n'): manfile.write('%s\n' % line.lstrip().encode('utf-8')) -- GitLab