debian/0000775000000000000000000000000011615777310007200 5ustar debian/docs0000664000000000000000000000001311576445114010045 0ustar README.rst debian/copyright0000664000000000000000000000220411615643317011130 0ustar Format: http://dep.debian.net/deps/dep5 Upstream-Name: cloudprint Source: Files: * Copyright: 2011 Jason Michalski License: GPL-3.0+ Files: debian/* Copyright: 2011 Jack Deslippe 2011 Till Kamppeter 2011 Matt Domsch License: GPL-3.0+ License: GPL-3.0+ This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. . This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program. If not, see . . On Debian systems, the complete text of the GNU General Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". debian/patches/0000775000000000000000000000000011615643330010621 5ustar debian/patches/series0000664000000000000000000000006211610013533012023 0ustar use-python-daemon do-not-crash-on-network-failure debian/patches/do-not-crash-on-network-failure0000664000000000000000000000143011615642575016600 0ustar Description: Keep cloudprint running when the network connection gets interrupted Author: Jack Deslippe Bug: https://github.com/armooo/cloudprint/issues/15 --- a/cloudprint/cloudprint.py +++ b/cloudprint/cloudprint.py @@ -319,9 +319,12 @@ def process_jobs(cups_connection, cpp, printers): while True: - for printer in printers: - for job in printer.get_jobs(): - process_job(cups_connection, cpp, printer, job) + try: + for printer in printers: + for job in printer.get_jobs(): + process_job(cups_connection, cpp, printer, job) + except: + print "ERROR: Couldn't Connect to Cloud Service. Will Try again in 60 Seconds"; time.sleep(60) def usage(): debian/patches/use-python-daemon0000664000000000000000000000344711615643167014140 0ustar Description: Use python-daemon for daemonizing cloudprint and not the obsolete daemon module Author: Matt Domsch Bug: https://github.com/armooo/cloudprint/issues/12 --- a/cloudprint/cloudprint.py +++ b/cloudprint/cloudprint.py @@ -235,6 +235,20 @@ def delete(self): return self.cpp.delete_printer(self.id) +class App(object): + def __init__(self, cups_connection=None, cpp=None, printers=None, pidfile_path=None): + self.cups_connection = cups_connection + self.cpp = cpp + self.printers = printers + self.pidfile_path = pidfile_path + self.stdin_path = '/dev/null' + self.stdout_path = '/dev/tty' + self.stderr_path = '/dev/tty' + self.pidfile_timeout = 5 + + def run(self): + process_jobs(self.cups_connection, self.cpp, self.printers) + def sync_printers(cups_connection, cpp): local_printer_names = set(cups_connection.getPrinters().keys()) @@ -362,15 +376,20 @@ if daemon: try: - import daemon + from daemon import runner except ImportError: print 'daemon module required for -d' - print '\tpip install daemon' + print '\tyum install python-daemon, or apt-get install python-daemon, or pip install python-daemon' sys.exit(1) - daemon.daemonize(pidfile) - - process_jobs(cups_connection, cpp, printers) - + + app = App(cups_connection=cups_connection, + cpp=cpp, printers=printers, + pidfile_path=os.path.abspath(pidfile)) + sys.argv=[sys.argv[0], 'start'] + daemon_runner = runner.DaemonRunner(app) + daemon_runner.do_action() + else: + process_jobs(cups_connection, cpp, printers) if __name__ == '__main__': main() debian/cloudprint.10000664000000000000000000000131111615767304011443 0ustar .TH CLOUDPRINT "1" "August 2011" "Ubuntu" "User Commands" .SH NAME cloudprint \- Makes the local printers available under Google Cloud Print .SH SYNOPSIS .B cloudprint [\fIoptions\fR] .SH OPTIONS .TP \fB\-h\fR command line help .TP \fB\-d\fR enable daemon mode .TP \fB\-l\fR log out from the Google account .TP \fB\-p\fR \fIPIDFILE\fR file to write the pid to (default cloudprint.pid) .SH AUTHOR This manpage has been written by Till Kamppeter based on the "cloudprint -h" output. .SH COPYRIGHT Copyright \(co 2011 Jason Michalski. .br This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. debian/cloudprint.manpages0000664000000000000000000000002411615777224013100 0ustar debian/cloudprint.1 debian/pyversions0000664000000000000000000000000511610002265011320 0ustar 2.6- debian/watch0000664000000000000000000000031711615641313010223 0ustar # There are no source tarball releases. The .orig.tar.gz upstream source # tarball is a GIT snapshot downloaded via # "git clone git://github.com/armooo/cloudprint.git". # the .git subdirectory got removed. debian/source/0000775000000000000000000000000011576445114010500 5ustar debian/source/format0000664000000000000000000000001411576445114011706 0ustar 3.0 (quilt) debian/control0000664000000000000000000000367311615763630010614 0ustar Source: cloudprint Section: net Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Jack Deslippe Build-Depends: cdbs, debhelper (>= 7), python (>= 2.6), python-support, python-setuptools X-Python-Version: >= 2.6 Standards-Version: 3.8.3 Homepage: https://github.com/armooo/cloudprint Package: cloudprint Architecture: all Depends: ${misc:Depends}, ${python:Depends}, python-cups, python-daemon Description: Server for Google Cloud Print This program shares the locally available CUPS printers to the Google Cloud Print service (http://www.google.com/cloudprint). This allows printing on your local printers from whereever you can send jobs to the Google Clou Print service, especially from mobile devices, like smartphones, tablets, and computers running Google Chrome OS. . Google itself only offers to either use HP ePrint printers (network printers which can receive print jobs by e-mail) or to use the Chromium browser as server to share the local printers to Cloud Print. The latter is officially only supported under Windows and Mac OS X, but under Linux it can be enabled through a secret "Cheat Mode", entering the URL "about:Flags" and enabling the “Cloud Print Proxy” entry, then clicking the wrench at the upper right and selecting "Preferences" -> "Under The Hood" and there will be a "Google Cloud Print" section near the end of the list. . So these methods are awkward, running a full-featured browser only to make available ones printers or to have to use a printer out of small choice of models. . This package provides a simple lightweight command line tool, which one simply starts (as a normal user) and after logging into the Google accounts it submits the info about the locally available printers and polls the jobs from Google once a minute. . Run "cloudprint -h" and read /usr/share/doc/cloudprint/README.rst to see how to use the program. debian/rules0000775000000000000000000000031111615776466010266 0ustar #!/usr/bin/make -f DEB_PYTHON_SYSTEM=pysupport include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/python-distutils.mk # Add here any variable or target overrides you need. debian/changelog0000664000000000000000000000254511615777301011060 0ustar cloudprint (0.5-0ubuntu1) oneiric; urgency=low * Initial release based on a PPA package from Jack Deslippe (jdeslip at gmail dot com), with the following changes: * Upstream source: Use GIT snapshot, rev 620e490f1a1, tate of May 12, 2011 * debian/control: Replaced obsolete "XS-Python-Version: >= 2.6" by "X-Python-Version: >= 2.6". * debian/control: Added explicit dependencies on python-cups and python-daemon * debian/control: Set Section to "net". * debian/control: Set Maintainer/XSBC-Original-Maintainer. * debian/control: Added description. * debian/pyversions: Added up-to-date way to mark the minimum Python version needed. * debian/patches/use-python-daemon: Use python-daemon for daemonizing cloudprint and not the obsolete daemon module. * debian/patches/do-not-crash-on-network-failure: Do not crash if the network connection fails. Simply keep running so that work gets done as soon as the network comes back. * debian/copyright: Corrected the entries, removed garbage at the end. * debian/README.source: Removed, it did not contain any information. * debian/watch: Added watch file, but only telling in comments that the source tarball is a GIT snapshot. * debian/cloudprint.1, debian/cloudprint.manpages: Added simple man page. -- Till Kamppeter Tue, 9 Aug 2011 02:21:11 +0200 debian/compat0000664000000000000000000000000211576445114010376 0ustar 7