Created
September 2, 2013 17:53
-
-
Save meise/6415504 to your computer and use it in GitHub Desktop.
Create doku wiki table with all talks available in frab xml export to track post-processing status.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# encoding: utf-8 | |
require 'open-uri' | |
require 'nokogiri' | |
xml_data = Nokogiri::XML(open("http://programm.froscon.org/2013/schedule.xml")) | |
conference = xml_data.xpath('//conference/title').text | |
days = xml_data.xpath('//*/day') | |
puts "~~NOTOC~~" | |
puts | |
puts "= #{conference}" | |
days.each do |day| | |
puts "== #{day[:date]}" | |
puts "^ ID ^ Slug ^ h264 ^ webm ^ opus ^ mp3 ^ Comment ^" | |
day.xpath('//*/event').each do |event| | |
puts "| #{event[:id]} | #{event.at_xpath('slug').text.gsub(':', '_')} | | | | | |" | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem install nokogiri |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment