Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/drwpow/batch-svg
Take a folder of raster images (JPG, PNG, GIF), and batch them into one SVG file
https://github.com/drwpow/batch-svg
Last synced: 9 days ago
JSON representation
Take a folder of raster images (JPG, PNG, GIF), and batch them into one SVG file
- Host: GitHub
- URL: https://github.com/drwpow/batch-svg
- Owner: drwpow
- Created: 2017-04-12T17:03:38.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2022-04-22T04:23:43.000Z (over 2 years ago)
- Last Synced: 2024-10-15T00:31:10.276Z (2 months ago)
- Language: JavaScript
- Homepage:
- Size: 21.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Batch SVG
This uses node to take a folder of images (`./src`), and exports them to
`./dist/layout.svg`.## Setup
[Node.js](https://nodejs.org/en/) is required. If you’re on Mac, install
[Homebrew](https://brew.sh/) and then run `brew install node` from a Terminal.Navigate to this directory:
```
cd ~/sites/batch-svg
```
…or wherever you have it. Then run:```
npm i
```_Note: you can use [`yarn`](https://yarnpkg.com/en/) if you prefer._
## Usage
First, place images in the `./src` folder (can be JPG, GIF, or PNG). Then,
run:```
npm run layout
```and it will crunch all the images and spit out a `./dist/layout.svg` file.
**Warning: this will overwrite the previous `layout.svg` file.** Be sure to
copy this file elsewhere if you need it for whatever reason._Note: this embeds all the images in the SVG file, resulting in pretty hefty
filesizes. This seemed preferrable to simply linking to images, which are
fragile and break easily._