Created
February 23, 2015 22:39
-
-
Save JRJurman/9b36301594d4e568903c to your computer and use it in GitHub Desktop.
Making images into folders
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Dir.glob("*.png").each do |img| | |
| fimg = img.sub( /\.\S*/, "" ) | |
| puts fimg | |
| `mkdir #{fimg}` | |
| `touch #{fimg}/full_text.txt` | |
| `mv #{img} #{fimg}/full.png` | |
| `cp #{fimg}/full.png #{fimg}/thumb.png` | |
| `sips #{fimg}/thumb.png --resampleHeightWidth 400 570` | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment