tjfontaine / airprint-generate

Automatically generate AirPrint Avahi service files for CUPS printers
http://www.atxconsulting.com/blog/tjfontaine/2010/11/21/automatically-generate-airprint-avahi-service-files-cups-printers
400 stars 119 forks source link

Does not generate file, but also does not report error or verbose output. #35

Closed azagramac closed 2 years ago

azagramac commented 2 years ago

Running the script python3 airprint-generate.py -H {CUPS_SERVER_IP} -P {PORT} -d /home/myUser/ -v or from the docker container... does not generate the service file. docker run --rm -it -v /home/myUser/:/tmp airprint:1.0 -H {CUPS_SERVER_IP} -d /tmp

but it doesn't report any error passing the -v or --verbose as parameter either

packages installed

# apt install libcups2-dev python3-dev python3-libxml2 gcc python3
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libcups2-dev is already the newest version (2.3.3op2-3+deb11u1).
gcc is already the newest version (4:10.2.1-1).
gcc set to manually installed.
python3 is already the newest version (3.9.2-3).
python3-dev is already the newest version (3.9.2-3).
The following NEW packages will be installed:
  python3-libxml2
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 194 kB of archives.
After this operation, 915 kB of additional disk space will be used.
Do you want to continue? [Y/n] y

python3

# python3 --version
Python 3.9.2

avahi

# dpkg -l | grep avahi
ii  avahi-daemon                    0.8-5                          arm64        Avahi mDNS/DNS-SD daemon
ii  avahi-utils                     0.8-5                          arm64        Avahi browsing, publishing and discovery utilities
ii  libavahi-client3:arm64          0.8-5                          arm64        Avahi client library
ii  libavahi-common-data:arm64      0.8-5                          arm64        Avahi common data files
ii  libavahi-common3:arm64          0.8-5                          arm64        Avahi common library
ii  libavahi-core7:arm64            0.8-5                          arm64        Avahi's embeddable mDNS/DNS-SD library
ii  libavahi-glib1:arm64            0.8-5                          arm64        Avahi GLib integration library

Cups

# dpkg -l | grep cups
ii  cups                            2.3.3op2-3+deb11u1             arm64        Common UNIX Printing System(tm) - PPD/driver support, web interface
ii  cups-backend-bjnp               2.0.3-1                        arm64        printer backend for Canon BJNP protocol
ii  cups-browsed                    1.28.7-1+deb11u1               arm64        OpenPrinting CUPS Filters - cups-browsed
ii  cups-bsd                        2.3.3op2-3+deb11u1             arm64        Common UNIX Printing System(tm) - BSD commands
ii  cups-client                     2.3.3op2-3+deb11u1             arm64        Common UNIX Printing System(tm) - client programs (SysV)
ii  cups-common                     2.3.3op2-3+deb11u1             all          Common UNIX Printing System(tm) - common files
ii  cups-core-drivers               2.3.3op2-3+deb11u1             arm64        Common UNIX Printing System(tm) - driverless printing
ii  cups-daemon                     2.3.3op2-3+deb11u1             arm64        Common UNIX Printing System(tm) - daemon
ii  cups-filters                    1.28.7-1+deb11u1               arm64        OpenPrinting CUPS Filters - Main Package
ii  cups-filters-core-drivers       1.28.7-1+deb11u1               arm64        OpenPrinting CUPS Filters - Driverless printing
ii  cups-ipp-utils                  2.3.3op2-3+deb11u1             arm64        Common UNIX Printing System(tm) - IPP developer/admin utilities
ii  cups-pk-helper                  0.2.6-1+b1                     arm64        PolicyKit helper to configure cups with fine-grained privileges
ii  cups-ppdc                       2.3.3op2-3+deb11u1             arm64        Common UNIX Printing System(tm) - PPD manipulation utilities
ii  cups-server-common              2.3.3op2-3+deb11u1             all          Common UNIX Printing System(tm) - server common files
ii  cups-tea4cups                   3.14~alpha0+svn3576-2          all          Swiss Army's knife of advanced CUPS administrators
ii  cups-x2go                       3.0.1.4-1                      all          Virtual X2Go printer for CUPS
ii  libcups2:arm64                  2.3.3op2-3+deb11u1             arm64        Common UNIX Printing System(tm) - Core library
ii  libcups2-dev:arm64              2.3.3op2-3+deb11u1             arm64        Common UNIX Printing System(tm) - Development files CUPS library
ii  libcupsfilters1:arm64           1.28.7-1+deb11u1               arm64        OpenPrinting CUPS Filters - Shared library
ii  libcupsimage2:arm64             2.3.3op2-3+deb11u1             arm64        Common UNIX Printing System(tm) - Raster image library
ii  libcupsimage2-dev:arm64         2.3.3op2-3+deb11u1             arm64        Common UNIX Printing System(tm) - Development files CUPS image library
ii  printer-driver-cups-pdf         3.0.1-9                        arm64        printer driver for PDF writing via CUPS
ii  python3-cups:arm64              2.0.1-4+b1                     arm64        Python3 bindings for CUPS

No error message comes out, nor does it generate the file, simply after executing the command, it does nothing, I have the printer with the shared option in cups.

azagramac commented 2 years ago

Taking advantage of the fact that I had to re-install the board (Raspberry pi), I made a clean installation.

All correct, it detects it.