# @unitywear/designs

> - [Logo Template Project](#logo-template-project) - [Table of contents](#table-of-contents) - [Inkscape commands](#inkscape-commands) - [Actions](#actions) - [Most verbs/actions need a gui](#most-verbsactions-need-a-gui) - [Closin

Latest version **1.0.16** (published 2021-09-03) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @unitywear/designs
pnpm add @unitywear/designs
yarn add @unitywear/designs
bun add @unitywear/designs
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.16 |
| Published | 2021-09-03 |
| First published | 2021-08-24 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 110.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | bltech |

## Links

- npm: https://www.npmjs.com/package/@unitywear/designs
- npm.io page: https://npm.io/package/@unitywear/designs

## Dependencies (5)

- [uid](https://npm.io/package/uid.md) ^2.0.0
- [jsdom](https://npm.io/package/jsdom.md) ^17.0.0
- [chokidar](https://npm.io/package/chokidar.md) ^3.5.2
- [inkscape](https://npm.io/package/inkscape.md) ^3.1.1
- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.1

## Recent versions

- 1.0.16 (latest) — 2021-09-03
- 1.0.15 — 2021-09-03
- 1.0.14 — 2021-09-03
- 1.0.13 — 2021-09-03
- 1.0.12 — 2021-08-29
- 1.0.11 — 2021-08-29
- 1.0.10 — 2021-08-28
- 1.0.9 — 2021-08-28
- 1.0.8 — 2021-08-28
- 1.0.7 — 2021-08-27
- 1.0.6 — 2021-08-27
- 1.0.5 — 2021-08-27
- 1.0.4 — 2021-08-27
- 1.0.3 — 2021-08-27
- 1.0.2 — 2021-08-27
- … 2 more at https://npm.io/package/@unitywear/designs/versions

## README

# Logo Template Project

## Table of contents
- [Logo Template Project](#logo-template-project)
  - [Table of contents](#table-of-contents)
  - [Inkscape commands](#inkscape-commands)
    - [Actions](#actions)
      - [Most verbs/actions need a gui](#most-verbsactions-need-a-gui)
      - [Closing the gui](#closing-the-gui)
    - [Getting dimension info](#getting-dimension-info)
      - [Setting width and height relative to other objects](#setting-width-and-height-relative-to-other-objects)
      - [Aligning objects](#aligning-objects)
      - [Paths](#paths)
        - [Difference](#difference)
      - [Exporting with actions](#exporting-with-actions)
    - [Text](#text)
      - [Text Content](#text-content)
    - [Changing Colors](#changing-colors)
      - [Base Colors](#base-colors)
    - [Inserting Other SVGs](#inserting-other-svgs)
      - [Attach and id for manipulation](#attach-and-id-for-manipulation)
      - [Insert before pattern](#insert-before-pattern)
    - [Exporting](#exporting)
      - [Text to paths](#text-to-paths)
  - [Design Scripts](#design-scripts)
    - [id's](#ids)
    - [Simple-text](#simple-text)
  - [HTML to SVG Solution](#html-to-svg-solution)
    - [Usage](#usage)
  
## Inkscape commands
[Documentation](https://inkscape.org/doc/inkscape-man.html)
### 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
```bash
inkscape --query-height --query-id=city ./images/replace-temp.svg
```
#### Setting width and height relative to other objects
```bash
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
```bash
object-align: Align selected objects; usage: [[left|hcenter|right] || [top|vcenter|bottom]] [last|first|biggest|smallest|page|drawing|selection]? group? anchor?
```
Example:
```bash
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
```bash
inkscape --actions="select-by-id:block;select-by-id:team;SelectionDiff;FileSave;FileClose" --batch-process ./images/subtract.svg
```
#### Exporting with actions
```bash
inkscape --actions="export-plain-svg;export-filename:output.svg;export-do;" --batch-process ./images/alignment.svg
```
### Text
#### Text Content
```bash
sed "s/WATERLOO/city name/g" simple-text.svg > out.svg
```
### Changing Colors
#### Base Colors
First remove all the fill
```bash
sed "s/fill//g" simple-text.svg > out.svg
```
```bash
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
```bash
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
```bash
sh ./scripts/simple-text.sh <CITY> <TEAM> <CITYCOLOR> <TEAMCOLOR> <OUTPUTNAME>.svg
```

## HTML to SVG Solution
[WebVector converter](http://cssbox.sourceforge.net/webvector/)
### Usage
```bash
java -jar webvector-<version>.jar <url> <output_file> <format>
```
- <url> 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.
- <format> is pdf, svg or png.

---
_Source: https://npm.io/package/@unitywear/designs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
