Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unify svg output codepaths #345

Open
bleything opened this issue Dec 31, 2022 · 0 comments
Open

unify svg output codepaths #345

bleything opened this issue Dec 31, 2022 · 0 comments

Comments

@bleything
Copy link
Contributor

Over in #344 we're talking about changing the way we save parameters into the generated SVG, and I discovered that there are currently (at least) two ways to save an svg: first, via the GUI by clicking the Like button, and second via the command line with vsk save.

Those two features use separate codepaths. The GUI uses DocumentSaverThread while the CLI uses _write_output, an inner function of the CLI's save function. Ultimately they both call vpype's write_svg method, but they arrive there by different paths.

@abey79 said: "I think all save methods (like, vsk save) should lead to the same result." I agree, so I wanted to open this issue to discuss how we get there. My opinion is that I think it should be a method SketchClass, or Vsketch if that makes more sense. The thread and the CLI should have minimal logic around saving, just calling the upstream method.

I'm happy to put in a PR for this, I just wanted to have a clear plan first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant