Compare commits
	
		
			3 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 534d7ad615 | |||
| ce03d7b5b0 | |||
| 049c87869a | 
| @@ -26,3 +26,12 @@ Usage | ||||
| ----- | ||||
|  | ||||
| ```python -m partdb-labeler -h``` will show you the available options. | ||||
|  | ||||
| For convenience, you might also consider adding a short shell script somewhere in your PATH that will call the Python module | ||||
| with your server configuration.  I use this (the API key is a read-only key I've publicized elsewhere): | ||||
|  | ||||
| ``` | ||||
| #!/usr/bin/env bash | ||||
| python -m partdb-labeler -p https://partdb.alfter.us -k tcp_673fc81f0b7837ca4c029fbd6536b27742eb8b742eba27bf547c8136dc6a84f8 $* | ||||
| ``` | ||||
|  | ||||
|   | ||||
							
								
								
									
										
											BIN
										
									
								
								dist/partdb_labeler-0.1.1-py2.py3-none-any.whl
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								dist/partdb_labeler-0.1.1-py2.py3-none-any.whl
									
									
									
									
										vendored
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								dist/partdb_labeler-0.1.1.tar.gz
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								dist/partdb_labeler-0.1.1.tar.gz
									
									
									
									
										vendored
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								dist/partdb_labeler-0.1.2-py2.py3-none-any.whl
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								dist/partdb_labeler-0.1.2-py2.py3-none-any.whl
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								dist/partdb_labeler-0.1.2.tar.gz
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								dist/partdb_labeler-0.1.2.tar.gz
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| @@ -16,7 +16,7 @@ parser.add_argument("-q", help="send to selected print queue instead of stdout") | ||||
| parser.add_argument("-p", help="PartDB base URL") | ||||
| parser.add_argument("-k", help="PartDB API key") | ||||
| parser.add_argument("-r", help="printer resolution (default: 203 dpi)", type=int) | ||||
| parser.add_argument('-v', action='version', version='%(prog)s 0.1.1') | ||||
| parser.add_argument('-v', action='version', version='%(prog)s 0.1.2') | ||||
| args=parser.parse_args() | ||||
| id=args.id | ||||
| if args.x==None: | ||||
| @@ -47,11 +47,18 @@ else: | ||||
| # width and height for built-in monospace fonts (includes whitespace) | ||||
|  | ||||
| font_metrics={} | ||||
| font_metrics[1]=(10,14) | ||||
| font_metrics[2]=(12,18) | ||||
| font_metrics[3]=(14,22) | ||||
| font_metrics[4]=(16,26) | ||||
| font_metrics[5]=(34,50) | ||||
| if res==203: | ||||
|     font_metrics[1]=(10,14) | ||||
|     font_metrics[2]=(12,18) | ||||
|     font_metrics[3]=(14,22) | ||||
|     font_metrics[4]=(16,26) | ||||
|     font_metrics[5]=(34,50) | ||||
| if res==300: | ||||
|     font_metrics[1]=(14,22) | ||||
|     font_metrics[2]=(18,30) | ||||
|     font_metrics[3]=(22,38) | ||||
|     font_metrics[4]=(26,46) | ||||
|     font_metrics[5]=(50,82) | ||||
|  | ||||
| # make substitutions for characters not in CP437 | ||||
|  | ||||
|   | ||||
| @@ -8,7 +8,7 @@ authors = [ | ||||
| 	{name="Scott Alfter", email="scott@alfter.us"} | ||||
| ] | ||||
| description = "PartDB Labeler" | ||||
| version = "0.1.1" | ||||
| version = "0.1.2" | ||||
| readme = "README.md" | ||||
| dependencies = ["requests", "zebra", "qrcode", "pillow"] | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user