srl-labs / clab-io-draw

Containerlab and Draw.io Integration
MIT License
33 stars 6 forks source link

A smart entrypoint that detects the input type #3

Closed hellt closed 8 months ago

hellt commented 8 months ago

@FloSch62 here is another ux improvement. Instead of having the entrypoint.sh that calls a certain script that we require a user to pass as an env var, lets make a smart entrypoint (I presume a python one) that would check if the input file has a yml/yaml extension or a drawio or no extension.

In the first case it is clear that we need to use clab2draw

And in the 2nd one it is the work for draw2clab.

With this logic it is not anymore required for a user to juggle with the env var passed at runtime.

FloSch62 commented 8 months ago

Agree, Done