From 2c2f0d572f6ff07a9a61307a8943239ea0b701e2 Mon Sep 17 00:00:00 2001 From: pierre Date: Sun, 27 Jan 2013 22:31:14 +0100 Subject: [PATCH] ... --- textsimi.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/textsimi.py b/textsimi.py index acb85a3..0dfaea7 100644 --- a/textsimi.py +++ b/textsimi.py @@ -52,11 +52,16 @@ class SimiTxt(AnalyseText): log.info('Problem') return False if self.parametres['type_graph'] == 1: + if self.parametres['svg'] : + filename, ext = os.path.splitext(script.filename) + fileout = filename + '.svg' + else : + fileout = script.filename if os.path.exists(self.pathout['liste_graph']): graph_simi = read_list_file(self.pathout['liste_graph']) - graph_simi.append([os.path.basename(script.filename), script.txtgraph]) + graph_simi.append([os.path.basename(fileout), script.txtgraph]) else : - graph_simi = [[os.path.basename(script.filename), script.txtgraph]] + graph_simi = [[os.path.basename(fileout), script.txtgraph]] print_liste(self.pathout['liste_graph'], graph_simi) else : return False @@ -167,7 +172,7 @@ class SimiFromCluster(SimiTxt) : filename, ext = os.path.splitext(script.filename) fileout = filename + '.svg' else : - fileout = self.script.filename + fileout = script.filename if os.path.exists(self.pathout['liste_graph']): graph_simi = read_list_file(self.pathout['liste_graph']) graph_simi.append([os.path.basename(fileout), script.txtgraph]) -- 2.7.4