3
NZf              #   @   s   d Z dZdZdZddlZddlZddlZddlZddlT ddl	T ddl
mZmZmZ edd	d
fde ddd
fdQdRdSdTdUdVejdWdXdYdZejejejejejd[d\d]d^ejejd_d`dadbdcejejddg Zejeee eeefdd
d
	Zejd3d4d5d6d7gdd8\ZZZZZ Z!ydZ"dZ#dZ$d9Z%xeD ]\Z&Z'e&dekr2d
Z"nre&dfkrBd
Z#nbe&dgkrRd
Z$nRe&dhkrye(e'Z%W n$ e)k
r   ej*dBgdC Y nX ne&dDkre+j,dE qW e"pe#pe$Z-e-e_.ej/  e0ej1d9krej*dFgdC ej1d Z2dGe2j3 krej*dHgdC ej4e2e%\Z5Z6Z7e5s8e+j8dI ej9d9 e"rHe:e5 ne-sZe:dJe5  e6re#rpe:e6 ne-se:dKe6  ne6 re#re+j8dL e7re$re:e7 ne-se:dMe7  ne7 re$re+j8dN W n  e;k
r    e+j8dO Y nX e-se+j<d e+j<dP dS )iz5.0zDevice 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]Zsummary[SERIAL NO.|USB ID|IP|DEVNODE]headingFUSB IDs (usb only):s"xxx:yyy" where xxx is the USB bus ID and yyy is the USB device ID. The ':' and all leading zeroes must be present.optionA(Use the 'lsusb' command to obtain this information. See Note 1.)IPs (network only):$IPv4 address "a.b.c.d" or "hostname"DEVNODE (parallel only):"/dev/parportX", X=0,1,2,...#SERIAL NO. (usb and parallel only):"serial no.".To specify the port on a multi-port JetDirect:E-p<port> or --port=<port> (Valid values are 1\*, 2, and 3. \*default)$Show the CUPS URI only (quiet mode):-c or --cups$Show the SANE URI only (quiet mode):-s or --sane&Show the HP Fax URI only (quiet mode):-f or --faxUSB:$ hp-makeuri 001:002exampleNetwork:$ hp-makeuri 66.35.250.209	Parallel:$ hp-makeuri /dev/parport0&USB or parallel (using serial number):$ hp-makeuri US123456789s1. Example using 'lsusb' to obtain USB bus ID and USB device ID (example only, the values you obtain will differ) :note
   $ lsusb3   Bus 003 Device 011: ID 03f0:c202 Hewlett-Packard   $ hp-makeuri 003:011n   (Note: You may have to run 'lsusb' from /sbin or another location. Use '$ locate lsusb' to determine this.)hp-setupseealsozp:csfZportZcupsZsaneZfax)Zhandle_device_printer   -c--cups-s--sane-f--fax-p--portz7Invalid port number. Must be between 1 and 3 inclusive.)Z	error_msgz-gdebugzAYou must specify one SERIAL NO., IP, USB ID or DEVNODE parameter.Z	localhostzInvalid hostnamezDevice not foundzCUPS URI: %szSANE URI: %szDevice does not support scan.zHP Fax URI: %szDevice does not support fax.z	User exitzDone.)r   r   r	   F)r
   r   r   F)r   r   r   F)r   r   r   F)r   r   r   F)r   r   r   T)r   r   r   F)r   r   r   F)r   r   r   F)r   r   r   F)r   r   r   F)r   r    r   F)r!   r"   r   F)r#   r$   r   F)r%   r   r&   F)r'   r   r&   F)r(   r   r&   F)r)   r   r&   F)r*   r   r&   T)r+   r   r,   F)r.   r/   )r0   r1   )r2   r3   )r4   r5   )=__version__Z	__title____mod____doc__sysreZgetoptosZbase.gZ
base.codesbaser   r   r   ZUSAGE_OPTIONSZUSAGE_LOGGING1ZUSAGE_LOGGING2ZUSAGE_LOGGING3Z
USAGE_HELPZUSAGE_EXAMPLESZUSAGE_SPACEZUSAGE_NOTESZUSAGE_SEEALSOZUSAGEZModuleZINTERACTIVE_MODEmodZparseStdOptsZoptsZ
device_uriZprinter_namemodeZ
ui_toolkitZlangZcups_quiet_modeZsane_quiet_modeZfax_quiet_modeZjd_portoaint
ValueErrorZusagelogZ	set_levelZ
quiet_modequietZ	showTitlelenargsZparamlowerZmakeURIZcups_uriZsane_uriZfax_urierrorexitprintKeyboardInterruptinfo rN   rN   /usr/share/hplip/makeuri.py<module>   s   













