from parser_tools import find_token, find_end_of_inset, get_value,\
find_token2, del_token
-def change_insetgraphics(lines):
+def change_insetgraphics(file):
+ lines = file.body
i = 0
while 1:
i = find_token(lines, "\\begin_inset Graphics", i)
i = i+1
-def change_tabular(lines):
+def change_tabular(file):
+ lines = file.body
i = 0
while 1:
i = find_token(lines, "<column", i)
i = i+1
-def convert(file):
- change_insetgraphics(file.body)
- change_tabular(file.body)
- file.format = 221
-
-
-def revert(file):
- file.error("The convertion to an older format (%s) is not implemented." % file.format)
+convert = [[221, [change_insetgraphics, change_tabular]]]
+revert = []
if __name__ == "__main__":