diff --git a/tools/make_man.py b/tools/make_man.py index 07282ef436355b4ab63c53ddad06ecc55a0127a9..7c1ccc2065ff5de63f59acb721ec81f9ef4fb71a 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'))