Skip to content

Instantly share code, notes, and snippets.

View patforna's full-sized avatar

Patric Fornasier patforna

View GitHub Profile
@patforna
patforna / import.rb
Last active December 15, 2015 11:29 — forked from ngauthier/import.rb
compute tags, include '{% include JB/setup %}' instead of h1, ignore comments
require 'rubygems'
require 'nokogiri'
require 'fileutils'
require 'date'
# usage: ruby import.rb my-blog.xml
# my-blog.xml is a file from Settings -> Basic -> Export in blogger.
data = File.read ARGV[0]
doc = Nokogiri::XML(data)