Skip to content

Commit cf2248c

Browse files
committed
add docker badge
1 parent 8cb107a commit cf2248c

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

README.rst

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ pydf
22
====
33

44

5-
|BuildStatus| |codecov| |PyPI| |license|
5+
|BuildStatus| |codecov| |PyPI| |license| |docker|
66

77
PDF generation in python using
88
`wkhtmltopdf <http://wkhtmltopdf.org/>`__.
@@ -15,7 +15,7 @@ Currently using **wkhtmltopdf 0.12.4 (with patched qt)**, requires **Python 3.6+
1515
Install
1616
-------
1717

18-
::
18+
.. code:: shell
1919
2020
pip install python-pdf
2121
@@ -67,20 +67,20 @@ Docker
6767

6868
pydf is available as a docker image with a very simple http API for generating pdfs.
6969

70-
Simple `POST` (or `GET` with data if possible) you HTML data to `/generate.pdf`.
70+
Simple ``POST`` (or ``GET`` with data if possible) you HTML data to ``/generate.pdf``.
7171

72-
Extra arguments can be passed using http headers; any header starting "pdf-" will
72+
Arguments can be passed using http headers; any header starting ``pdf-`` will
7373
have that prefix removed, be converted to lower case and passed to wkhtmltopdf.
7474

7575
For example:
7676

7777
.. code:: shell
7878
7979
docker run -rm -p 8000:80 -d samuelcolvin/pydf
80-
curl -d '<h1>this is html</h1>' http://localhost:8000/generate.pdf > created.pdf
80+
curl -d '<h1>this is html</h1>' -H "pdf-orientation: landscape" http://localhost:8000/generate.pdf > created.pdf
8181
open "created.pdf"
8282
83-
or in your ``docker-compose.yml`` file
83+
In docker compose:
8484

8585
.. code:: yaml
8686
@@ -156,3 +156,5 @@ wkhtmltopdf binary and passed to subprocess with not processing.
156156
:target: https://pypi.python.org/pypi/python-pdf
157157
.. |license| image:: https://img.shields.io/pypi/l/python-pdf.svg
158158
:target: https://github.com/tutorcruncher/pydf
159+
.. |docker| image:: https://img.shields.io/docker/automated/samuelcolvin/pydf.svg
160+
:target: https://hub.docker.com/r/samuelcolvin/pydf/

pydf/wkhtmltopdf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import asyncio
22
import subprocess
33
import tempfile
4-
54
from pathlib import Path
65

76
from .version import VERSION

tests/test_async.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import asyncio
22

33
import pytest
4+
45
from pydf import AsyncPydf
6+
57
from .utils import pdf_text
68

79

tests/test_sync.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import pytest
22

33
from pydf import generate_pdf, get_extended_help, get_help, get_version
4+
45
from .utils import pdf_text
56

67

0 commit comments

Comments
 (0)