Created
October 1, 2015 18:25
-
-
Save ir-norn/f1a9d9fa7c8af284db78 to your computer and use it in GitHub Desktop.
chrome data saver
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
# | |
# webp jpg | |
# フォルダが存在すればtrue | |
if system"copy *.* tmp\\*.*" | |
system"nconvert -D -out jpeg *.jpg" | |
Dir["*.*"].each do|m| | |
next if File.extname(m) == ".rb" # rb script だけ除外 | |
# _1 がつくのでそれをrename | |
b = File.basename(m, '.*') | |
if b[-2..-1] == "_1" | |
b[-2..-1] = "" | |
end | |
File.rename m , b + ".jpg" | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment