From eb3ec848c962d744ffc805efa3c4499ad1af4df7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Radek=20Hu=C5=A1ek?= <husek@iuuk.mff.cuni.cz>
Date: Sun, 6 Aug 2017 14:11:16 +0200
Subject: [PATCH] Readme

---
 README.md | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 README.md

diff --git a/README.md b/README.md
new file mode 100644
index 0000000..b24b7a3
--- /dev/null
+++ b/README.md
@@ -0,0 +1,38 @@
+CUPS pdf postprocess
+====================
+
+This is a simple utility acting as postprocesor of cups-pdf virtual printer.
+
+Requirements
+------------
+
+- Python 3 (should be trivial to modify for Python 2)
+
+- PyQt5
+
+
+Setup
+-----
+
+This script can be use either directly (e.g. via context menu) or through cups-pdf.
+
+First copy file `cups-pdf-postprocess.sh` and edit it for your needs. When invoked by
+cups, the script does not have any knowledge about running X, so you have to
+set atleast `DISPLAY` (and probaly also `XAUTHORITY`) variable. Also you can specify
+list of your custom printer in here-document at end of file.
+
+Syntax is `("name of printer", ["command", "first argument"]),` (it will be
+interpreted as part of Python list literal). There will be appended aditional
+`lp`-like parameters when acually executing command.
+
+To use it through cups, install pdf-cups, setup a new virtual printer and
+then modify `/etc/cups/cups-pdf.conf`:
+```
+PostProcessing /path/to/cups-pdf-postprocess-your-wrapper.sh
+```
+
+To add the script into context menu soft-link cups-pdf-postprocess-your-wrapper.desktop
+into appropriate place for your desktop enviroment (in case of KDE4 this is
+`~/.kde4/share/kde4/services/ServiceMenus`). You may need to copy it and fix path
+to shell wrapper.
+
-- 
GitLab