zuerchtgeflickert fuer gpn7
This commit is contained in:
parent
fb19db3dde
commit
78a2b0d055
1 changed files with 6 additions and 6 deletions
|
@ -3,7 +3,7 @@ $:.unshift('vendor/ruby-mediawiki/lib')
|
||||||
require 'mediawiki/dotfile'
|
require 'mediawiki/dotfile'
|
||||||
@wiki = MediaWiki.dotfile(nil,'entropia')
|
@wiki = MediaWiki.dotfile(nil,'entropia')
|
||||||
|
|
||||||
roh = @wiki.article("Vorlage:GPN6:Fahrplan").text
|
roh = @wiki.article("Vorlage:GPN7:Fahrplan").text
|
||||||
|
|
||||||
def cleanse (t)
|
def cleanse (t)
|
||||||
t.gsub(/\[\[.*\|(.*)\]\]/, '\1')
|
t.gsub(/\[\[.*\|(.*)\]\]/, '\1')
|
||||||
|
@ -17,11 +17,11 @@ tag = 1
|
||||||
|
|
||||||
roh.split("\n").each do |line|
|
roh.split("\n").each do |line|
|
||||||
|
|
||||||
if line =~ /^\| *(.*:00) *$/
|
if line =~ /^\| *(.*:[0-9]+) *$/
|
||||||
if uhrzeit
|
if uhrzeit
|
||||||
puts "#{tag} #{uhrzeit} KLAMMER AUF #{titel1}"
|
puts "#{tag} #{uhrzeit} ÜBERALL #{titel1}" if titel1
|
||||||
puts "#{tag} #{uhrzeit} KLAMMER ZU #{titel2}"
|
puts "#{tag} #{uhrzeit} NIRGENDS #{titel2}" if titel2
|
||||||
puts "#{tag} #{uhrzeit} IRGENDWO #{titel3}"
|
puts "#{tag} #{uhrzeit} IRGENDWO #{titel3}" if titel3
|
||||||
end
|
end
|
||||||
|
|
||||||
if uhrzeit && $1 < uhrzeit
|
if uhrzeit && $1 < uhrzeit
|
||||||
|
@ -32,7 +32,7 @@ roh.split("\n").each do |line|
|
||||||
titel1 = nil
|
titel1 = nil
|
||||||
titel2 = nil
|
titel2 = nil
|
||||||
titel3 = nil
|
titel3 = nil
|
||||||
elsif line =~ /^\| *('''(.*)'''|.*(GOTO).*) *$/
|
elsif line =~ /^\|(?: *(?:valign=top|align=center) *\|)? *('''(.*)'''|.*(GOTO).*)\s*$/
|
||||||
|
|
||||||
# yum
|
# yum
|
||||||
if $3 == "GOTO"
|
if $3 == "GOTO"
|
||||||
|
|
Reference in a new issue