quizzy 0.1.0__tar.gz → 0.2.0__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,9 @@
1
+ # Changelog
2
+
3
+ ## v0.2.0
4
+
5
+ * Added support for Markdown syntax in questions and answers
6
+
7
+ ## v0.1.0
8
+
9
+ * Initial release with basic functionality
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: quizzy
3
- Version: 0.1.0
3
+ Version: 0.2.0
4
4
  Summary: A Python TUI quiz app
5
5
  Author-email: Jonas Ehrlich <jonas.ehrlich@gmail.com>
6
6
  License-Expression: MIT
@@ -17,7 +17,6 @@ A quiz app using [textual](https://textual.textualize.io/).
17
17
 
18
18
  ![Question board](assets/question-board.png)
19
19
 
20
-
21
20
  ## Configuration and Questions
22
21
 
23
22
  Create a YAML file to define the teams participating, the questions and their answers.
@@ -47,16 +46,21 @@ categories:
47
46
 
48
47
  See [examples/quizzy.yaml](examples/quizzy.yaml) for an example.
49
48
 
50
-
51
49
  ## Running it
52
50
 
53
- Run normally using *uv*:
51
+ Run the latest PyPI release using *uvx*:
52
+
53
+ ```sh
54
+ uvx quizzy projects/gh/quizzy/examples/quizzy.yaml
55
+ ```
56
+
57
+ Run the local version using *uv*:
54
58
 
55
59
  ``` sh
56
60
  uv run quizzy examples/quizzy.yaml
57
61
  ```
58
62
 
59
- Serve using textual:
63
+ Serve on a webserver using textual:
60
64
 
61
65
  ``` sh
62
66
  uv run textual serve "uv run quizzy examples/quizzy.yaml"
@@ -4,7 +4,6 @@ A quiz app using [textual](https://textual.textualize.io/).
4
4
 
5
5
  ![Question board](assets/question-board.png)
6
6
 
7
-
8
7
  ## Configuration and Questions
9
8
 
10
9
  Create a YAML file to define the teams participating, the questions and their answers.
@@ -34,16 +33,21 @@ categories:
34
33
 
35
34
  See [examples/quizzy.yaml](examples/quizzy.yaml) for an example.
36
35
 
37
-
38
36
  ## Running it
39
37
 
40
- Run normally using *uv*:
38
+ Run the latest PyPI release using *uvx*:
39
+
40
+ ```sh
41
+ uvx quizzy projects/gh/quizzy/examples/quizzy.yaml
42
+ ```
43
+
44
+ Run the local version using *uv*:
41
45
 
42
46
  ``` sh
43
47
  uv run quizzy examples/quizzy.yaml
44
48
  ```
45
49
 
46
- Serve using textual:
50
+ Serve on a webserver using textual:
47
51
 
48
52
  ``` sh
49
53
  uv run textual serve "uv run quizzy examples/quizzy.yaml"
@@ -0,0 +1,24 @@
1
+ teams:
2
+ - name: "Team 1"
3
+ - name: "Team 2"
4
+ categories:
5
+ - name: "General Knowledge"
6
+ questions:
7
+ - question: "What is the capital of France?"
8
+ answer: "Paris"
9
+ value: 100
10
+ - question: "What is the capital of Germany?"
11
+ answer: "Berlin"
12
+ value: 200
13
+ - name: "Science"
14
+ questions:
15
+ - question: "What is the _chemical_ **symbol** for [gold](https://duckduckgo.com/?t=ffab&q=gold)?"
16
+ answer: "Au"
17
+ value: 100
18
+ - question: |
19
+ What is the chemical symbol for silver?
20
+
21
+ - We really need to know this one. And don't care about platinum which is Pt.
22
+ - Also not Helium which is He.
23
+ answer: "[Ag](https://en.wikipedia.org/wiki/Gold), that was easy **right**?"
24
+ value: 200
@@ -1,7 +1,7 @@
1
1
 
2
2
  [project]
3
3
  name = "quizzy"
4
- version = "0.1.0"
4
+ version = "0.2.0"
5
5
  description = "A Python TUI quiz app"
6
6
  authors = [{ name = "Jonas Ehrlich", email = "jonas.ehrlich@gmail.com" }]
7
7
  readme = "README.md"
@@ -26,10 +26,10 @@ class AnswerScreen(screen.ModalScreen[models.Team | None]):
26
26
  self.border_title = f"{category} - {question.value} points"
27
27
 
28
28
  def compose(self) -> app.ComposeResult:
29
- question_widget = widgets.Static(self.question.question, id="question")
29
+ question_widget = widgets.Markdown(self.question.question, id="question")
30
30
  question_widget.border_title = "Question"
31
31
 
32
- answer_widget = widgets.Static(self.question.answer, id="answer")
32
+ answer_widget = widgets.Markdown(self.question.answer, id="answer")
33
33
  answer_widget.border_title = "Answer"
34
34
 
35
35
  whoanswered = containers.HorizontalGroup(
@@ -77,7 +77,7 @@ class QuestionScreen(screen.ModalScreen[models.Team | None]):
77
77
  self.teams = teams
78
78
 
79
79
  def compose(self) -> app.ComposeResult:
80
- question_widget = widgets.Static(self.question.question, id="question")
80
+ question_widget = widgets.Markdown(self.question.question, id="question")
81
81
  question_widget.border_title = "Question"
82
82
 
83
83
  container = containers.Grid(
@@ -840,7 +840,7 @@ wheels = [
840
840
 
841
841
  [[package]]
842
842
  name = "quizzy"
843
- version = "0.1.0"
843
+ version = "0.2.0"
844
844
  source = { editable = "." }
845
845
  dependencies = [
846
846
  { name = "pydantic" },
@@ -1,21 +0,0 @@
1
- teams:
2
- - name: "Team 1"
3
- - name: "Team 2"
4
- categories:
5
- - name: "General Knowledge"
6
- questions:
7
- - question: "What is the capital of France?"
8
- answer: "Paris"
9
- value: 100
10
- - question: "What is the capital of Germany?"
11
- answer: "Berlin"
12
- value: 200
13
- - name: "Science"
14
- questions:
15
- - question: "What is the chemical symbol for gold?"
16
- answer: "Au"
17
- value: 100
18
- - question: "What is the chemical symbol for silver?"
19
- answer: "Ag"
20
- value: 200
21
-
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes