Skip to content

Instantly share code, notes, and snippets.

@v3rba
v3rba / tumblr-photo-ripper.rb
Last active December 6, 2018 03:02 — forked from jamiew/tumblr-photo-ripper.rb
Download all the images and gifs from a Tumblr blog
# Usage:
# [sudo] gem install mechanize
# ruby tumblr-photo-ripper.rb
require 'rubygems'
require 'mechanize'
# Your Tumblr subdomain, e.g. "jamiew" for "jamiew.tumblr.com"
site = "jamiew"
@bertspaan
bertspaan / split_geojson.rb
Last active April 11, 2018 19:52
Ruby script to split GeoJSON file(s) into separate files, one for each feature.
# encoding: UTF-8
require 'json'
require 'fileutils'
ARGV.select{ |file| [".json", ".geojson"].include? File.extname(file) }.each do |file|
basename = File.basename(file, File.extname(file))
geojson = JSON.parse(File.open(file).read)
if geojson.has_key? "features"
@jamiew
jamiew / tumblr-photo-ripper.rb
Created July 13, 2011 17:46
Download all the images from a Tumblr blog
# Usage:
# [sudo] gem install mechanize
# ruby tumblr-photo-ripper.rb
require 'rubygems'
require 'mechanize'
# Your Tumblr subdomain, e.g. "jamiew" for "jamiew.tumblr.com"
site = "doctorwho"