Add SUPERCOPY

This commit is contained in:
N0\A
2025-10-22 10:54:12 +02:00
parent b184957232
commit 708873712f
3 changed files with 23 additions and 21 deletions

3
.gitignore vendored
View File

@@ -8,3 +8,6 @@ __pycache__/
*.pyt *.pyt
*.pyc.* *.pyc.*
*.pyo.* *.pyo.*
# SUPERCOPY
copy.md

19
SUPERCOPY.py Normal file
View File

@@ -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)

View File

@@ -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()