Skip to content

An Inkscape Extension to copy optimized SVG directly, instead of having to save it as optimized, opening it in a text editor, Ctrl-A Ctrl-C... you know, all of that stuff.

License

Notifications You must be signed in to change notification settings

TheoIsDumb/CopyOptimize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CopyOptimize

(Previously known as CopyRaw)

copyoptimize.mp4

(dialog box looks like an error box due to inkex.utils.debug() being used)

An Inkscape Extension I made for myself.

Copies raw and optimized SVG directly instead of saving it as an optimized SVG, then opening it in a text editor, Ctrl-a + Ctrl-c, you know all of that stuff.

Added Scour for optimization.

Scour flags:
1 --strip-xml-prolog
2 --enable-viewboxing
3 --no-line-breaks
4 --remove-descriptive-elements
5 --enable-comment-stripping
6 --enable-id-stripping
7 --shorten-ids

NOTE: gtk branch has a version of CopyOptimize that displays the optimized SVG in a GTK3 window. (Requires python-gobject and gtk3)

Why

Everytime I have to make an SVG to use on websites or something, I have to go through this tiring process of saving it as an optimized SVG, opening it in a text editor, copying it and pasting it. I make one change and I have to do it all over again.

This extension helps me do it all in one go.

Installation

cd ~/.config/inkscape/extensions # or wherever you store extensions, dunno about windows/mac
git clone https://github.com/TheoIsDumb/CopyOptimize

Open Inkscape (re-launch if already open) and CopyOptimize will be available in the Extensions menu.

How to use

  1. Select paths/strokes/whatever.
  2. Go to Extensions -> Custom -> CopyOptimize.
  3. Copy the SVG text from the box that pops up. (inkex.utils.debug())

ProTip

protip

Set a keyboard shortcut for CopyOptimize in Edit -> Preferences -> Interface -> Keyboard. (I used Pause, cause I never use it.)

About

An Inkscape Extension to copy optimized SVG directly, instead of having to save it as optimized, opening it in a text editor, Ctrl-A Ctrl-C... you know, all of that stuff.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages