(self, content, format, name=None, directory:str=None)
| 32 | fb.write(content) |
| 33 | |
| 34 | def save(self, content, format, name=None, directory:str=None) -> str: |
| 35 | output_directory = directory if directory is not None else self._output |
| 36 | self._create_directory(output_directory) |
| 37 | if name is None: |
| 38 | name = Hashing.get_md5(content) |
| 39 | if format is not None: |
| 40 | name+=f".{format}" |
| 41 | |
| 42 | path = os.path.join(output_directory, f"{name}.{format}") |
| 43 | |
| 44 | self._write_content(content, path) |
| 45 | return path |
| 46 | |
| 47 | def convert_content_to_plain(self, items:QueryResult)->str: |
| 48 | self._output_dir = ResultSetting().get_folder_output(ResultSetting().format) |
no test coverage detected