To get it working run this command for dependencies
pip install requests beautifulsoup4 lxml
To get it working run this command for dependencies
pip install requests beautifulsoup4 lxml
| #!/usr/bin/env ruby | |
| require 'shellwords' | |
| def convert_to_jpg(original_file, output_file) | |
| cmd = "convert #{Shellwords.escape(original_file)} #{Shellwords.escape(output_file)}" | |
| success = system(cmd) | |
| if success | |
| File.delete(original_file) # Deletes the original file if the conversion was successful | |
| puts "Deleted original file: #{original_file}" |
| #!/usr/bin/env ruby | |
| require 'shellwords' | |
| files = `find . -iname '*.heic'`.split("\n") | |
| files.each do |original_file| | |
| output_file = original_file.gsub(/\.heic\z/i, ' Converted.jpg') | |
| if File.exist?(output_file) | |
| STDERR.puts "Skipping output #{output_file} exists." | |
| else |