Remove debug stuff, whitespace
This commit is contained in:
parent
a7d947ba4a
commit
f5b07db285
1 changed files with 2 additions and 3 deletions
|
@ -33,6 +33,7 @@ template = "Vorlage:Radio Chaotica-Sendung"
|
||||||
episodes = []
|
episodes = []
|
||||||
@wiki.article(template).what_links_here.each do |page|
|
@wiki.article(template).what_links_here.each do |page|
|
||||||
# puts page # DEBUG
|
# puts page # DEBUG
|
||||||
|
|
||||||
if erste_sendung = parse_template(page, template)["erste_sendung"]
|
if erste_sendung = parse_template(page, template)["erste_sendung"]
|
||||||
episode = {
|
episode = {
|
||||||
"title" => page,
|
"title" => page,
|
||||||
|
@ -42,7 +43,6 @@ episodes = []
|
||||||
"date" => Date.today(), # fallback
|
"date" => Date.today(), # fallback
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# Get a real date
|
# Get a real date
|
||||||
erste_sendung.gsub!(/\s*um\s*\d+:\d+$/,"")
|
erste_sendung.gsub!(/\s*um\s*\d+:\d+$/,"")
|
||||||
if erste_sendung !~ /^[0-9]{2}\.[0-9]{2}\.[0-9]{4}.*$/
|
if erste_sendung !~ /^[0-9]{2}\.[0-9]{2}\.[0-9]{4}.*$/
|
||||||
|
@ -52,7 +52,6 @@ episodes = []
|
||||||
end
|
end
|
||||||
episode["pubdate"] = episode["date"].strftime(RFC822)
|
episode["pubdate"] = episode["date"].strftime(RFC822)
|
||||||
|
|
||||||
|
|
||||||
# Get content type and length
|
# Get content type and length
|
||||||
head = head(episode["enclosure_url"])
|
head = head(episode["enclosure_url"])
|
||||||
episode["length"] = head["content-length"]
|
episode["length"] = head["content-length"]
|
||||||
|
@ -63,7 +62,7 @@ episodes = []
|
||||||
|
|
||||||
episodes.push(episode)
|
episodes.push(episode)
|
||||||
end
|
end
|
||||||
$stderr.puts "DEBUG: Only crawling one episode"; break
|
# $stderr.puts "DEBUG: Only crawling one episode"; break
|
||||||
end
|
end
|
||||||
|
|
||||||
# Sort episodes, starting with last
|
# Sort episodes, starting with last
|
||||||
|
|
Reference in a new issue