Added copy behaviour to config file
This commit is contained in:
parent
ac9f00f363
commit
84d8fad28f
|
|
@ -21,4 +21,4 @@ export:
|
||||||
intermediate_files: true
|
intermediate_files: true
|
||||||
type: "html"
|
type: "html"
|
||||||
force_rewrite: true
|
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.
|
This method is used to copy all the files that could not be parsed.
|
||||||
"""
|
"""
|
||||||
for root, file in self.files_to_copy:
|
if self._env.config["parser_config"]["export"]["copy_unparsable_files"].lower() == "copy":
|
||||||
shutil.copy(os.path.join(self.initial_path, root, file), os.path.join(self.destination_path, root, file))
|
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):
|
def create_file(self, path):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue