diff --git a/tools/datafileBuilder.py b/tools/datafileBuilder.py index e5eb2ccf..33fa77a4 100755 --- a/tools/datafileBuilder.py +++ b/tools/datafileBuilder.py @@ -14,9 +14,8 @@ parser.add_argument('--file', type=argparse.FileType('r')) parser.add_argument('--defaultType', type=str, choices=[t.name for t in list(dataType)]) parser.add_argument('--format',type=str, choices=[t.name for t in list(Format)],default=Format.LINE.name) parser.add_argument('--debug', action='store_true', help='Debug mode') -parser.add_argument('--prefix',type=str,default=None) +parser.add_argument('--suffix',type=str,default=None) args = parser.parse_args() -print(args) lines=args.file.readlines() soup=TexSoup(lines) commands=[LaTeX.newCommand(cmd) for cmd in soup.find_all("newcommand")] @@ -29,4 +28,4 @@ if not datapath.exists(): datapath.mkdir() datalst=dataFileBase.readFromTable(dat,format=Format[args.format],default=dataType[args.defaultType],commands=commands) for data in datalst: - data.toFile(datapath,args.prefix) \ No newline at end of file + data.toFile(datapath,args.suffix) \ No newline at end of file diff --git a/tools/lib/data.py b/tools/lib/data.py index a9d8c6d6..df5631f6 100644 --- a/tools/lib/data.py +++ b/tools/lib/data.py @@ -326,7 +326,7 @@ class dataFileBase(object): dic["DOI"]="" if self.DOI is None else self.DOI return dic - def toFile(self,datadir,prefix=None): + def toFile(self,datadir,suffix=None): subpath=datadir/self.GetFileType().name.lower() if not subpath.exists(): subpath.mkdir() @@ -337,8 +337,8 @@ class dataFileBase(object): fileNameComp=[molfilename,self.method.name] if self.method.basis: fileNameComp.append(self.method.basis) - if prefix: - fileNameComp.append(prefix) + if suffix: + fileNameComp.append(suffix) fileName="_".join(fileNameComp)+".dat" file=subpath/fileName if not file.exists():