From 999889716a56ffc2446246c2094f322dc8aad03c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Matox?= Date: Thu, 8 May 2008 10:01:38 +0000 Subject: [PATCH] No need to change LyX.py everytime there is a file format change git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24684 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/lyx2lyx/LyX.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/lib/lyx2lyx/LyX.py b/lib/lyx2lyx/LyX.py index 2a85e44612..9ad4c69c35 100644 --- a/lib/lyx2lyx/LyX.py +++ b/lib/lyx2lyx/LyX.py @@ -79,9 +79,20 @@ format_relation = [("0_06", [200], minor_versions("0.6" , 4)), ("1_2", [220], minor_versions("1.2" , 4)), ("1_3", [221], minor_versions("1.3" , 7)), ("1_4", range(222,246), minor_versions("1.4" , 5)), - ("1_5", range(246,277), minor_versions("1.5" , 2)), - ("1_6", range(277,333), minor_versions("1.6" , 0))] + ("1_5", range(246,277), minor_versions("1.5" , 5)), + ("1_6", [] , minor_versions("1.6" , 0))] +#################################################################### +# This is useful just for development versions # +# if the list of supported formats is empty get it from last step # +if not format_relation[-1][1]: + step, mode = format_relation[-1][0], "convert" + convert = getattr(__import__("lyx_" + step), mode) + format_relation[-1] = (step, + [conv[0] for conv in convert], + format_relation[-1][2]) +# # +#################################################################### def formats_list(): " Returns a list with supported file formats."