Added copy behaviour to config file
This commit is contained in:
parent
4eb9247c5f
commit
3abb5c53f7
|
|
@ -21,4 +21,4 @@ export:
|
|||
intermediate_files: true
|
||||
type: "html"
|
||||
force_rewrite: true
|
||||
unparsable_files: "copy" # "copy" or "ignore"
|
||||
copy_unparsable_files: "copy" # "copy" or "ignore"
|
||||
|
|
|
|||
|
|
@ -118,8 +118,9 @@ class SiteCrawler:
|
|||
"""
|
||||
This method is used to copy all the files that could not be parsed.
|
||||
"""
|
||||
for root, file in self.files_to_copy:
|
||||
shutil.copy(os.path.join(self.initial_path, root, file), os.path.join(self.destination_path, root, file))
|
||||
if self._env.config["parser_config"]["export"]["copy_unparsable_files"].lower() == "copy":
|
||||
for root, file in self.files_to_copy:
|
||||
shutil.copy(os.path.join(self.initial_path, root, file), os.path.join(self.destination_path, root, file))
|
||||
|
||||
def create_file(self, path):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Reference in New Issue