INNER CODE UNIT · Ruby

run

Automattic/pocket-casts-android · scripts/generate_themes_image.rb:10

def run(command)
  puts command
  `#{command}`
end

run('mkdir -p ~/Downloads/android_themes/')
run('rm -f ~/Downloads/android_themes/*.jpg')
run('rm -f ~/Downloads/android_themes/*.png')

# You may need to run 'adb root' to get access to these screenshots.
run('adb pull /data/user/0/au.com.shiftyjelly.pocketcasts.debug/cache/app_screenshots ~/Downloads/android_themes')
run('mv ~/Downloads/android_themes/app_screenshots/* ~/Downloads/android_themes/')

image_count = 0

Dir.chdir(File.expand_path('~/Downloads/android_themes/')) do
  themes_count.times do |theme_index|
    image_names = ''

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…