[cli]: add 'silent' mode for script-based input extensions

Bug #1266193 reported by Victor
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Inkscape
Confirmed
Wishlist
Unassigned

Bug Description

Hi,
Just trying to convert .dxf file to png in console mode like this:
test.dxf --export-area-drawing --export-png=c:\temp\123213123.png

But Inkscape shows me dialog windows and ask about A4 fitting and scale factor but im using command --export-area-drawing that i thought should use all drawing area and dont ask me about fitting to A4 size. It will be nice id Inkscape do not show any dialog windows in console mode.

Im using build inkscape_r12855-201312211257

Thanks in advance,
Victor

Revision history for this message
Alvin Penner (apenner) wrote :

I believe this dialog box is coming from the import of the dxf file, not coming from the export of the png file.

Unfortunately, I do not know of any way of importing a dxf file silently, with no dialog box.

Revision history for this message
Victor (gaploid) wrote :

I'm trying to accomplish this operation silent:
inkscape.com test.dxf --export-area-drawing --export-png=c:\temp\123213123.png

but this dialog window is ruin my script. There is no dialog windows when Im converting other formats svg, cdr and etc. I think parameters about fitting to A4 size or not can be taken from this console parameter --export-area-drawing and others params can be default in console mode or just add another parameter that can be pass to inkscape to avoid this window. What do you think?

Revision history for this message
Alvin Penner (apenner) wrote :

as I mentioned previously, the problem does not lie on the export side. The problem lies on the import side. You will encounter exactly the same problem if you run the simple command

inkscape \windows\temp\test.dxf

which just imports a dxf file. In principle, it would be relatively easy to convert the dxf import routine to run silently. All you need to do is hard code the appropriate defaults into the script dxf_input.inx. However, then the problem is that there is no way to activate the dialog box if you need it.

In other words, as far as I can tell, there is no easy way to switch from a "silent" import version to a "dialog" import version. It would be necessary to actually have two separate versions, one for each task. However, creating a "silent" version for your own personal use would probably not be very hard. You would need to remove all the parameters from the .inx file and hard code all the defaults into the .py file.

su_v (suv-lp)
tags: added: cli extensions-plugins importing
su_v (suv-lp)
Changed in inkscape:
importance: Undecided → Wishlist
summary: - Inkscape shows dialog window in in console mode
+ [cli]: add 'silent' mode for script-based input extensions
Changed in inkscape:
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.