forked from MapComplete/MapComplete
		
	Add script to automatically rescale SVG images - important to export them to PNGs
This commit is contained in:
		
							parent
							
								
									7090a5ceb8
								
							
						
					
					
						commit
						d4f5e1d238
					
				
					 8 changed files with 261 additions and 90 deletions
				
			
		
							
								
								
									
										15
									
								
								scripts/resizeSvg.sh
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										15
									
								
								scripts/resizeSvg.sh
									
										
									
									
									
										Executable file
									
								
							|  | @ -0,0 +1,15 @@ | |||
| #! /bin/bash | ||||
| 
 | ||||
| # Requires `sudo apt-get install librsvg2-bin` | ||||
| # $1 should be the file | ||||
| 
 | ||||
| resizeFile(){ | ||||
|     PTH="$(dirname "${1}")" | ||||
|     FILE="$(basename "${1}")" | ||||
|     echo "Path is $PTH, name is $FILE" | ||||
|     svg-resizer -f -x 500 -y 500 -o /tmp/resized $1 | ||||
|     # mv "/tmp/resized/$FILE" "$PTH" | ||||
| } | ||||
| 
 | ||||
| export -f resizeFile | ||||
| find . -name "*.svg" -exec bash -c 'resizeFile "$0"' {} \; | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue