feat: add Orcaslicer and docker

This commit is contained in:
2026-01-27 22:02:49 +01:00
parent 00e62fc558
commit 7dc6741808
21 changed files with 1986 additions and 1123 deletions

21
backend/prova.py Normal file
View File

@@ -0,0 +1,21 @@
import os
import argparse
def write_structure(root_dir, output_file):
with open(output_file, 'w', encoding='utf-8') as f:
for dirpath, dirnames, filenames in os.walk(root_dir):
relative = os.path.relpath(dirpath, root_dir)
indent_level = 0 if relative == '.' else relative.count(os.sep) + 1
indent = ' ' * (indent_level - 1) if indent_level > 0 else ''
dir_name = os.path.basename(dirpath)
f.write(f"{indent}{dir_name}/\n")
for file in sorted(filenames):
if file.endswith('.java'):
f.write(f"{indent} {file}\n")
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Generate a text file listing .java files with folder structure')
parser.add_argument('root_dir', nargs='?', default='.', help='Directory to scan')
parser.add_argument('-o', '--output', default='java_structure.txt', help='Output text file')
args = parser.parse_args()
write_structure(args.root_dir, args.output)