mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 13:31:49 +00:00
support direct conversion from format 1 to format 3
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17531 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
3a74b10d91
commit
c27dce2b16
@ -138,11 +138,11 @@ def convert(lines):
|
|||||||
only_comment = 0
|
only_comment = 0
|
||||||
elif format == 3:
|
elif format == 3:
|
||||||
# nothing to do
|
# nothing to do
|
||||||
return
|
return format
|
||||||
else:
|
else:
|
||||||
error('Cannot convert file format %s' % format)
|
error('Cannot convert file format %s' % format)
|
||||||
else:
|
else:
|
||||||
lines.insert(i, "Format 3")
|
lines.insert(i, "Format 2")
|
||||||
only_comment = 0
|
only_comment = 0
|
||||||
continue
|
continue
|
||||||
|
|
||||||
@ -352,6 +352,8 @@ def convert(lines):
|
|||||||
|
|
||||||
i = i + 1
|
i = i + 1
|
||||||
|
|
||||||
|
return format + 1
|
||||||
|
|
||||||
|
|
||||||
def main(argv):
|
def main(argv):
|
||||||
|
|
||||||
@ -367,7 +369,9 @@ def main(argv):
|
|||||||
|
|
||||||
# Do the real work
|
# Do the real work
|
||||||
lines = read(input)
|
lines = read(input)
|
||||||
convert(lines)
|
format = 1
|
||||||
|
while (format < 3):
|
||||||
|
format = convert(lines)
|
||||||
write(output, lines)
|
write(output, lines)
|
||||||
|
|
||||||
# Close files
|
# Close files
|
||||||
|
Loading…
Reference in New Issue
Block a user