aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2019-08-06 12:21:19 -0400
committerRob Austein <sra@hactrn.net>2019-08-06 12:21:19 -0400
commite7b43fa419ded4170f2cf3f12cc4765753d4c298 (patch)
tree62da2c7a6b62478bcbc962f7536a972381ea9a98 /README.md
Initial public version.
Diffstat (limited to 'README.md')
-rw-r--r--README.md56
1 files changed, 56 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..028229e
--- /dev/null
+++ b/README.md
@@ -0,0 +1,56 @@
+printer-browser.py
+==================
+
+Small program to browse the local network for printers via
+Apple-flavored mDNS (Bonjour), massage the data slightly, and write
+it out in DNS master file format.
+
+Changes made to the data:
+
+* We strip off the `.local.` suffix, because we want to append the
+ local zone `$ORIGIN` when we drop this text into a master file.
+
+* We remove the adminurl property, because we don't generally want our
+ users trying to reconfigure our printers anyway.
+
+The target audience for this is the IETF meeting network, but this
+might conceivably be useful whenever trying to make AirPrint work
+across multiple network segments.
+
+Most of the work is done by two external packages: `zeroconf` and
+`dnspython`. Both of these are available from PyPi, as well as from
+various OS-specific packaging systems.
+
+In theory this code is Python-version-agnostic, and should run under
+either Python 2 or Python 3.
+
+Current usage as of this writing (run with `--help` for latest):
+
+```
+usage: printer_browser.py [-h] [-q] [-o OUTPUT]
+ [--browse-timeout BROWSE_TIMEOUT]
+ [--query-timeout QUERY_TIMEOUT] [--keep-adminurl]
+ [mdns_type [mdns_type ...]]
+
+Browse for printers on the local net, dump DNS records for inclusion in a DNS
+zone in master file format.
+
+positional arguments:
+ mdns_type mDNS types for which to browse (default:
+ ['_ipp._tcp.local.', '_pdl-datastream._tcp.local.'])
+
+optional arguments:
+ -h, --help show this help message and exit
+ -q, --quiet omit comments from generated master file text
+ (default: False)
+ -o OUTPUT, --output OUTPUT
+ where to write master file text (default: -)
+ --browse-timeout BROWSE_TIMEOUT
+ timeout in seconds while browsing for printers
+ (default: 5)
+ --query-timeout QUERY_TIMEOUT
+ timeout in seconds to retrieve printer data (default:
+ 3)
+ --keep-adminurl keep adminurl property in generated DNS data (default:
+ False)
+```