Comments (11)
At the moment, Inkscape Script Extensions are one of three types:
- Input, providing translation from a file format to SVG
- Output, providing translation from SVG to a format
- Effect, taking in SVG, changing it, and then outputting SVG
Effects need a GUI.
Looking at the future architecture, the possibility of a headless Inkscape still seems to be something of the future. And looking at the current state of the roadmap, splitting backend / GUI frontend is also still in the works. They also want to develop a new plugin/extension system.
I'm afraid, this issue will remain open for quite a while.
from inkscape-applytransforms.
A quick glance at the documentation tells me this is likely possible, and sounds to me like a nice addition 👍
from inkscape-applytransforms.
The id of the extension should be available as a verb. Calling inkscape -g --verb com.klowner.filter.applytransform --verb FileSave --verb FileClose --verb FileQuit test.svg
works just fine for me to open a file, apply the transformation, save and close the file and to quit Inkscape.
Use inkscape --verb-list
to get a list of all available verbs. This includes all extensions.
Please tell me if I'm missing the point.
I was using Inkscape 1.0.1.
from inkscape-applytransforms.
I guess this can be closed then?
from inkscape-applytransforms.
@ziegenberg yep! thank you again.
from inkscape-applytransforms.
While the trick with using the filter ID as a verb is appreciated, I don't think it goes far enough to warrant closing this issue.
This filter still assumes that a full GUI has been launched. I don't think it really needs it for anything and it does work with --verb com.klowner.filter.applytransform
, but it does not work in batch mode with no GUI. There are certainly other Inkscape functions that require the GUI to be running to function, but I don't see why this would need to be one of them. I can't use this yet in automation sequences without providing a whole X environment to start Inkscape in.
Please consider adding a proper verb that can be used without a GUI and re-ope this issue to track the progress and notify others when someone contributes such a thing.
from inkscape-applytransforms.
apologies, @alerque. re-opened.
from inkscape-applytransforms.
Verbs require a GUI, says the current manual: https://inkscape.org/doc/inkscape-man.html
Note that the --verb command requires a GUI.
What you're probably looking for are actions
. But I haven't found any documentation yet, that says that extensions can provide actions.
I will try that, as soon as I'm back at a PC.
from inkscape-applytransforms.
No worries. I wasn't aware of the fundamental difference between verbs / actions. Also it seems to be a bit of a moving target because everything used to be verbs (actions are new as I recall) and some of them required GUI and others didn't. If it turns out to be impossible I'll understand (Inkscape is not well setup for this) but if it is possible it would be appreciated.
from inkscape-applytransforms.
This might be fixed by https://wiki.inkscape.org/wiki/index.php?title=GSoC_2021_Verbs_to_Gio::Actions (https://gitlab.com/inkscape/inkscape/-/merge_requests/3328)
from inkscape-applytransforms.
I've tried to use verbs to remove transforms but it didn't worked :
command : inkscape -g --verb com.klowner.filter.apply_transform --verb FileSave --verb FileClose --verb FileQuit test.svg
Everytime it closes the document before executing the transformation. It works when I remove --verb FileSave --verb FileClose --verb FileQuit
, but it needs an user action this way.
Environment 1 :
Windows 10
Inkscape 1.1.1 (3bf5ae0d25, 2021-09-20)
Environment 2 :
Ubuntu 20.04 (WSL2)
Inkscape 1.1.1 (1:1.1+202109281949+c3084ef5ed)
Is it still working by your side ?
EDIT
While waiting for better actions documentation for extensions, Here is a working command for Inkscape 1.1 :
inkscape -g --verb "com.klowner.filter.apply_transform;FileSave;FileClose;FileQuit" test.svg
from inkscape-applytransforms.
Related Issues (20)
- Errors when running HOT 5
- Is this works with Inkscape 0.92.5 ? HOT 1
- str() casting in Path HOT 2
- Update Windows path for installation in README HOT 3
- Failure to transform some paths HOT 1
- Applying transform on a clipPath
- `TypeError: uutounit() missing 1 required positional argument: 'to_unit'` HOT 1
- return [kind(val) for val in string.replace(',', ' ').replace('-', ' -').replace('e ', 'e').split()] ValueError: could not convert string to float HOT 7
- scaleStrokeWidth calculation not completely correct
- Does not seem to work for layer transform HOT 2
- Please update the files on the Inkscape.org repository. HOT 1
- Cannot do a translate on a rectangle HOT 2
- ImportError: No module named paths HOT 1
- Command --verb HOT 2
- applytransform.py:60 HOT 3
- deprecated multiplication operator HOT 8
- Negative values HOT 2
- DeprecationWarning: inkex.deprecated.main.transform_mul HOT 3
- can't find '__main__' module in 'C:\\Program Files\\Inkscape\\bin' HOT 2
- Stroke width isnt changed HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from inkscape-applytransforms.