Is it possible to specify the filetype or filename when using the verb FileSaveAs from a DOS prompt?

classic Classic list List threaded Threaded
19 messages Options
Reply | Threaded
Open this post in threaded view
|

Is it possible to specify the filetype or filename when using the verb FileSaveAs from a DOS prompt?

alvinpenner
This is two questions, actually, somewhat loosely related:

1. I would like to run a DOS command such as:
inkscape --verb=dosomething --verb=FileSaveAs \windows\temp\testtext.svg

Currently this command will present me with a SaveAs dialog with the current file name and the filetype svg. I would like to specify, in the command line, either the file type for the Save As operation, or perhaps the filename with the filetype as well, so that the operation could perform silently. Not sure what the syntax would be for this.

2. Alternately, if this is not possible, is it possible to execute verbs from inside a Python script? So, for example, if I were in the Python extension dxf_outlines.py for saving a dxf file, can I execute the verb "--verb=ObjectToPath" and get output from it?

tia,
Alvin
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to specify the filetype or filename when using the verb FileSaveAs from a DOS prompt?

Maren Hachmann
Hi Alvin,

Am 26.01.2017 um 14:09 schrieb alvinpenner:

> This is two questions, actually, somewhat loosely related:
>
> 1. I would like to run a DOS command such as:
> inkscape --verb=dosomething --verb=FileSaveAs \windows\temp\testtext.svg
>
> Currently this command will present me with a SaveAs dialog with the current
> file name and the filetype svg. I would like to specify, in the command
> line, either the file type for the Save As operation, or perhaps the
> filename with the filetype as well, so that the operation could perform
> silently. Not sure what the syntax would be for this.

- A couple of months ago, another kind of command line options was
added. They're called XVerbs, but I /think/ they only exist in trunk,
and they're not documented... (see
http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/15147,
http://inkscape.13.x6.nabble.com/xverbs-td4976472.html,
https://sourceforge.net/p/inkscape/mailman/message/35392523/)

As far as I understand, they support giving the 'save as' file name on
the command line - but I have no idea how they work.

> 2. Alternately, if this is not possible, is it possible to execute verbs
> from inside a Python script? So, for example, if I were in the Python
> extension dxf_outlines.py for saving a dxf file, can I execute the verb
> "--verb=ObjectToPath" and get output from it?

- Yes, see for example
https://github.com/Moini/inkscape-extensions-multi-bool (it re-imports
the changed document into the current session, but you can do with it
whatever you want - it probably has flaws, but seems to work for many).

Regards,
 Maren

> tia,
> Alvin
>
>
>
>
> --
> View this message in context: http://inkscape.13.x6.nabble.com/Is-it-possible-to-specify-the-filetype-or-filename-when-using-the-verb-FileSaveAs-from-a-DOS-prompt-tp4978604.html
> Sent from the Inkscape - Dev mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Inkscape-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/inkscape-devel
>


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Inkscape-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to specify the filetype or filename when using the verb FileSaveAs from a DOS prompt?

alvinpenner
thanks for the fast response! I'll check out both of these options. I try to sort of keep up with what is happening, but both of these slipped by me unnoticed.

Alvin
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to specify the filetype or filename when using the verb FileSaveAs from a DOS prompt?

Maren Hachmann
Am 26.01.2017 um 18:35 schrieb alvinpenner:
> thanks for the fast response! I'll check out both of these options. I try to
> sort of keep up with what is happening, but both of these slipped by me
> unnoticed.

- If you find out how the XVerbs work (maybe it's really simple?), can
you post a step-by-step? It would be good to have some documentation for
it for users.

Regards,
 Maren

> Alvin
>
>
>
> --
> View this message in context: http://inkscape.13.x6.nabble.com/Is-it-possible-to-specify-the-filetype-or-filename-when-using-the-verb-FileSaveAs-from-a-DOS-prompt-tp4978604p4978609.html
> Sent from the Inkscape - Dev mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Inkscape-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/inkscape-devel
>


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Inkscape-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to specify the filetype or filename when using the verb FileSaveAs from a DOS prompt?

alvinpenner
>>- If you find out how the XVerbs work (maybe it's really simple?), can
>>you post a step-by-step? It would be good to have some documentation for
>>it for users.

looks like the xverb feature is disabled by default in trunk. Just did a compile and got this output:

-- Could not locate the yaml library headers: xverb feature will be disabled
...
WITH_YAML:               OFF
...

unfortunately this means I will not be able to use them, since I need something that is enabled by default in the standard build. Have written dmitry.zhulanov privately to ask for more info in any event. Thanks for the info.

Alvin
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to specify the filetype or filename when using the verb FileSaveAs from a DOS prompt?

Marc Jeanmougin
Hi,

On 01/28/2017 12:55 AM, alvinpenner wrote:
> -- Could not locate the yaml library headers: xverb feature will be disabled

You probably need to install libyaml-dev


--
Marc

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Inkscape-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to specify the filetype or filename when using the verb FileSaveAs from a DOS prompt?

alvinpenner
sorry, I am not really sure what that means

Alvin
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to specify the filetype or filename when using the verb FileSaveAs from a DOS prompt?

alvinpenner
In reply to this post by Marc Jeanmougin
>> You probably need to install libyaml-dev

so, based on some googling, I assume that this is a Linux-only package
see: https://launchpad.net/ubuntu/precise/+package/libyaml-dev
unfortunately, I am on Windows 10, so this will not help me.

also, based on some more googling, I see that source code is available for LibYAML, but I do not see any Windows builds of this library:
http://pyyaml.org/wiki/LibYAML

- Does anyone know of a successful implementation of the Xverbs system, either on Linux or on Windows?
- Are there any plans to make Xverbs generally available?

tia,
Alvin
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to specify the filetype or filename when using the verb FileSaveAs from a DOS prompt?

Dmitry Zhulanov
In reply to this post by Maren Hachmann
Hi, Maren

I put short manual to main-linexact.cpp file, but the command line
option was changed to --xverbs=


  * Format of xverbs.yaml
  * using: $ inkscape --xverbs=xverbs.yaml
  *
  * verbose: yes # only "verbose: yes" enable logging
  * run:
  *  # open document to process
  *  - xverb-id: XFileOpen, gfx_sources/loading_screen/sandclock_atlas.svg
  *  - xverb-id: XUndoLabel, fresh_document # set label for UndoToLabel
xverb works
  *  # note: if something wrong with undo labels use verb EditUndo
instead of XUndoLabel and UndoToLabel at all
  *
  *  # select element to handle
  *  - xverb-id: XSelectElement, top_sand
  *
  *  # verbs
  *  - verb-id: EditInvertInAllLayers
  *  - verb-id: EditDelete
  *  - verb-id: FitCanvasToDrawing
  *
  *  # save element to separated svg document
  *  - xverb-id: XFileSaveAs,
output/thegame/linux/data/gfx/loading_screen/top_sand.svg
  *
  *  # also save png preview
  *  - xverb-id: XFileExportPNG,
output/thegame/linux/data/gfx_preview/loading_screen/top_sand.png
  *
  *  # return to the fresh_state of document
  *  - xverb-id: UndoToLabel, fresh_document
  *
  *  # do any other handling
  *
  *  # inkscape have a lot of useful verbs
  *  - verb-id: FileQuit

Best regards,
Dmitry Zhulanov

27.01.2017 01:01, Maren Hachmann пишет:

> Am 26.01.2017 um 18:35 schrieb alvinpenner:
>> thanks for the fast response! I'll check out both of these options. I try to
>> sort of keep up with what is happening, but both of these slipped by me
>> unnoticed.
> - If you find out how the XVerbs work (maybe it's really simple?), can
> you post a step-by-step? It would be good to have some documentation for
> it for users.
>
> Regards,
>   Maren
>
>> Alvin
>>
>>
>>
>> --
>> View this message in context: http://inkscape.13.x6.nabble.com/Is-it-possible-to-specify-the-filetype-or-filename-when-using-the-verb-FileSaveAs-from-a-DOS-prompt-tp4978604p4978609.html
>> Sent from the Inkscape - Dev mailing list archive at Nabble.com.
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Inkscape-devel mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/inkscape-devel
>>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Inkscape-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/inkscape-devel


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Inkscape-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to specify the filetype or filename when using the verb FileSaveAs from a DOS prompt?

Mark Schafer
This is useful. I had wondered how to use it.
But how do I find all the verbs?
E.g. you use EditInvertInAllLayers. I can't find this on the UI but I
can find EditDelete
Where are all these defined ?


On 2/26/2017 10:11 AM, Dmitry Zhulanov wrote:

> Hi, Maren
>
> I put short manual to main-linexact.cpp file, but the command line
> option was changed to --xverbs=
>
>
>    * Format of xverbs.yaml
>    * using: $ inkscape --xverbs=xverbs.yaml
>    *
>    * verbose: yes # only "verbose: yes" enable logging
>    * run:
>    *  # open document to process
>    *  - xverb-id: XFileOpen, gfx_sources/loading_screen/sandclock_atlas.svg
>    *  - xverb-id: XUndoLabel, fresh_document # set label for UndoToLabel
> xverb works
>    *  # note: if something wrong with undo labels use verb EditUndo
> instead of XUndoLabel and UndoToLabel at all
>    *
>    *  # select element to handle
>    *  - xverb-id: XSelectElement, top_sand
>    *
>    *  # verbs
>    *  - verb-id: EditInvertInAllLayers
>    *  - verb-id: EditDelete
>    *  - verb-id: FitCanvasToDrawing
>    *
>    *  # save element to separated svg document
>    *  - xverb-id: XFileSaveAs,
> output/thegame/linux/data/gfx/loading_screen/top_sand.svg
>    *
>    *  # also save png preview
>    *  - xverb-id: XFileExportPNG,
> output/thegame/linux/data/gfx_preview/loading_screen/top_sand.png
>    *
>    *  # return to the fresh_state of document
>    *  - xverb-id: UndoToLabel, fresh_document
>    *
>    *  # do any other handling
>    *
>    *  # inkscape have a lot of useful verbs
>    *  - verb-id: FileQuit
>
> Best regards,
> Dmitry Zhulanov
>
> 27.01.2017 01:01, Maren Hachmann пишет:
>> Am 26.01.2017 um 18:35 schrieb alvinpenner:
>>> thanks for the fast response! I'll check out both of these options. I try to
>>> sort of keep up with what is happening, but both of these slipped by me
>>> unnoticed.
>> - If you find out how the XVerbs work (maybe it's really simple?), can
>> you post a step-by-step? It would be good to have some documentation for
>> it for users.
>>
>> Regards,
>>    Maren
>>
>>> Alvin
>>>
>>>
>>>
>>> --
>>> View this message in context: http://inkscape.13.x6.nabble.com/Is-it-possible-to-specify-the-filetype-or-filename-when-using-the-verb-FileSaveAs-from-a-DOS-prompt-tp4978604p4978609.html
>>> Sent from the Inkscape - Dev mailing list archive at Nabble.com.
>>>
>>> ------------------------------------------------------------------------------
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>>> _______________________________________________
>>> Inkscape-devel mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/inkscape-devel
>>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Inkscape-devel mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/inkscape-devel
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Inkscape-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/inkscape-devel
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2016.0.7998 / Virus Database: 4756/14022 - Release Date: 02/25/17


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Inkscape-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to specify the filetype or filename when using the verb FileSaveAs from a DOS prompt?

alvinpenner
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to specify the filetype or filename when using the verb FileSaveAs from a DOS prompt?

alvinpenner
>> E.g. you use EditInvertInAllLayers

and the existing verbs, which are currently supported, are given by the command:
inkscape --verb-list
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to specify the filetype or filename when using the verb FileSaveAs from a DOS prompt?

Mark Schafer
OK thanks for that - I have updated the extensions help page as this
also indicates that the id tag for an extension can be used to run it.
(I did not know that).
- http://wiki.inkscape.org/wiki/index.php/Script_extensions

It is unclear to me why xverbs has been added rather than adding the
operations using the existing verbs interface.
- http://wiki.inkscape.org/wiki/index.php/Adding_interface_verbs

(I'm also working on finding out how to set individual parameters to a
verb (for extensions), in case anyone has any hints ?)


On 2/27/2017 1:57 AM, alvinpenner wrote:

>>> E.g. you use EditInvertInAllLayers
> and the existing verbs, which are currently supported, are given by the
> command:
> inkscape --verb-list
>
>
>
> --
> View this message in context: http://inkscape.13.x6.nabble.com/Is-it-possible-to-specify-the-filetype-or-filename-when-using-the-verb-FileSaveAs-from-a-DOS-prompt-tp4978604p4979051.html
> Sent from the Inkscape - Dev mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Inkscape-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/inkscape-devel
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2016.0.7998 / Virus Database: 4756/14023 - Release Date: 02/25/17
>
>


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Inkscape-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to specify the filetype or filename when using the verb FileSaveAs from a DOS prompt?

Dmitry Zhulanov
Hi


27.02.2017 05:20, Mark Schafer пишет:

> OK thanks for that - I have updated the extensions help page as this
> also indicates that the id tag for an extension can be used to run it.
> (I did not know that).
> - http://wiki.inkscape.org/wiki/index.php/Script_extensions
>
> It is unclear to me why xverbs has been added rather than adding the
> operations using the existing verbs interface.
> - http://wiki.inkscape.org/wiki/index.php/Adding_interface_verbs
>
> (I'm also working on finding out how to set individual parameters to a
> verb (for extensions), in case anyone has any hints ?)
This why the xverbs was added, verbs does not have options and xverbs
does. Best solution would be add the Python and after that xverbs can be
removed.

Full list of xverbs is very small: XFileSaveAs, XFileOpen,
XFileExportPNG, XSelectElement, XUndoLabel and UndoToLabel.

Using xverbs it is possible to open/handle/save lots of svg files per
one inkscape instance. in my project for example:
yaml script have 1099 lines. It opens 17 svg files, crop elements and
save them as svg 126 files and export 43 png files.
It takes just a 30 seconds and use only one instance of Inkscape.

Best regards,
Dmitry Zhulanov

>
> On 2/27/2017 1:57 AM, alvinpenner wrote:
>>>> E.g. you use EditInvertInAllLayers
>> and the existing verbs, which are currently supported, are given by the
>> command:
>> inkscape --verb-list
>>
>>
>>
>> --
>> View this message in context: http://inkscape.13.x6.nabble.com/Is-it-possible-to-specify-the-filetype-or-filename-when-using-the-verb-FileSaveAs-from-a-DOS-prompt-tp4978604p4979051.html
>> Sent from the Inkscape - Dev mailing list archive at Nabble.com.
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Inkscape-devel mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/inkscape-devel
>>
>>
>> -----
>> No virus found in this message.
>> Checked by AVG - www.avg.com
>> Version: 2016.0.7998 / Virus Database: 4756/14023 - Release Date: 02/25/17
>>
>>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Inkscape-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/inkscape-devel


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Inkscape-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to specify the filetype or filename when using the verb FileSaveAs from a DOS prompt?

Maren Hachmann
In reply to this post by Dmitry Zhulanov
Hi Dmitry,

thank you :)

So, it seems this is available in Inkscape trunk, currently, and the
compile flag for xverbs is on by default.

Would you like to add your documentation into the Wiki? That way, we
could link to it more easily from the release notes.

The python option you're hinting at, would that mean allowing python
extensions access to filling in arbitrary dialog parameters, which would
allow to automate just about anything in Inkscape, as long as you're
able to look up the parameter name in the code?
Would that be possible at all, without rewriting every single dialog?

Regards,
 Maren


Am 25.02.2017 um 22:11 schrieb Dmitry Zhulanov:

> Hi, Maren
>
> I put short manual to main-linexact.cpp file, but the command line
> option was changed to --xverbs=
>
>
>   * Format of xverbs.yaml
>   * using: $ inkscape --xverbs=xverbs.yaml
>   *
>   * verbose: yes # only "verbose: yes" enable logging
>   * run:
>   *  # open document to process
>   *  - xverb-id: XFileOpen, gfx_sources/loading_screen/sandclock_atlas.svg
>   *  - xverb-id: XUndoLabel, fresh_document # set label for UndoToLabel
> xverb works
>   *  # note: if something wrong with undo labels use verb EditUndo
> instead of XUndoLabel and UndoToLabel at all
>   *
>   *  # select element to handle
>   *  - xverb-id: XSelectElement, top_sand
>   *
>   *  # verbs
>   *  - verb-id: EditInvertInAllLayers
>   *  - verb-id: EditDelete
>   *  - verb-id: FitCanvasToDrawing
>   *
>   *  # save element to separated svg document
>   *  - xverb-id: XFileSaveAs,
> output/thegame/linux/data/gfx/loading_screen/top_sand.svg
>   *
>   *  # also save png preview
>   *  - xverb-id: XFileExportPNG,
> output/thegame/linux/data/gfx_preview/loading_screen/top_sand.png
>   *
>   *  # return to the fresh_state of document
>   *  - xverb-id: UndoToLabel, fresh_document
>   *
>   *  # do any other handling
>   *
>   *  # inkscape have a lot of useful verbs
>   *  - verb-id: FileQuit
>
> Best regards,
> Dmitry Zhulanov
>
> 27.01.2017 01:01, Maren Hachmann пишет:
>> Am 26.01.2017 um 18:35 schrieb alvinpenner:
>>> thanks for the fast response! I'll check out both of these options. I try to
>>> sort of keep up with what is happening, but both of these slipped by me
>>> unnoticed.
>> - If you find out how the XVerbs work (maybe it's really simple?), can
>> you post a step-by-step? It would be good to have some documentation for
>> it for users.
>>
>> Regards,
>>   Maren
>>
>>> Alvin
>>>
>>>
>>>
>>> --
>>> View this message in context: http://inkscape.13.x6.nabble.com/Is-it-possible-to-specify-the-filetype-or-filename-when-using-the-verb-FileSaveAs-from-a-DOS-prompt-tp4978604p4978609.html
>>> Sent from the Inkscape - Dev mailing list archive at Nabble.com.
>>>
>>> ------------------------------------------------------------------------------
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>>> _______________________________________________
>>> Inkscape-devel mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/inkscape-devel
>>>
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Inkscape-devel mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/inkscape-devel
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Inkscape-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/inkscape-devel
>


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Inkscape-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to specify the filetype or filename when using the verb FileSaveAs from a DOS prompt?

Dmitry Zhulanov


27.02.2017 21:50, Maren Hachmann пишет:
> Hi Dmitry,
>
> thank you :)
>
> So, it seems this is available in Inkscape trunk, currently, and the
> compile flag for xverbs is on by default.
>
> Would you like to add your documentation into the Wiki? That way, we
> could link to it more easily from the release notes.
It would be greate!
>
> The python option you're hinting at, would that mean allowing python
> extensions access to filling in arbitrary dialog parameters, which would
> allow to automate just about anything in Inkscape, as long as you're
> able to look up the parameter name in the code?
> Would that be possible at all, without rewriting every single dialog?
Python can be embedded in a different ways. For example it is already
using to write filter extensions in the Inkscape. And another way of
embedding is useful for me.

"verbs" is created to build menu system for Inkscape thats why they
don't have arguments. Inkscape on startup create table of verbs
Verb::_base_verbs[]. This verbs is binded to different *Verb::perform
fragments of low level Inkscape code.

Dialogs in the Inkscape usually is created to run some low level code in
the onOk() handlers. e.g. dialog SaveAs do Inkscape::Extension::save().

xverbs feature is reads .yaml on start and then using verbs table calls
binded low level fragments. Also I add several new fragments which is
use parameters from .yaml instead of dialogs.

verbs cant be used to filling arbitrary dialog parameters, but it is
possible to add new xverbs low level fragments which can use args from .yaml
data. This fragments also can create dialogs with filled arbitrary
parameters. But
every such fragment should use gtk to do it.

It would be nice if Inkscape can run python scripts, which can call
binded to
verbs fragments and also fragments with arguments which can do
Inkscape::Extension::save() or sp_export_png_file().

P.S. sorry for my bad English, Im not a native.

Best Regards,
Dmitry Zhulanov

> Regards,
>   Maren
>
>
> Am 25.02.2017 um 22:11 schrieb Dmitry Zhulanov:
>> Hi, Maren
>>
>> I put short manual to main-linexact.cpp file, but the command line
>> option was changed to --xverbs=
>>
>>
>>    * Format of xverbs.yaml
>>    * using: $ inkscape --xverbs=xverbs.yaml
>>    *
>>    * verbose: yes # only "verbose: yes" enable logging
>>    * run:
>>    *  # open document to process
>>    *  - xverb-id: XFileOpen, gfx_sources/loading_screen/sandclock_atlas.svg
>>    *  - xverb-id: XUndoLabel, fresh_document # set label for UndoToLabel
>> xverb works
>>    *  # note: if something wrong with undo labels use verb EditUndo
>> instead of XUndoLabel and UndoToLabel at all
>>    *
>>    *  # select element to handle
>>    *  - xverb-id: XSelectElement, top_sand
>>    *
>>    *  # verbs
>>    *  - verb-id: EditInvertInAllLayers
>>    *  - verb-id: EditDelete
>>    *  - verb-id: FitCanvasToDrawing
>>    *
>>    *  # save element to separated svg document
>>    *  - xverb-id: XFileSaveAs,
>> output/thegame/linux/data/gfx/loading_screen/top_sand.svg
>>    *
>>    *  # also save png preview
>>    *  - xverb-id: XFileExportPNG,
>> output/thegame/linux/data/gfx_preview/loading_screen/top_sand.png
>>    *
>>    *  # return to the fresh_state of document
>>    *  - xverb-id: UndoToLabel, fresh_document
>>    *
>>    *  # do any other handling
>>    *
>>    *  # inkscape have a lot of useful verbs
>>    *  - verb-id: FileQuit
>>
>> Best regards,
>> Dmitry Zhulanov
>>
>> 27.01.2017 01:01, Maren Hachmann пишет:
>>> Am 26.01.2017 um 18:35 schrieb alvinpenner:
>>>> thanks for the fast response! I'll check out both of these options. I try to
>>>> sort of keep up with what is happening, but both of these slipped by me
>>>> unnoticed.
>>> - If you find out how the XVerbs work (maybe it's really simple?), can
>>> you post a step-by-step? It would be good to have some documentation for
>>> it for users.
>>>
>>> Regards,
>>>    Maren
>>>
>>>> Alvin
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context: http://inkscape.13.x6.nabble.com/Is-it-possible-to-specify-the-filetype-or-filename-when-using-the-verb-FileSaveAs-from-a-DOS-prompt-tp4978604p4978609.html
>>>> Sent from the Inkscape - Dev mailing list archive at Nabble.com.
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Check out the vibrant tech community on one of the world's most
>>>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>>>> _______________________________________________
>>>> Inkscape-devel mailing list
>>>> [hidden email]
>>>> https://lists.sourceforge.net/lists/listinfo/inkscape-devel
>>>>
>>> ------------------------------------------------------------------------------
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>>> _______________________________________________
>>> Inkscape-devel mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/inkscape-devel
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Inkscape-devel mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/inkscape-devel
>>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Inkscape-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/inkscape-devel


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Inkscape-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to specify the filetype or filename when using the verb FileSaveAs from a DOS prompt?

Maren Hachmann
Hi Dmitry,

Am 04.03.2017 um 17:25 schrieb Dmitry Zhulanov:
>
>
> 27.02.2017 21:50, Maren Hachmann пишет:
>> Would you like to add your documentation into the Wiki? That way, we
>> could link to it more easily from the release notes.
> It would be greate!

- If you don't have a Wiki account yet, can you let us know your
favourite user name for the Wiki?

> Python can be embedded in a different ways. For example it is already
> using to write filter extensions in the Inkscape. And another way of
> embedding is useful for me.
>
> "verbs" is created to build menu system for Inkscape thats why they
> don't have arguments. Inkscape on startup create table of verbs
> Verb::_base_verbs[]. This verbs is binded to different *Verb::perform
> fragments of low level Inkscape code.
>
> Dialogs in the Inkscape usually is created to run some low level code in
> the onOk() handlers. e.g. dialog SaveAs do Inkscape::Extension::save().
>
> xverbs feature is reads .yaml on start and then using verbs table calls
> binded low level fragments. Also I add several new fragments which is
> use parameters from .yaml instead of dialogs.

- Thank you very much for your explanation, Dmitry! I think I can follow
you until here.

For the feature request below, I need to refer you to the Inkscape
program devs (which I'm not).

> verbs cant be used to filling arbitrary dialog parameters, but it is
> possible to add new xverbs low level fragments which can use args from .yaml
> data. This fragments also can create dialogs with filled arbitrary
> parameters. But
> every such fragment should use gtk to do it.
>
> It would be nice if Inkscape can run python scripts, which can call
> binded to
> verbs fragments and also fragments with arguments which can do
> Inkscape::Extension::save() or sp_export_png_file().
>
> P.S. sorry for my bad English, Im not a native.

- Don't worry, I can understand you just fine. Most of us aren't native
speakers, I think.

Maren

> Best Regards,
> Dmitry Zhulanov
>> Regards,
>>   Maren
>>
>>
>> Am 25.02.2017 um 22:11 schrieb Dmitry Zhulanov:
>>> Hi, Maren
>>>
>>> I put short manual to main-linexact.cpp file, but the command line
>>> option was changed to --xverbs=
>>>
>>>
>>>    * Format of xverbs.yaml
>>>    * using: $ inkscape --xverbs=xverbs.yaml
>>>    *
>>>    * verbose: yes # only "verbose: yes" enable logging
>>>    * run:
>>>    *  # open document to process
>>>    *  - xverb-id: XFileOpen, gfx_sources/loading_screen/sandclock_atlas.svg
>>>    *  - xverb-id: XUndoLabel, fresh_document # set label for UndoToLabel
>>> xverb works
>>>    *  # note: if something wrong with undo labels use verb EditUndo
>>> instead of XUndoLabel and UndoToLabel at all
>>>    *
>>>    *  # select element to handle
>>>    *  - xverb-id: XSelectElement, top_sand
>>>    *
>>>    *  # verbs
>>>    *  - verb-id: EditInvertInAllLayers
>>>    *  - verb-id: EditDelete
>>>    *  - verb-id: FitCanvasToDrawing
>>>    *
>>>    *  # save element to separated svg document
>>>    *  - xverb-id: XFileSaveAs,
>>> output/thegame/linux/data/gfx/loading_screen/top_sand.svg
>>>    *
>>>    *  # also save png preview
>>>    *  - xverb-id: XFileExportPNG,
>>> output/thegame/linux/data/gfx_preview/loading_screen/top_sand.png
>>>    *
>>>    *  # return to the fresh_state of document
>>>    *  - xverb-id: UndoToLabel, fresh_document
>>>    *
>>>    *  # do any other handling
>>>    *
>>>    *  # inkscape have a lot of useful verbs
>>>    *  - verb-id: FileQuit
>>>
>>> Best regards,
>>> Dmitry Zhulanov
>>>
>>> 27.01.2017 01:01, Maren Hachmann пишет:
>>>> Am 26.01.2017 um 18:35 schrieb alvinpenner:
>>>>> thanks for the fast response! I'll check out both of these options. I try to
>>>>> sort of keep up with what is happening, but both of these slipped by me
>>>>> unnoticed.
>>>> - If you find out how the XVerbs work (maybe it's really simple?), can
>>>> you post a step-by-step? It would be good to have some documentation for
>>>> it for users.
>>>>
>>>> Regards,
>>>>    Maren
>>>>
>>>>> Alvin
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> View this message in context: http://inkscape.13.x6.nabble.com/Is-it-possible-to-specify-the-filetype-or-filename-when-using-the-verb-FileSaveAs-from-a-DOS-prompt-tp4978604p4978609.html
>>>>> Sent from the Inkscape - Dev mailing list archive at Nabble.com.
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> Check out the vibrant tech community on one of the world's most
>>>>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>>>>> _______________________________________________
>>>>> Inkscape-devel mailing list
>>>>> [hidden email]
>>>>> https://lists.sourceforge.net/lists/listinfo/inkscape-devel
>>>>>
>>>> ------------------------------------------------------------------------------
>>>> Check out the vibrant tech community on one of the world's most
>>>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>>>> _______________________________________________
>>>> Inkscape-devel mailing list
>>>> [hidden email]
>>>> https://lists.sourceforge.net/lists/listinfo/inkscape-devel
>>>
>>> ------------------------------------------------------------------------------
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>>> _______________________________________________
>>> Inkscape-devel mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/inkscape-devel
>>>
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Inkscape-devel mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/inkscape-devel
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Inkscape-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/inkscape-devel
>


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Inkscape-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to specify the filetype or filename when using the verb FileSaveAs from a DOS prompt?

Dmitry Zhulanov
Hi Maren,
05.03.2017 00:15, Maren Hachmann пишет:

> Hi Dmitry,
>
> Am 04.03.2017 um 17:25 schrieb Dmitry Zhulanov:
>>
>> 27.02.2017 21:50, Maren Hachmann пишет:
>>> Would you like to add your documentation into the Wiki? That way, we
>>> could link to it more easily from the release notes.
>> It would be greate!
> - If you don't have a Wiki account yet, can you let us know your
> favourite user name for the Wiki?
I think dmitryz would be ok

>
>> Python can be embedded in a different ways. For example it is already
>> using to write filter extensions in the Inkscape. And another way of
>> embedding is useful for me.
>>
>> "verbs" is created to build menu system for Inkscape thats why they
>> don't have arguments. Inkscape on startup create table of verbs
>> Verb::_base_verbs[]. This verbs is binded to different *Verb::perform
>> fragments of low level Inkscape code.
>>
>> Dialogs in the Inkscape usually is created to run some low level code in
>> the onOk() handlers. e.g. dialog SaveAs do Inkscape::Extension::save().
>>
>> xverbs feature is reads .yaml on start and then using verbs table calls
>> binded low level fragments. Also I add several new fragments which is
>> use parameters from .yaml instead of dialogs.
> - Thank you very much for your explanation, Dmitry! I think I can follow
> you until here.
>
> For the feature request below, I need to refer you to the Inkscape
> program devs (which I'm not).
I think no problems here

Best regards,
Dmitry Zhulanov

>
>> verbs cant be used to filling arbitrary dialog parameters, but it is
>> possible to add new xverbs low level fragments which can use args from .yaml
>> data. This fragments also can create dialogs with filled arbitrary
>> parameters. But
>> every such fragment should use gtk to do it.
>>
>> It would be nice if Inkscape can run python scripts, which can call
>> binded to
>> verbs fragments and also fragments with arguments which can do
>> Inkscape::Extension::save() or sp_export_png_file().
>>
>> P.S. sorry for my bad English, Im not a native.
> - Don't worry, I can understand you just fine. Most of us aren't native
> speakers, I think.
>
> Maren
>
>> Best Regards,
>> Dmitry Zhulanov
>>> Regards,
>>>    Maren
>>>
>>>
>>> Am 25.02.2017 um 22:11 schrieb Dmitry Zhulanov:
>>>> Hi, Maren
>>>>
>>>> I put short manual to main-linexact.cpp file, but the command line
>>>> option was changed to --xverbs=
>>>>
>>>>
>>>>     * Format of xverbs.yaml
>>>>     * using: $ inkscape --xverbs=xverbs.yaml
>>>>     *
>>>>     * verbose: yes # only "verbose: yes" enable logging
>>>>     * run:
>>>>     *  # open document to process
>>>>     *  - xverb-id: XFileOpen, gfx_sources/loading_screen/sandclock_atlas.svg
>>>>     *  - xverb-id: XUndoLabel, fresh_document # set label for UndoToLabel
>>>> xverb works
>>>>     *  # note: if something wrong with undo labels use verb EditUndo
>>>> instead of XUndoLabel and UndoToLabel at all
>>>>     *
>>>>     *  # select element to handle
>>>>     *  - xverb-id: XSelectElement, top_sand
>>>>     *
>>>>     *  # verbs
>>>>     *  - verb-id: EditInvertInAllLayers
>>>>     *  - verb-id: EditDelete
>>>>     *  - verb-id: FitCanvasToDrawing
>>>>     *
>>>>     *  # save element to separated svg document
>>>>     *  - xverb-id: XFileSaveAs,
>>>> output/thegame/linux/data/gfx/loading_screen/top_sand.svg
>>>>     *
>>>>     *  # also save png preview
>>>>     *  - xverb-id: XFileExportPNG,
>>>> output/thegame/linux/data/gfx_preview/loading_screen/top_sand.png
>>>>     *
>>>>     *  # return to the fresh_state of document
>>>>     *  - xverb-id: UndoToLabel, fresh_document
>>>>     *
>>>>     *  # do any other handling
>>>>     *
>>>>     *  # inkscape have a lot of useful verbs
>>>>     *  - verb-id: FileQuit
>>>>
>>>> Best regards,
>>>> Dmitry Zhulanov
>>>>
>>>> 27.01.2017 01:01, Maren Hachmann пишет:
>>>>> Am 26.01.2017 um 18:35 schrieb alvinpenner:
>>>>>> thanks for the fast response! I'll check out both of these options. I try to
>>>>>> sort of keep up with what is happening, but both of these slipped by me
>>>>>> unnoticed.
>>>>> - If you find out how the XVerbs work (maybe it's really simple?), can
>>>>> you post a step-by-step? It would be good to have some documentation for
>>>>> it for users.
>>>>>
>>>>> Regards,
>>>>>     Maren
>>>>>
>>>>>> Alvin
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> View this message in context: http://inkscape.13.x6.nabble.com/Is-it-possible-to-specify-the-filetype-or-filename-when-using-the-verb-FileSaveAs-from-a-DOS-prompt-tp4978604p4978609.html
>>>>>> Sent from the Inkscape - Dev mailing list archive at Nabble.com.
>>>>>>
>>>>>> ------------------------------------------------------------------------------
>>>>>> Check out the vibrant tech community on one of the world's most
>>>>>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>>>>>> _______________________________________________
>>>>>> Inkscape-devel mailing list
>>>>>> [hidden email]
>>>>>> https://lists.sourceforge.net/lists/listinfo/inkscape-devel
>>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> Check out the vibrant tech community on one of the world's most
>>>>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>>>>> _______________________________________________
>>>>> Inkscape-devel mailing list
>>>>> [hidden email]
>>>>> https://lists.sourceforge.net/lists/listinfo/inkscape-devel
>>>> ------------------------------------------------------------------------------
>>>> Check out the vibrant tech community on one of the world's most
>>>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>>>> _______________________________________________
>>>> Inkscape-devel mailing list
>>>> [hidden email]
>>>> https://lists.sourceforge.net/lists/listinfo/inkscape-devel
>>>>
>>> ------------------------------------------------------------------------------
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>>> _______________________________________________
>>> Inkscape-devel mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/inkscape-devel
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Inkscape-devel mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/inkscape-devel
>>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Inkscape-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/inkscape-devel


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Inkscape-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to specify the filetype or filename when using the verb FileSaveAs from a DOS prompt?

Maren Hachmann
Am 04.03.2017 um 18:51 schrieb Dmitry Zhulanov:

> Hi Maren,
> 05.03.2017 00:15, Maren Hachmann пишет:
>> Hi Dmitry,
>>
>> Am 04.03.2017 um 17:25 schrieb Dmitry Zhulanov:
>>>
>>> 27.02.2017 21:50, Maren Hachmann пишет:
>>>> Would you like to add your documentation into the Wiki? That way, we
>>>> could link to it more easily from the release notes.
>>> It would be greate!
>> - If you don't have a Wiki account yet, can you let us know your
>> favourite user name for the Wiki?
> I think dmitryz would be ok

You should have received an email from the Inkscape Wiki with a
password. Happy editing! ;-)

Regards,
 Maren

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Inkscape-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel