1.0.16 • Published 3 years ago
@unitywear/designs v1.0.16
Logo Template Project
Table of contents
Inkscape commands
Actions
Most verbs/actions need a gui
-g, --with-gui
Closing the gui
Use --batch-process
to close the gui. Needed if command is only actions
Getting dimension info
inkscape --query-height --query-id=city ./images/replace-temp.svg
Setting width and height relative to other objects
inkscape --actions="select-by-id:city;EditCopy;unselect-by-id:city;select-by-id:block;EditPasteWidth;FileSave;FileClose" --batch-process ./images/negative-mask-temp.svg
Aligning objects
object-align: Align selected objects; usage: [[left|hcenter|right] || [top|vcenter|bottom]] [last|first|biggest|smallest|page|drawing|selection]? group? anchor?
Example:
inkscape --actions="select-by-id:block;select-by-id:team;object-align:hcenter vcenter first;FileSave;FileClose" --batch-process ./images/alignment-temp.svg
Paths
Difference
inkscape --actions="select-by-id:block;select-by-id:team;SelectionDiff;FileSave;FileClose" --batch-process ./images/subtract.svg
Exporting with actions
inkscape --actions="export-plain-svg;export-filename:output.svg;export-do;" --batch-process ./images/alignment.svg
Text
Text Content
sed "s/WATERLOO/city name/g" simple-text.svg > out.svg
Changing Colors
Base Colors
First remove all the fill
sed "s/fill//g" simple-text.svg > out.svg
sed '/<\/svg>/ i <style>*{fill:blue}</style>' simple-text.svg > out.svg
Inserting Other SVGs
Attach and id for manipulation
Use select-all;unselect-by-id
is more reliable
Insert before pattern
sed "$/<\/svg>/e cat ./nike.svg\n" replace-temp.svg > test.svg
Exporting
Text to paths
--export-text-to-path
Design Scripts
id's
Each design script requires an id. These should be unique as intermediate files will need them (to preven overwriting the wrong file at the wronge time)
This will always be the first argument of each design script
Simple-text
sh ./scripts/simple-text.sh <CITY> <TEAM> <CITYCOLOR> <TEAMCOLOR> <OUTPUTNAME>.svg
HTML to SVG Solution
Usage
java -jar webvector-<version>.jar <url> <output_file> <format>
- is the URL of the page to convert, e.g. http://www.sf.net/ for a website or file://C:/myfile.html for a local file.
- <output_file> is the file name where the result will be stored, e.g. myoutput.svg.
- is pdf, svg or png.