Skip to content

Commit

Permalink
improve readme
Browse files Browse the repository at this point in the history
  • Loading branch information
sbidoul committed Mar 22, 2019
1 parent c0d49f4 commit 0d0a760
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# kwkhtmltopdf

A [wkhtmlpdf](https://wkhtmltopdf.org) server with drop-in client.

Why?
Expand All @@ -7,22 +9,22 @@ Why?
memory hungry wkhtmltopdf jobs to dedicated pods
- easily select the wkhtmltopdf version to use at runtime

# WARNING
## WARNING

The server is not meant to be exposed to untrusted clients.

Several attack vectors exist (local file access being the most obvious).
Mitigating them is not a priority, since the main use case is
to use it as a private service.

# kwkhtmltopdf_server
## kwkhtmltopdf_server

A web server accepting [wkhtmlpdf](https://wkhtmltopdf.org) options and files
to convert as multipart form data.

It is written in go.

# kwkhtmltopdf_client
## kwkhtmltopdf_client

A drop-in replacement for [wkhtmlpdf](https://wkhtmltopdf.org) which invokes
the above server defined in the `KWKHTMLTOPDF_SERVER_URL` environment variable.
Expand All @@ -33,9 +35,9 @@ There are two clients:
* a python client, which only depends on the `requests` library.
It should work with any python version supported by `requests`.

# Quick start
## Quick start

## Run the server
### Run the server

```
$ docker run --rm -p 8080:8080 acsone/kwhkhtmltopdf
Expand All @@ -49,7 +51,7 @@ $ go run server/kwkhtmltopdf_server.go

The server should now listen on http://localhost:8080.

## Run the client
### Run the client

```
$ go build -o client/go/kwkhtmltopdf_client client/go/kwkhtmltopdf_client.go
Expand All @@ -66,7 +68,7 @@ $ env KWKHTMLTOPDF_SERVER_URL=http://localhost:8080 \

This should generate a printout of the wkhtmltopdf home page to /tmp/test.pdf.

# Run tests
## Run tests

1. Start the server.
2. Set and export `KWKHTMLTOPDF_SERVER_URL` environment variable.
Expand All @@ -75,12 +77,12 @@ This should generate a printout of the wkhtmltopdf home page to /tmp/test.pdf.
This will run the same tests against the the native wkhtmltopdf executable,
as well as against the server using the python and go clients.

# Roadmap
## Roadmap

See [issues on GitHub](<https://github.com/acsone/kwkhtmltopdf/issues>)
as well as some TODO's in the source code.

# Releasing
## Releasing

Push the master branch and ensure tests pass on travis.

Expand All @@ -90,14 +92,14 @@ Travis will create a GitHub release with the client and server binaries.

[Docker Hub](https://cloud.docker.com/u/acsone/repository/docker/acsone/kwkhtmltopdf) will build the images.

# Credits
## Credits

Author: stephane.bidoul@acsone.eu.

Contributors:

* Nils Hamerlinck

# License
## License

MIT

0 comments on commit 0d0a760

Please sign in to comment.