From: Günter Milde Date: Wed, 23 Jan 2019 09:12:28 +0000 (+0100) Subject: Improve readability of the lyx2lyx help output. X-Git-Tag: lyx-2.4.0dev-acb2ca7b~2649 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=5a1fb5b5faf6beccbc0256ad4c4b5204bfdbb45c;p=features.git Improve readability of the lyx2lyx help output. Also some small clean-up edits --- diff --git a/lib/lyx2lyx/LyX.py b/lib/lyx2lyx/LyX.py index 7adbe829ec..5ea84b7963 100644 --- a/lib/lyx2lyx/LyX.py +++ b/lib/lyx2lyx/LyX.py @@ -447,8 +447,8 @@ class LyX_base: else: header = self.header - for line in header + [''] + self.body: - self.output.write(line+u"\n") + for line in header + [u''] + self.body: + self.output.write(line+u'\n') def choose_output(self, output): diff --git a/lib/lyx2lyx/lyx2lyx b/lib/lyx2lyx/lyx2lyx index 174bcd7492..badedbc751 100755 --- a/lib/lyx2lyx/lyx2lyx +++ b/lib/lyx2lyx/lyx2lyx @@ -56,26 +56,27 @@ def main(): parser.add_argument("--noisy", action="store_const", const=10, dest="debug") parser.add_argument("-c", "--encoding", type=cmd_arg, dest="cjk_encoding", - help="files in format 413 and lower are read and" + help="Files in format 413 and lower are read and" " written in the format of CJK-LyX." - "If encoding is not given or 'auto' the encoding" - "is determined from the locale.") + " If encoding is not given or 'auto' the encoding" + " is determined from the locale.") parser.add_argument("-e", "--err", type=cmd_arg, dest="error", - help= "file name of the error file else goes to stderr") + help= "File name of the error file else goes to stderr.") parser.add_argument("-o", "--output", type=cmd_arg, dest="output", - help= "name of the output file else goes to stdout") + help= "Name of the output file else goes to stdout.") parser.add_argument("-t", "--to", type=cmd_arg, dest= "end_format", - help= "destination file format, default (latest)") + help= "Destination file format, default .") parser.add_argument("-V", "--final_version", type=cmd_arg, dest= "final_version", - help= "destination version, default (latest)") + help= "Destination version, default .") parser.add_argument("-l", "--list", action="store_true", - help = "list all available formats and supported versions") + help = "List all available formats and supported versions.") parser.add_argument("-n", "--try-hard", action="store_true", - help = "try hard (ignore any convertion errors)") + help = "Try hard (ignore any convertion errors).") parser.add_argument("-s", "--systemlyxdir", type=cmd_arg, dest= "systemlyxdir", - help= "LyX system directory for conversion from version 489 or older") + help= "LyX system directory for conversion from" + " version 489 or older.") parser.add_argument('--version', action='version', version="""lyx2lyx, version %s -Copyright (C) 2011 The LyX Team, José Matos and Dekel Tsur""" % LyX.version__) + Copyright (C) 2011 The LyX Team, José Matos and Dekel Tsur""" % LyX.version__) parser.add_argument("input", nargs='?', type=cmd_arg, default=None) options = parser.parse_args() diff --git a/lib/lyx2lyx/lyx_2_3.py b/lib/lyx2lyx/lyx_2_3.py index fd029d557b..ef79484f96 100644 --- a/lib/lyx2lyx/lyx_2_3.py +++ b/lib/lyx2lyx/lyx_2_3.py @@ -33,8 +33,6 @@ from parser_tools import (del_token, del_value, del_complete_lines, from lyx2lyx_tools import (add_to_preamble, put_cmd_in_ert, revert_font_attrs, insert_to_preamble, latex_length) -# get_ert, lyx2latex, lyx2verbatim, length_in_bp, convert_info_insets -# revert_flex_inset, hex2ratio, str2bool #################################################################### # Private helper functions