minor frickelei
This commit is contained in:
		
							parent
							
								
									01697b8ece
								
							
						
					
					
						commit
						7b5bb895c4
					
				
					 1 changed files with 7 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -31,7 +31,7 @@ def parse_template(title, template)
 | 
			
		|||
      info << fields
 | 
			
		||||
    end
 | 
			
		||||
  else
 | 
			
		||||
    $stderr.print "Template #{template} not found in #{title}!"
 | 
			
		||||
    $stderr.print "Template #{template} not found in #{title}!\n"
 | 
			
		||||
  end
 | 
			
		||||
 
 | 
			
		||||
  info
 | 
			
		||||
| 
						 | 
				
			
			@ -40,12 +40,15 @@ end
 | 
			
		|||
list = ""
 | 
			
		||||
 | 
			
		||||
@wiki.category("Workshop").articles.each do |article|
 | 
			
		||||
  if article != "Template:Workshop"
 | 
			
		||||
  if article != "Template:Workshop" && article != "List of workshops" && article != "ExampleVille"
 | 
			
		||||
 | 
			
		||||
    workshops = parse_template(article, "Workshop")
 | 
			
		||||
 | 
			
		||||
    workshops.each do |workshop|
 | 
			
		||||
      list += "* [[#{article}|#{workshop["what"]}]] "
 | 
			
		||||
      list += "Day " + workshop["day"] + "/" + workshop["start"]
 | 
			
		||||
      if workshop["day"] != ""
 | 
			
		||||
        list += "Day " + workshop["day"] + "/" + workshop["start"]
 | 
			
		||||
      end
 | 
			
		||||
      list += "\n"
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
| 
						 | 
				
			
			@ -57,4 +60,4 @@ puts list
 | 
			
		|||
a = @wiki.article("List of workshops")
 | 
			
		||||
a.text = list
 | 
			
		||||
a.submit("wiki ex machina")
 | 
			
		||||
 | 
			
		||||
a.protect("Automatically generated article")
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Reference in a new issue