From 708873712fdd3af7f17bb3ffcf5c012160943b8b Mon Sep 17 00:00:00 2001 From: "N0\\A" Date: Wed, 22 Oct 2025 10:54:12 +0200 Subject: [PATCH] Add SUPERCOPY --- .gitignore | 5 ++++- SUPERCOPY.py | 19 +++++++++++++++++++ ui/ui.py | 20 -------------------- 3 files changed, 23 insertions(+), 21 deletions(-) create mode 100644 SUPERCOPY.py delete mode 100644 ui/ui.py diff --git a/.gitignore b/.gitignore index e6bdf91..1d788f0 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,7 @@ __pycache__/ *.pym *.pyt *.pyc.* -*.pyo.* \ No newline at end of file +*.pyo.* + +# SUPERCOPY +copy.md \ No newline at end of file diff --git a/SUPERCOPY.py b/SUPERCOPY.py new file mode 100644 index 0000000..1bcc699 --- /dev/null +++ b/SUPERCOPY.py @@ -0,0 +1,19 @@ +files = [ + "core/file_search.py", + "ui/gui.py" +] + +codeblock = "```" + +copy = "" + +for file in files: + with open(file, "r", encoding="utf-8") as f: + lines = f.readlines() + copy += f"### {file}\n\n" + copy += f"{codeblock}python\n" + copy += "".join(lines) + copy += f"\n{codeblock}\n\n" + +with open("copy.md", "w", encoding="utf-8") as f: + f.write(copy) \ No newline at end of file diff --git a/ui/ui.py b/ui/ui.py deleted file mode 100644 index 3868bfe..0000000 --- a/ui/ui.py +++ /dev/null @@ -1,20 +0,0 @@ -import core.file_search as fs - -def main(): - filename = input("Enter the filename: ") - files = fs.find(filename, "~") - for file in files: - print(file) - if len(files) == 0: - print("I didn't find anything, would you like to try searching the whole disk?") - answer = input("(y/n): ") - if answer.lower() == 'y': - files = fs.find(filename) - if len(files) == 0: - print("No files found on the whole disk.") - else: - for file in files: - print(file) - -if __name__ == "__main__": - main() \ No newline at end of file