print registered questions if debug
This commit is contained in:
parent
6f9b4678e4
commit
bb865905bf
|
@ -22,9 +22,9 @@ answers:
|
|||
tier: 1
|
||||
game_round: 1
|
||||
media:
|
||||
- aaa
|
||||
- bbb
|
||||
- ccc
|
||||
- pix/question1.png
|
||||
- pix/question1_big.png
|
||||
- videos/question1.webm
|
||||
|
||||
--- !Question
|
||||
question: What are users in Facebook called?
|
||||
|
@ -36,6 +36,6 @@ answers:
|
|||
tier: 2
|
||||
game_round: 1
|
||||
media:
|
||||
- aaa
|
||||
- bbb
|
||||
- ccc
|
||||
- pix/facebook.jpg
|
||||
- pix/facebook-jail.png
|
||||
- videos/faschistbook.webm
|
||||
|
|
|
@ -13,6 +13,7 @@ readeable format assuming yaml is more human readable
|
|||
TODO:
|
||||
* Add own constructor to Question() / nice to have
|
||||
* Deal with media files
|
||||
* Fix to output only questions per round as json
|
||||
"""
|
||||
|
||||
__author__ = "Frank Becker <fb@alien8.de>"
|
||||
|
@ -178,6 +179,8 @@ def main():
|
|||
# yaml.add_constructor
|
||||
Question.register_question(q)
|
||||
questions.append(q)
|
||||
if options.debug:
|
||||
print Question.registered_questions
|
||||
print json.dumps([q.as_dict for q in questions], indent=2)
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
Loading…
Reference in New Issue