From 7427cd78bafdb38c234d0bbdf2a97b83a8184f39 Mon Sep 17 00:00:00 2001 From: neingeist Date: Mon, 17 Apr 2006 19:10:25 +0000 Subject: [PATCH] wird nicht gebraucht --- examples/stadtwiki-upcoming | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100755 examples/stadtwiki-upcoming diff --git a/examples/stadtwiki-upcoming b/examples/stadtwiki-upcoming deleted file mode 100755 index 72d052a..0000000 --- a/examples/stadtwiki-upcoming +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env ruby - -require 'http-access2' -require 'mediawikibot' -require 'vpim/icalendar' -include Vpim - -if ARGV.size() != 2 - $stderr.print($0 + " \n") - exit(1) -end - -$ical_url = "webcal://upcoming.org/calendar/metro/1551" -$web_url = "http://upcoming.org/metro/de/bawue/ka/" - -def get_events() - @client = HTTPAccess2::Client.new() - ical = @client.get_content($ical_url.gsub(/^webcal:/, "http:")) - events = [] - Icalendar.decode(ical).each do |publish| - publish.events.each do |event| - events.push(event) - end - end - return events -end - -body = "Folgende Termine stammen von #{$web_url} ([#{$ical_url} iCal]):\n\n" -get_events().each do |event| - body += "* #{event.dtstart.mday}.#{event.dtstart.month}. #{event.summary}\n" -end - -b = MediaWikiBot::WikiBot.new("http://ka.stadtwiki.net/") -b.login(ARGV[0], ARGV[1]) - -b.edit("Benutzer:Neingeist/Termine_aus_upcoming.org", body, "Import")