Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/whosonfirst/java-dropwizard-squeegee
squeegee is a simple Dropwizard-based HTTP pony to convert SVG documents in to PNG files using the Batik SVG transcoder.
https://github.com/whosonfirst/java-dropwizard-squeegee
batik dropwizard java svg
Last synced: about 2 months ago
JSON representation
squeegee is a simple Dropwizard-based HTTP pony to convert SVG documents in to PNG files using the Batik SVG transcoder.
- Host: GitHub
- URL: https://github.com/whosonfirst/java-dropwizard-squeegee
- Owner: whosonfirst
- Created: 2016-08-21T21:16:06.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-02-16T06:59:04.000Z (almost 3 years ago)
- Last Synced: 2024-04-17T19:20:19.301Z (9 months ago)
- Topics: batik, dropwizard, java, svg
- Language: Java
- Homepage:
- Size: 42 KB
- Stars: 0
- Watchers: 9
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# java-dropwizard-squeegee
`squeegee` is a simple [Dropwizard-based](http://www.dropwizard.io/) HTTP pony to convert SVG documents in to PNG files using the [Batik](https://xmlgraphics.apache.org/batik) SVG transcoder.
## How to start the squeegee application
1. Run `mvn clean install` to build your application
1. Start application with `java -jar target/squeegee-0.1.jar server config.yml`
1. To check that your application is running enter url `http://localhost:8080`## Usage
Given a file like [this](examples/circles.svg):
```
```
You would invoke `squeegee` like this:
```
curl -s -v -X POST -F [email protected] http://localhost:8080
```Which would produce [this](examples/circles.png):
![circles](examples/circles.png)
## Docker
[Yes](Dockerfile). For example:
```
docker build -t squeegee .
docker run -it -p 6161:8080 squeegee
curl -s -v -X POST -F [email protected] http://localhost:6161 > circles.png
```## Caveats
* This does not have a (Dropwizard) health check yet. [It should](https://github.com/whosonfirst/java-dropwizard-squeegee/issues/1).
## Things that `squeegee` can't do yet
* User-defined image dimensions - or more specifically, it doesn't resize images particularly well yet; you can pass a `height` and `width` parameter with your request and see for yourself but you should be aware _this functionality might still be removed_
* User-defined (CSS) stylesheets
* That other thing you're wondering about that I haven't thought of yet## See also
* https://xmlgraphics.apache.org/batik/using/transcoder.html
* http://www.dropwizard.io/1.0.0/docs/index.html