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

Export layout as svg #132

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Export layout as svg #132

wants to merge 1 commit into from

Conversation

groig
Copy link

@groig groig commented Sep 13, 2022

This is useful for showing the layout in readmes and blog posts

Example output

keymap

corne

@groig groig changed the title Save keymap as image Export keymap as svg Sep 14, 2022
@groig groig changed the title Export keymap as svg Export layout as svg Sep 14, 2022
@groig
Copy link
Author

groig commented Sep 15, 2022

More output examples

Lily58

lily

@groig
Copy link
Author

groig commented Sep 15, 2022

Alpha

alpha

@groig
Copy link
Author

groig commented Sep 15, 2022

B Slides

b_sides

@groig
Copy link
Author

groig commented Sep 15, 2022

Crbn

crbn

@groig
Copy link
Author

groig commented Sep 15, 2022

Louhi

louhi

@groig
Copy link
Author

groig commented Sep 16, 2022

Reviung34

reviung34

@kbrock
Copy link

kbrock commented Feb 24, 2023

This is sweet.

I'm not in core, so take my suggestions with a grain of salt:

  • Could you squash your commits (they looked like bug fixes more than separate commits)
  • This seems similar to the load_layout funtion. Think this code may want to live over in the keymap editor?

Is there something non core contributors can do to move this forward?
I would love either this or kle export in the product.

@groig
Copy link
Author

groig commented Feb 24, 2023

@kbrock Done and done.

generator.setSize(QSize(widget.width, widget.height * self.keyboard.layers))
generator.setViewBox(QRect(0, 0, widget.width, widget.height * self.keyboard.layers))
generator.setFileName(filename)
generator.setTitle("My Keymap")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use keyboard name here, as it appears in the keyboard selector dropdown

generator.setViewBox(QRect(0, 0, widget.width, widget.height * self.keyboard.layers))
generator.setFileName(filename)
generator.setTitle("My Keymap")
generator.setDescription("Keymap generated from Vial")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If optional, omit this.

@StevenCurran
Copy link

Any chance this could be merged? would be a very useful feature to have.

@groig
Copy link
Author

groig commented Feb 22, 2024

Any chance this could be merged? would be a very useful feature to have.

II haven't had time to implement the changes requested by @NCKiser. If they are blocking, somebody else can give it a go, maybe.

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

Successfully merging this pull request may close these issues.

None yet

4 participants