Sindbad~EG File Manager
o
�/�af � @ s> d Z dZdZdZddlZddlZddlZddlZddlT ddl T ddl
mZmZm
Z
g edd d
f�de ddd
f�d
�d�d�d�d�d�ej�d�d�d�d�ej�ej�ej�ej�ej�d�d�d�d�ej�ej�d�d�d�d�d�ej�ej�d �Ze
�eee eeefdd
d
� Zejd!g d"�d#d$�\ZZZZZ Z!z�d#Z"d#Z#d#Z$d%Z%eD ]=\Z&Z'e&d&v r�d
Z"q�e&d'v r�d
Z#q�e&d(v r�d
Z$q�e&d)v r�ze(e'�Z%W q� e)y� ej*d*gd+� Y q�w e&d,kr�e+�,d-� q�e"p�e#p�e$Z-e-e_.e�/� e0ej1�d%k�rej*d.gd+� ej1d Z2d/e2�3� v �rej*d0gd+� e�4e2e%�\Z5Z6Z7e5�s,e+�8d1� e�9d%� e"�r4e:e5� n e-�s=e:d2e5 � e6�rRe#�rHe:e6� ne-�sQe:d3e6 � ne6�s]e#�r]e+�8d4� e7�rre$�rhe:e7� ne-�sqe:d5e7 � ne7�s}e$�r}e+�8d6� W n e;�y� e+�8d7� Y nw e-�s�e+�<d� e+�<d8� dS dS )9z5.0zDevice URI Creation Utilityz
hp-makeurizOCreates device URIs for local and network connected printers for use with CUPS.� N)�*)�device�utils�module� �nameTz2Usage: %s [OPTIONS] [SERIAL NO.|USB ID|IP|DEVNODE]�summary)z[SERIAL NO.|USB ID|IP|DEVNODE]r �headingF)zUSB IDs (usb only):zs"xxx:yyy" where xxx is the USB bus ID and yyy is the USB device ID. The ':' and all leading zeroes must be present.�optionF)r zA(Use the 'lsusb' command to obtain this information. See Note 1.)r
F)zIPs (network only):z$IPv4 address "a.b.c.d" or "hostname"r
F)zDEVNODE (parallel only):z"/dev/parportX", X=0,1,2,...r
F)z#SERIAL NO. (usb and parallel only):z"serial no."r
T)z.To specify the port on a multi-port JetDirect:zE-p<port> or --port=<port> (Valid values are 1\*, 2, and 3. \*default)r
F)z$Show the CUPS URI only (quiet mode):z-c or --cupsr
F)z$Show the SANE URI only (quiet mode):z-s or --saner
F)z&Show the HP Fax URI only (quiet mode):z-f or --faxr
F)zUSB:z$ hp-makeuri 001:002�exampleF)zNetwork:z$ hp-makeuri 66.35.250.209r F)z Parallel:z$ hp-makeuri /dev/parport0r F)z&USB or parallel (using serial number):z$ hp-makeuri US123456789r F)zs1. Example using 'lsusb' to obtain USB bus ID and USB device ID (example only, the values you obtain will differ) :r �noteF)z
$ lsusbr r F)z3 Bus 003 Device 011: ID 03f0:c202 Hewlett-Packardr r F)z $ hp-makeuri 003:011r r F)zn (Note: You may have to run 'lsusb' from /sbin or another location. Use '$ locate lsusb' to determine this.)r r T)zhp-setupr �seealsoFzp:csf)�port�cups�sane�faxF)�handle_device_printer� )z-cz--cups)z-sz--sane)z-fz--fax)z-pz--portz7Invalid port number. Must be between 1 and 3 inclusive.)� error_msgz-g�debugzAYou must specify one SERIAL NO., IP, USB ID or DEVNODE parameter.� localhostzInvalid hostnamezDevice not foundzCUPS URI: %szSANE URI: %szDevice does not support scan.zHP Fax URI: %szDevice does not support fax.z User exitzDone.)=�__version__� __title__�__mod__�__doc__�sys�re�getopt�os�base.g�
base.codes�baser r r �
USAGE_OPTIONS�USAGE_LOGGING1�USAGE_LOGGING2�USAGE_LOGGING3�
USAGE_HELP�USAGE_EXAMPLES�USAGE_SPACE�USAGE_NOTES�
USAGE_SEEALSO�USAGE�Module�INTERACTIVE_MODE�mod�parseStdOpts�opts�
device_uri�printer_name�mode�
ui_toolkit�lang�cups_quiet_mode�sane_quiet_mode�fax_quiet_mode�jd_port�o�a�int�
ValueError�usage�log� set_level�
quiet_mode�quiet� showTitle�len�args�param�lower�makeURI�cups_uri�sane_uri�fax_uri�error�exit�print�KeyboardInterrupt�info� rQ rQ �/usr/share/hplip/makeuri.py�<module> s �������� �
���
�
�
�����������������!
����
�
�
�
��
�
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists