From 8061a29fee2c5ba5a0a267de3876390cae4164fb Mon Sep 17 00:00:00 2001 From: Frank Becker Date: Fri, 12 Oct 2012 23:24:09 +0200 Subject: [PATCH] enabled debug in converter, ds2012 converts successfully --- data.ds2012/questions.yaml | 10 +++------- tools/questions2json.py | 5 +++-- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/data.ds2012/questions.yaml b/data.ds2012/questions.yaml index e7fdb7d..9f4d163 100644 --- a/data.ds2012/questions.yaml +++ b/data.ds2012/questions.yaml @@ -12,7 +12,7 @@ # - bbb --- !Question -question: Wie heißt der Gewinner der SHA-3 Competition? +question: Wie heisst der Gewinner der SHA-3 Competition? answers: - false: BLAKE - false: Grostl @@ -68,7 +68,7 @@ game_round: 1 --- !Question question: Welche Stichwoerter duerfen eBooks bei Apple nicht enthalten? answers: - - true Amazon + - true: Amazon - false: Android - false: Gay - false: Nipples @@ -403,7 +403,7 @@ tier: 10 game_round: 3 --- !Question -question: Wie viel Prozent der Lauschangriffe sind rechtswidrig (verstossen mind. gegen Verfahrensvorschriften)? +question: Wieviele Lauschangriffe verstossen in .de gegen die Vorschriften? answers: - true: 3/4 - false: 1/2 @@ -431,9 +431,6 @@ game_round: 4 # (evtl YDKJ Style: Bilder vorbeifliegen, drücken wenn "COP") - - - #--- !Question #question: What is e-voting machine not good in? # - true: counting votes @@ -441,4 +438,3 @@ game_round: 4 # - false: Failure to log normal/abnormal voting events # - false: Skewing off the ballot # 1616 - diff --git a/tools/questions2json.py b/tools/questions2json.py index 8e95b35..5ab386f 100755 --- a/tools/questions2json.py +++ b/tools/questions2json.py @@ -349,7 +349,8 @@ def gen_answers_html(questions, game_rounds): for num, question in enumerate( questions_per_round(questions, game_round=round)): fh.write('
  • ') - fh.write('Question {0}: {1}
    '.format(num + 1, question.question)) + print question.question + fh.write(u'Question {0}: {1}
    '.format(num + 1, question.question)) answers = ['Link {1} '.format(s, n) \ for n, s in enumerate(question.source.split())] #encode('utf-8')), @@ -393,7 +394,7 @@ def main(): if options.pdf: gen_pdf(questions, game_rounds) - gen_answers_html(questions, game_rounds) + #gen_answers_html(questions, game_rounds) if __name__ == '__main__': main()