Lines Matching refs:self

39     def get_outputfile_format_str(self):  argument
42 return self._options.pattern
47 …def merge_file(self, inputfilename, outputfilename, parsed_file_ref, lang, is_forced_lang, sdfdata… argument
51 def parse_file(self, filename): argument
55 def merge_one_big_file(self, inputfile, outputfilename, parsed_file_ref, lang, sdfdata): argument
59 def extract_file(self, inputfile): argument
64 def format_outputfile(self, filename, language): argument
68 return self.get_outputfile_format_str().replace('[', '%(').replace(']',')s') % \
69 …oExt': file, 'language': language, 'extension': extension, 'path_prefix': self._options.path_prefi…
70 'path_postfix': self._options.path_postfix, 'path': self.get_path() }
76 def get_path(self): argument
77 if self._options.outputfile.find('/') == -1:
80 return self._options.outputfile[:self._options.outputfile.rfind('/')]
82 def merge(self, sdfdata): argument
85 if self._options.languages:
86 langset = PseudoSet(self._options.languages)
87 if self._options.forcedlanguages:
88 forcedset = PseudoSet(self._options.forcedlanguages)
92 if self.has_multi_inputfiles():
93 filelist = self.read_inputfile_list()
95 filelist = self._options.inputfile
98 ref = self.parse_file(inputfile)
101 …[self.merge_file(inputfile,self.format_outputfile(inputfile, lang), ref, lang, False, sdfdata) for…
104 …[self.merge_file(inputfile, self.format_outputfile(inputfile, lang), ref, lang, True, sdfdata) fo…
107self.merge_one_big_file(inputfile, self.format_outputfile(inputfile, lang), ref, ((langset & found…
109 def has_multi_inputfiles(self): argument
110 return self._options.inputfile[0] == '@'
112 def copy_file(self, inputfilename, outputfilename): argument
129 def extract(self): argument
131 f = open(self._options.outputfile, "w+")
132 f.write(self.extract_file(self._options.inputfile))
134 print("ERROR: Can not write file " + self._options.outputfile)
139 def parse_options(self): argument
152 (self._options, self.args) = parser.parse_args()
157 if self._options.forcedlanguages:
158 self._options.forcedlanguages = parse_complex_arg(self._options.forcedlanguages)
159 if self._options.languages:
160 self._options.languages = parse_complex_arg(self._options.languages)
161 self.test_options()
163 def __init__(self): argument
164 self.parse_options()
165 if self._options.input_sdf_file != None and len(self._options.input_sdf_file):
166 sdfdata = SdfData(self._options.input_sdf_file)
168 self.merge(sdfdata)
170 self.extract()
172 def make_dirs(self, filename): argument
187 def test_options(self): argument
188 opt = self._options
197 def read_inputfile_list(self): argument
198 if self.has_multi_inputfiles():
201 f = open(self._options.inputfile[1:], "r")
204 print("ERROR: Can not read file list " + self._options.inputfile[2:])
210 def get_filename_string(self, inputfile): argument
212 absroot = os.path.realpath(os.path.abspath(self._options.project_root))