
    =	fg                        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 ddl	 ddl
mZmZmZ g edd	d
fdez  ddd
fddddddej                  ddddej                  ej                   ej"                  ej$                  ej&                  ddddej(                  ej*                  dddddej(                  ej,                  d Z ej0                  eee eeefdd
d
	      Zej7                  d!g d"d#$      \  ZZZZZ Z!	 d#Z"d#Z#d#Z$d%Z%eD ]?  \  Z&Z'e&d&v rd
Z"e&d'v rd
Z#e&d(v rd
Z$e&d)v r
	  e(e'      Z%)e&d,k(  s/e+jY                  d-       A e"xs e#xs e$Z-e-e_.        ej_                           e0ejb                        d%k7  rejU                  d.g+       ejb                  d   Z2d/e2jg                         v rejU                  d0g+        ejh                  e2e%      \  Z5Z6Z7e5s#e+jq                  d1        ejr                  d%       e"r	 e:e5       ne-s e:d2e5z         e6re#r	 e:e6       n#e-s! e:d3e6z         ne6se#re+jq                  d4       e7re$r	 e:e7       n#e-s! e:d5e7z         ne7se$re+jq                  d6       e-s#e+jy                  d       e+jy                  d8       yy# e)$ r ejU                  d*g+       Y w xY w# e;$ r e+jq                  d7       Y ]w xY w)9z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]summary)z[SERIAL NO.|USB ID|IP|DEVNODE]r   headingF)zUSB 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)zIPs (network only):z$IPv4 address "a.b.c.d" or "hostname"r   F)zDEVNODE (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)zUSB:z$ hp-makeuri 001:002exampleF)zNetwork: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)zhp-setupr   seealsoFzp: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.	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.)=__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     /usr/share/hplip/makeuri.py<module>rU      s9  . )	

[  	  	   & &	
7B
% 	
?'I2yZ^
_	

B	
 n	
 i		

 [	
 X	
 R	
 

	
 X	
 T	
 T	
 U	
 

	
 !& 4 4	
 7<6J6J	
 

	
 

	
  =!	
" G#	
$ H%	
& c'	
( 

)	
* 

+	
, U-	
. ,/	
0 U1	
2 93	
4 O5	
6 

7	
8 

9	
: -;	
B fmmGYWe%'tT; W=+0  2 7j,j$LOONG #1  "O"""O/!!N""aa& $YMM'"##( !EOE~JCI MMO
388}		`a	bHHQKEekkm#		/0	1"0&.."@Hh		$%hnx'((O.8+,/		12'N"W,-		01
 HHRLHHW w  a		%^$_	`ap  IIks=   )K J:	K EK :KK KK K21K2