(no commit message) master
authorDuncan Mac-Vicar P <dmacvicar@suse.de>
Mon, 14 Apr 2008 22:14:22 +0000 (00:14 +0200)
committerDuncan Mac-Vicar P <dmacvicar@suse.de>
Mon, 14 Apr 2008 22:14:22 +0000 (00:14 +0200)
vgn.rb [new file with mode: 0755]

diff --git a/vgn.rb b/vgn.rb
new file mode 100755 (executable)
index 0000000..014c21d
--- /dev/null
+++ b/vgn.rb
@@ -0,0 +1,26 @@
+#!/usr/bin/env ruby
+
+require 'open-uri'
+
+origin = ARGV[0]
+destination = ARGV[1]
+
+puts origin
+puts destination
+
+#http://http//vgn.de/ib/site/tools/Interface_ASKIT_TRIP.php?origin=flughafen&destination=messe&date=20070615&time=0930
+
+timestamp = Time.now
+
+date = timestamp.strftime('%Y%m%d')
+time = timestamp.strftime('%H%M')
+
+url = "http://www.vgn.de/ib/site/tools/Interface_ASKIT_TRIP.php?origin=#{origin}&destination=#{destination}&date=#{date}&time=#{time}"
+puts url
+
+f = open(url, 'r')
+
+xml = f.read
+
+puts xml
+