Skip to content

Commit

Permalink
file_test.py aktualisieren
Browse files Browse the repository at this point in the history
  • Loading branch information
AIIrondev authored Jun 7, 2024
1 parent 1735779 commit 0f94083
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions Code/file_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def create_project(directory, project_id, project_name):
os.makedirs(directory, exist_ok=True)

projectbody_data = {
"main": "#"
"main": ""
}
projectbody_path = os.path.join(directory, 'projectbody.json')
with open(projectbody_path, 'w') as file:
Expand Down Expand Up @@ -80,8 +80,6 @@ def create_project(directory, project_id, project_name):

return llsp3_file_path

create_project('/mnt/data/example_project', '3hf83l3sq3KS', 'Projekt')

def read_and_modify_projectbody(file_path, new_content):
with open(file_path, 'r') as file:
data = json.load(file)
Expand Down Expand Up @@ -113,6 +111,4 @@ def read_and_modify_projectbody(file_path, new_content):
zip_ref.write(file_path, arcname)

llsp3_file_size = os.path.getsize(llsp3_file_path)
print(f"Die Größe der aktualisierten .llsp3-Datei beträgt: {llsp3_file_size} Bytes")

read_and_modify_projectbody('/mnt/data/example_project/projectbody.json', '# asedsewf\nprint("Hello world")')
print(f"Die Größe der aktualisierten .llsp3-Datei beträgt: {llsp3_file_size} Bytes")

0 comments on commit 0f94083

Please sign in to comment.