• Stars
    star
    405
  • Rank 106,656 (Top 3 %)
  • Language
    Python
  • Created about 14 years ago
  • Updated about 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Automatically generate AirPrint Avahi service files for CUPS printers

airprint-generate.py

This script will generate avahi .service files for shared CUPS printers.

This script will connect to a CUPS server and for each printer configured and marked as shared will generate a .service file for avahi that is compatible with Apple's AirPrint announcements. Any printer that can be configured to work with CUPS can be used. Printers should not be configured in CUPS as raw, unless the printer can natively print PDF. That is to say, CUPS needs to already be configured with a PDF filter. Debian based distributions ship CUPS pre-configured this way.

DNSSD has a limit of 255 Chars for a given txt-record, because of this the list of accepted pdl's will be truncated to fit. If you're curious to see which ones are trimmed out of the list run with the script with the verbose flag (--verbose)

If python-lxml is installed, .service files will be generated in a human readble format, I wasn't able to get minidom's version to work acceptably.

Usage: airprint-generate.py [options]

Options: -h, --help show this help message and exit -H HOSTNAME, --host=HOSTNAME Hostname of CUPS server (optional) -P PORT, --port=PORT Port number of CUPS server -u USER, --user=USER Username to authenticate with against CUPS -d DIRECTORY, --directory=DIRECTORY Directory to create service files -v, --verbose Print debugging information to STDERR -p PREFIX, --prefix=PREFIX Prefix all files with this string

Docker containerized avahi .service generation

After the printers have been configured in the cups server, docker can interactively generate the avahi .service while making use of the container.

  • Build the container
docker build -t airprint-generate .
  • Generate the avahi service by defining the ip address of the cups server
docker run --rm -it -v $(pwd):/tmp airprint-generate -H ${CUPS_SERVER_IP} -d /tmp

More Repositories

1

node-dns

Replacement dns module in pure javascript for node.js
JavaScript
585
star
2

linode-python

Linode API Python Bindings
Python
163
star
3

node-ffi-generate

Generate ffi bindings from header files
JavaScript
131
star
4

node-vlc

Node.js bindings for vlc
JavaScript
75
star
5

lldb-v8

v8 utility scripts for lldb
Python
73
star
6

native-dns-packet

DNS parsing and writing in javascript
JavaScript
58
star
7

node-libclang

nodejs bindings for libclang
JavaScript
52
star
8

node-addon-layer

A thin C API to create node binary addons with, inspired by JSAPI
C++
38
star
9

javascript-rrd

Pure javascript RRD file manipulation implementation. Fork of the original project for use with node.js
JavaScript
35
star
10

node-imagick

Native bindings to ImageMagick
C
21
star
11

node-buffercursor

A simple way to traverse a nodejs Buffer while keeping track of position
JavaScript
20
star
12

dnsbalance

Generic DNS server to dynamically distribute requests
JavaScript
17
star
13

native-dns-cache

Node.js DNS Caching
JavaScript
15
star
14

node-purple

nodejs libpurple ffi bindings
JavaScript
15
star
15

node-binaryheap

Basic binary heap tree implementation for node.js using linked lists
JavaScript
13
star
16

node-setflags

Set v8 flags at runtime
JavaScript
10
star
17

git-dht

Git Decentralized and Distributed
JavaScript
9
star
18

llmdb

mdb for lldb -- modular shell pipelines for debugging
Python
9
star
19

node-lstream

Small linestream transform
JavaScript
9
star
20

node-ircws

simple irc websocket proxy with webirc support
JavaScript
8
star
21

zpyzpr

Zippy Zipper -- Generic Python Multi-Threaded Compression Frontend
Python
6
star
22

irssi_proxy_websocket

irssi proxy module with a websocket listener
JavaScript
6
star
23

node-path-platform

Transitionary package for those not yet on v0.12 of Node.js
JavaScript
4
star
24

node-libgit2

libgit2 wrapping for node
JavaScript
4
star
25

vm_profile_guest

Profile Arbitrary VM Guests with DTrace in KVM or Hypervisor.framework
Python
4
star
26

jrq

C
4
star
27

node-struct

Implementation of Python's struct module in javascript with Buffers
JavaScript
4
star
28

linode-javascript

Linode API Javascript Bindings
JavaScript
3
star
29

node-addon-layer-test

A small module to test the addon-layer
C
3
star
30

mlang

Write Jobs for Joyent Manta in Node.js
JavaScript
3
star
31

nimbusmeus

Node.js Personal Media Streamer
JavaScript
3
star
32

node-nf

Node Filter -- use node for one liners like you would with perl
JavaScript
3
star
33

node-trace-func

trace arbitrary javascript function
JavaScript
3
star
34

linode-chrome

Linode Chrome extension that supports multiple API keys
3
star
35

multi-stage-linuxkit

LinuxKit in pieces, stage 1 kernel+initrd, stage 2 squshfs "from somewhere"
Makefile
3
star
36

chrome-nodeci

Chrome Extension for Node.js CI integration
JavaScript
2
star
37

podspec2linuxkit

Create immutable machine images from Kubernetes Manifests
Go
2
star
38

web220

Web browser based virtual terminal client
C++
2
star
39

ref-strict

Strict typing for node-ffi and ref
JavaScript
2
star
40

round-up-storage-claim

Mutating Webhook Example to Round Up PersistentVolumeClaims
JavaScript
1
star
41

twuuenc

Twitter UUENCODE
Python
1
star
42

node-gcore

A module to induce core files from inside a node process
C++
1
star
43

node-httptop

A small wrapper around DTrace to see popular routes and their latencies
JavaScript
1
star
44

immich-client-swift

Swift
1
star