quizzy 0.1.0__tar.gz → 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- quizzy-0.2.0/CHANGELOG.md +9 -0
- {quizzy-0.1.0 → quizzy-0.2.0}/PKG-INFO +9 -5
- {quizzy-0.1.0 → quizzy-0.2.0}/README.md +8 -4
- quizzy-0.2.0/examples/quizzy.yaml +24 -0
- {quizzy-0.1.0 → quizzy-0.2.0}/pyproject.toml +1 -1
- {quizzy-0.1.0 → quizzy-0.2.0}/quizzy/app.py +3 -3
- {quizzy-0.1.0 → quizzy-0.2.0}/uv.lock +1 -1
- quizzy-0.1.0/examples/quizzy.yaml +0 -21
- {quizzy-0.1.0 → quizzy-0.2.0}/.github/workflows/ci.yaml +0 -0
- {quizzy-0.1.0 → quizzy-0.2.0}/.github/workflows/publish-to-pypi.yaml +0 -0
- {quizzy-0.1.0 → quizzy-0.2.0}/.gitignore +0 -0
- {quizzy-0.1.0 → quizzy-0.2.0}/.pre-commit-config.yaml +0 -0
- {quizzy-0.1.0 → quizzy-0.2.0}/LICENSE +0 -0
- {quizzy-0.1.0 → quizzy-0.2.0}/assets/question-board.png +0 -0
- {quizzy-0.1.0 → quizzy-0.2.0}/quizzy/__init__.py +0 -0
- {quizzy-0.1.0 → quizzy-0.2.0}/quizzy/__main__.py +0 -0
- {quizzy-0.1.0 → quizzy-0.2.0}/quizzy/models.py +0 -0
- {quizzy-0.1.0 → quizzy-0.2.0}/quizzy/quizzy.tcss +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: quizzy
|
3
|
-
Version: 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
|

|
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
|
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
|

|
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
|
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
|
@@ -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.
|
29
|
+
question_widget = widgets.Markdown(self.question.question, id="question")
|
30
30
|
question_widget.border_title = "Question"
|
31
31
|
|
32
|
-
answer_widget = widgets.
|
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.
|
80
|
+
question_widget = widgets.Markdown(self.question.question, id="question")
|
81
81
|
question_widget.border_title = "Question"
|
82
82
|
|
83
83
|
container = containers.Grid(
|
@@ -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
|
File without changes
|