Skip to content

Commit

Permalink
Create generate_url.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ArdenHide authored Jun 19, 2024
1 parent 8436edd commit bc453bf
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions generate_url.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import os
import plantuml

def generate_url(file_path, output_file):
with open(file_path, 'r') as file:
diagram = file.read()

pl = plantuml.PlantUML(url='https://www.plantuml.com/plantuml/svg/')
url = pl.get_url(diagram)

with open(output_file, 'w') as f:
f.write(url)

if __name__ == "__main__":
file_path = os.getenv('FILE_PATH', 'include.puml')
output_file = 'url.txt'
generate_url(file_path, output_file)

0 comments on commit bc453bf

Please sign in to comment.