add-assistant #2

Merged
Ari merged 8 commits from add-assistant into main 2024-08-06 01:14:25 +00:00
1 changed files with 3 additions and 5 deletions
Showing only changes of commit a02e8fac99 - Show all commits

View File

@ -24,11 +24,11 @@ class ConfigureAssistant:
"md", "md",
"pdf", "pdf",
"php", "php",
"png", # "png", # PNG is supported but not actually parsed
"pptx", "pptx",
"py", "py",
"rb", "rb",
"tar", # "tar", # TAR is supported but not actually parsed
"tex", "tex",
"ts", "ts",
"txt", "txt",
@ -98,7 +98,7 @@ class ConfigureAssistant:
""" """
extension = file_path.split(".")[-1].lower() extension = file_path.split(".")[-1].lower()
excluded_extensions = ["schdoc", "exe", "so", "dll", "outjob", "pcbdoc", "png"] excluded_extensions = ["schdoc", "exe", "so", "dll", "outjob", "pcbdoc", "png", "tar"]
# If the extension is not in supported formats and not in excluded extensions, spoof the file name # If the extension is not in supported formats and not in excluded extensions, spoof the file name
if extension not in self.SUPPORTED_FORMATS and extension not in excluded_extensions: if extension not in self.SUPPORTED_FORMATS and extension not in excluded_extensions:
@ -182,8 +182,6 @@ if __name__ == "__main__":
print("Files to be uploaded:") print("Files to be uploaded:")
for path in file_paths: for path in file_paths:
new_filename, should_upload = configurator.preprocess_file(path) new_filename, should_upload = configurator.preprocess_file(path)
if should_upload:
print(f"Original: {path}, New: {new_filename}")
# Configure the assistant # Configure the assistant
configurator.configure() configurator.configure()