Command Line Support
Enable Valentina to be called from the command line with options.
valentina -somebody.vit -pattern.val -outputfile.svg
Comments (24)
-
reporter -
reporter What are the command line options for Valentina? These options should be documented here in the issues thread.
-
Account Deleted Usage: valentina [options] filename Pattern making program. Options: -h, --help Displays this help. -v, --version Displays version information. --outfile <outfile> Path to output exported layout file. Use it to enable console export mode. --mfile <mfile> Path to custom measure file (export mode). --format <format> Number corresponding to output format (default = 0, export mode): Svg files (*.svg) = 0 PDF files (*.pdf) = 1 Images (*.png) = 2 Wavefront OBJ (*.obj) = 3 PS files (*.ps) = 4 EPS files (*.eps) = 5 --pageformat <pageformat> Number corresponding to page template (default = 0, export mode): A0 = 0 A1 = 1 A2 = 2 A3 = 3 A4 = 4 Letter = 5 Legal = 6 Roll 24in = 7 Roll 30in = 8 Roll 36in = 9 Roll 42in = 10 Roll 44in = 11 --pagew <pagew> Page width in current units like 12.0 (cannot be used with "pageformat", export mode). --pageh <pageh> Page height in current units like 12.0 (cannot be used with "pageformat", export mode). --pageunits <pageunits> Page height/width measure units (cannot be used with "pageformat", export mode): mm, cm, inch, px --rotate <rotate> Rotation in degrees (one of predefined). Default (or 0) is no-rotate (export mode). --crop Auto crop unused length (export mode). --unite Unite pages if possible (export mode). --savelen Save length of the sheet if set. (export mode). --layounits <layounits> Layout units (as paper's one except px, export mode). --shiftlen <shiftlen> Shift layout length measured in layout units (export mode). --gapwidth <gapwidth> Gap width x2, measured in layout units. (export mode). --groups <groups> Sets layout groupping (export mode): Three groups: big, middle, small = 0 Two groups: big, small = 1 Descending area = 2 Arguments: filename Pattern file.
-
reporter Thanks for posting the Command Line options. When code is merged, I will build & test ASAP.
-
repo owner I need some time to test.
-
reporter Excellent! Thank you.
-
reporter Roman is this code merge-able yet?
-
repo owner What do you mean?
-
Account Deleted I told her, that I had to resolve merging errors ... ...yes, it seems good now.
-
repo owner yes, it seems good now.
Yes.
-
reporter Is the code for
#334in the develop branch yet? -
Account Deleted He needs to test it I think. Also I cannot open "layout dialog" with his new changes even by GUI :/
-
reporter Okay I will download current code & see what happens
-
repo owner Conversion formats 0.1.4->0.2.0 doesn't work yet. Create new test file for him.
-
reporter Okay I will download current code and see
-
reporter Okay I'm building code - slow on my laptop - may take several hours. When finished I will create new pattern & post it.
-
reporter okay there was a recent series of commits for the Measurements feature which changed the format of the pattern.
Alexsey you need a pattern with the new format. Roman, please provide a new measurement file.
Here are steps to create a new pattern for a simple square
Create new pattern (File/New) Enter new pattern name. Select the measurement file as an existing measurement file that Roman sends you.
Point A will be created automatically.
Select the Point section in the lefthand menu.
Select 'Point from Distance and Angle' tool (the first tool on the first row) Click on A and drag red line a short distance in any direction then left click on canvas to create point B. Right click on B, in popup box select 'Options' Enter angle 270 and length 10 Click 'Ok',
Select 'Point from Distance and Angle' tool again Click on B, drag red line & click to create point C Right click on C, select 'Options' Enter angle 0 and length 10 'OK'
Select 'Point from Distance and Angle' tool Click on C, drag red line & click to create point D Right click on D, in popup box select 'Options' Enter angle 180 and length 10 'OK'
Select 'Line' section in lefthand menu
Select 'Line' tool (first tool in 'Line' section) Enter point 'D' as first point of line Enter point 'A' as second point of line 'OK'
File/Save to save pattern to your pattern directory which you entered under File/Preferences/Paths
To create the Pattern Details:
Click on 'Detail' in left hand menu Click on 'Create seam allowance'tool (first tool in Detail section) Click on A - this should create a popup box with point A in the seam allowance list then B - this should add B to the popup box then C then D then A again to close the loop. The list from the top down should show A B C D A Do not change any of the default settings, the seam allowance width should be 1cm, the Closed box should be checked. 'OK'
File/Save to save pattern and detail
-
repo owner Alexsey you need a pattern with the new format. Roman, please provide a new measurement file.
You don't need a measurement file if don't want to use data in a pattern.
-
reporter That's good. I would like to test the command line features with a pattern that uses measurements and with a pattern that doesn't use measurements.
Can you post an example of a new measurement file? It doesn't need any values in it.
-
repo owner - attached measurements.vit
-
reporter - attached new_measurements.vit
new_measurements.vit is uploaded.
It uses the new measurement file structure. It only has the Height section included right now, but this is sufficient for creating a test pattern then testing the command line feature.
-
reporter Qmake runs without error. But when I try to Build I get this error:
......\valentina\src\libs\vpatterndb" -I"........\valentina\src\libs\vgeometry" -I"........\valentina\src\libs\ifc" -I"........\valentina\src\libs\vmisc" -I"........\valentina\src\libs\vobj" -I"........\valentina\src\libs\vlayout" -I"........\valentina\src\libs\qmuparser" -I"........\valentina\src\libs\vpropertyexplorer" -I"C:\Qt5.4\5.4\mingw491_32\include" -I"C:\Qt5.4\5.4\mingw491_32\include\QtSvg" -I"C:\Qt5.4\5.4\mingw491_32\include\QtPrintSupport" -I"C:\Qt5.4\5.4\mingw491_32\include\QtWidgets" -I"C:\Qt5.4\5.4\mingw491_32\include\QtGui" -I"C:\Qt5.4\5.4\mingw491_32\include\QtXml" -I"C:\Qt5.4\5.4\mingw491_32\include\QtXmlPatterns" -I"C:\Qt5.4\5.4\mingw491_32\include\QtNetwork" -I"C:\Qt5.4\5.4\mingw491_32\include\QtCore" -I"moc" -I"uic" -I"C:\Qt5.4\5.4\mingw491_32\mkspecs\win32-g++" -o obj\vapplication.o ........\valentina\src\app\valentina\core\vapplication.cpp ........\valentina\src\app\valentina\core\vapplication.cpp: In member function 'QString VApplication::TapeFilePath() const': ........\valentina\src\app\valentina\core\vapplication.cpp:328:16: error: 'fileBundle' was not declared in this scope return fileBundle.absoluteFilePath(); ^ ........\valentina\src\app\valentina\core\vapplication.cpp:371:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ Makefile:10033: recipe for target 'obj/vapplication.o' failed mingw32-make[3]: [obj/vapplication.o] Error 1 mingw32-make[3]: Leaving directory 'C:/Users/Susan/src/build-Valentina-Desktop_Qt_5_4_1_MinGW_32bit-Release/src/app/valentina' Makefile:39: recipe for target 'sub-valentina-make_first' failed mingw32-make[2]: [sub-valentina-make_first] Error 2 mingw32-make[2]: Leaving directory 'C:/Users/Susan/src/build-Valentina-Desktop_Qt_5_4_1_MinGW_32bit-Release/src/app' Makefile:65: recipe for target 'sub-app-make_first' failed mingw32-make[1]: [sub-app-make_first] Error 2 mingw32-make[1]: Leaving directory 'C:/Users/Susan/src/build-Valentina-Desktop_Qt_5_4_1_MinGW_32bit-Release/src' makefile:38: recipe for target 'sub-src-make_first' failed mingw32-make: [sub-src-make_first] Error 2 15:37:33: The process "C:\Qt5.4\Tools\mingw491_32\bin\mingw32-make.exe" exited with code 2. Error while building/deploying project Valentina (kit: Desktop Qt 5.4.1 MinGW 32bit) When executing step "Make" 15:37:33: Elapsed time: 00:54.
-
Account Deleted does not seems like my addition :/ no changes in that part by me
-
repo owner - changed status to closed
Looks like work for now.
- Log in to comment
As an example, here are Inkscape's command line options. Some of this may be applicable for exporting patterns.
Usage: inkscape [OPTIONS...] [FILE...]
Available options: