Skip to content
Create a gist now

Instantly share code, notes, and snippets.

Import your ReadItLater bookmarks into Instapaper
#!/usr/bin/env ruby
# 1. export your RIL bookmarks
# 2. save this file to the same directory where your ril_export.html is
# 3. change username and password in the script bellow
# 4. run 'ruby ril_to_instapaper.rb' in terminal
require "cgi"
require "net/http"
require "net/https"
ril ="ril_export.html")
unread = ril.scan(%r{<ul>.*?</ul>}m).first
http ="", 443)
http.use_ssl = true
unread.scan(%r{href="(.*?)".*?>(.*?)<}).each do |url, title|
puts "#{url}: #{title}""/api/add", {
:username => "",
:password => "top secret",
:url => url,
:title => title,
}.map { |k, v| "#{k}=#{CGI.escape(v)}" }.join("&"))

Just what I needed. It worked great.

Thanks for sharing.


Awesome. Thanks.


well done, worked great for me.


Thank you very much!


awesome. thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.