mirror of
				https://gitea.blesmrt.net/mikaela/scripts.git
				synced 2025-10-31 09:27:21 +01:00 
			
		
		
		
	qr.bash: create qrcodes with qrencode
This commit is contained in:
		
							parent
							
								
									dbbd461fb5
								
							
						
					
					
						commit
						5bd1219bb5
					
				
							
								
								
									
										16
									
								
								bash/qr.bash
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										16
									
								
								bash/qr.bash
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,16 @@ | ||||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| # Arguments: Name & content | ||||
| 
 | ||||
| # -l H uses the highest error correction in case 30 % gets damaged (or artistried upon) | ||||
| 
 | ||||
| # Outputs QR code to terminal | ||||
| 
 | ||||
| # ${@:2} takes all arguments except not the first one | ||||
| qrencode -l H -t utf8 "${@:2}" | ||||
| # Stores QR code as $1.png (first argument) | ||||
| qrencode -l H -o "$1".png "${@:2}" | ||||
| 
 | ||||
| # Prints details | ||||
| echo "Name: $1.png" | ||||
| echo "Content: ${@:2}" | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user