Giter Site home page Giter Site logo

inkscape-svgo's Introduction

inkscape-svgo

Optimize your SVGs with the awesome svgo.

installation

Grab the latest zip-file for your platform here and extract it to your plugins directory. On my system, I went to "preferences" and it showed this as "User extensions" under "System":

$HOME/Library/Application Support/org.inkscape.Inkscape/inkscape/extensions

So, I used that path.

usage

Find the option SVGO Optimized SVG File (*.svg) under File/Save As.

development

I use pkg to compile a ready-made runtime so it's a bit easier to install.

Run make to build these.

inkscape-svgo's People

Contributors

konsumer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

inkscape-svgo's Issues

Support SVGO 3.0

Would be a pleasure to have support in Inkscape 1.2.1 for SVGO 3.0

"File D:\drawing.svg" could not be saved."

System: Windows 10 x64
Inkscape Version: 1.1.1

I installed the latest version of inkscape-svgo and get this error ("File D:\drawing.svg" could not be saved."). I used Process Monitor to capture the command line arguments:

"[Path to custom Inkscape extensions directory]\inkscape-svgo.exe" --options=page_1 --precision=2 --pretty=false --enable=sortAttrs=false --multipass=true --enable=cleanupAttrs=true --enable=cleanupEnableBackground=true --enable=cleanupIDs=false --enable=cleanupNumericValues=true --enable=collapseGroups=true --enable=convertColors=true --enable=convertPathData=true --enable=convertShapeToPath=false --enable=convertStyleToAttrs=false --enable=convertTransform=true --enable=mergePaths=true --enable=minifyStyles=true --enable=moveElemsAttrsToGroup=false --enable=moveGroupAttrsToElems=false --enable=removeViewBox=false --enable=removeDimensions=false --enable=removeUnknownsAndDefaults=true --enable=removeUnusedNS=true --enable=removeUselessDefs=true --enable=removeUselessStrokeAndFill=true --enable=removeRasterImages=false --enable=removeScriptElement=false --enable=removeStyleElement=false --enable=removeTitle=true --enable=removeXMLNS=false --enable=removeXMLProcInst=true --enable=removeMetadata=true --enable=removeNonInheritableGroupAttrs=true --enable=removeComments=true --enable=removeDesc=true --enable=removeDoctype=true --enable=removeEditorsNSData=true --enable=removeEmptyAttrs=true --enable=removeEmptyContainers=true --enable=removeEmptyText=true --enable=removeHiddenElems=true D:\Users\[Username]\AppData\Local\Temp\ink_ext_XXXXXX.svgQRO0L1

When I try to run that command in a cmd window and with a real target file, it returns with no output or errors in the command line window. Target file unchanged.

Looking at the ProcMon capture of inkscape-svgo.exe, it calls Windows Error Reporting, so something definitely went wrong:

C:\Windows\system32\WerFault.exe -u -p 2412 -s 560

Unfortunately, inkscape-svgo.exe is a giant black box, so there is seemingly no way to get error data from it. Is there any way to create an unpackaged version for troubleshooting?

"File yadda/yadda can not be saved"

I'm trying out inkscape-svgo on Windows 8.1. I believe it's installed in the correct place. I put inkscape-svgo.inx in C:\Program Files\Inkscape\share\extensions

Then I make a simple barebones inkscape document, or open an existing svg, and choose "SVGO optimized SVG file" from Save As... popup. The UI opens.

But when I finish clicking boxes and click "OK", I see the command window open briefly, with some kind of error trace, and then get an error alert saying "File D:\yadda\yadda\whatever.svg" can not be saved"

I have no trouble saving to that location if I just use Save As Inkscape SVG.

For good measure, I installed command line svgo as well. This seems to work fine.

What am I missing? Any way to keep command window open so I can read the error trace?

Using makefile include x86_64 only full node js distribution

I tried to apply a make with the included makefile,

Using this makefile include x86_64 only full node js distribution and lot of dependencies.

I already have node on my OS, and SVGO lib included in standard distribution package. I would be interested to build this Inkscape extension for ArchLinux, without reinstalling node, and even less x86_64 version, to keep the multi-architecture possibility of node.js. This would allow to use it on ARM, RISC-V, MIPS, Power, and any other kind of architectures and could use far less disk space and memory.

Do you have, please a mean to link it to existing node.js and SVGO installation.ย ?

Ubuntu snap install not working

Hey!

Thanks for building an awesome tool to incorporate svgo. I have yet to test out the results because I ran into this weirdo problem. When I use the defaults that you have this is what I get for an output.

I'm using Inkspace 0.92 and do have nodejs (although I don't know if I actually need that since you are shipping it as an exe).

`dns.js:246
this._handle = new ChannelWrap();
^

Error: EFILE
at new Resolver (dns.js:246:20)
at dns.js:377:23
at NativeModule.compile (bootstrap_node.js:636:7)
at NativeModule.require (bootstrap_node.js:581:18)
at net.js:45:13
at NativeModule.compile (bootstrap_node.js:636:7)
at NativeModule.require (bootstrap_node.js:581:18)
at createWritableStdioStream (internal/process/stdio.js:163:17)
at process.getStdout [as stdout] (internal/process/stdio.js:14:14)
at console.js:249:38
`

Use pkg to make plugin self-contained

It would simplify installation if I just make separate zip files for the major 3 platforms, and used pkg to create a fully standalone executable. This is mostly for windows (#1 ) and people on other platforms that don't use node 8+.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.