Created
September 11, 2020 16:10
-
-
Save ChrisZou/7e40361c6b9c704d2da2f718531dcb8f to your computer and use it in GitHub Desktop.
One-line Ruby to preview all svg files in a dir
This file contains 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["*.svg"].map { "<img src='./#{_1}' style='width: 100px; height: 100px; margin: 20px' /> " }.join("\n").then { File.write("result.html", _1); system("open result.html") } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment