puts <<-XML fabianonline.de https://blog.fabianonline.de Eine weitere Wordpress-Test Websites Website Tue, 08 Dec 2020 12:42:20 +0000 de-DE 1.2 https://blog2.fabianonline.de https://blog2.fabianonline.de 2 https://wordpress.org/?v=5.5.3 XML # Look at all strings starting with src="/uploads/ or href="/uploads/ - you might want to change this if # your images are saved at another place. images = STDIN.read.scan(/(?:src|href)="(\/uploads\/.+?)"/).to_a.map(&:first).uniq # Pay close attention to the attachment_url in this block: This is the path where Wordpress will try to load # the image from. This should be correct and accessible for wordpress. # The date is given as Jan 1, 1970 so we know Wordpress will put the images into the path 1970/01. This will # be relied on in the next script. images.each_with_index do |path, i| puts <<-XML2 #{File.basename(path)} https://blog.fabianonline.de#{path} Tue, 01 Jan 1970 12:41:29 +0000 https://blog.fabianonline.de#{path} 0 0 0 XML2 end puts " "