quizzy 0.5.0__tar.gz → 0.6.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.
@@ -1,9 +1,13 @@
1
1
 
2
2
  # Changelog
3
3
 
4
+ ## v0.6.0
5
+
6
+ * Only dump game state on exit with `--dump-state-on-exit`
7
+
4
8
  ## v0.5.0
5
9
 
6
- * Save state of unfinished quizzes to continue at a later point
10
+ * Dump game state on exit by default
7
11
 
8
12
  ## v0.4.0
9
13
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: quizzy
3
- Version: 0.5.0
3
+ Version: 0.6.0
4
4
  Summary: A Python TUI quiz app
5
5
  Author-email: Jonas Ehrlich <jonas.ehrlich@gmail.com>
6
6
  License-Expression: MIT
@@ -16,7 +16,7 @@ Description-Content-Type: text/markdown
16
16
 
17
17
  A quiz app using [textual](https://textual.textualize.io/).
18
18
 
19
- ![Question board](assets/question-board.png)
19
+ ![Question board](assets/game.gif)
20
20
 
21
21
  ## Configuration and Questions
22
22
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  A quiz app using [textual](https://textual.textualize.io/).
4
4
 
5
- ![Question board](assets/question-board.png)
5
+ ![Question board](assets/game.gif)
6
6
 
7
7
  ## Configuration and Questions
8
8
 
Binary file
@@ -1,7 +1,7 @@
1
1
 
2
2
  [project]
3
3
  name = "quizzy"
4
- version = "0.5.0"
4
+ version = "0.6.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"
@@ -254,6 +254,7 @@ def get_arg_parser() -> argparse.ArgumentParser:
254
254
  )
255
255
 
256
256
  parser.add_argument("--version", action="version", version=f"%(prog)s {__version__}")
257
+ parser.add_argument("--dump-state-on-exit", action="store_true", help="Dump game state on exit")
257
258
 
258
259
  serve_group = parser.add_argument_group("Serve options")
259
260
  serve_group.add_argument("--serve", action="store_true", help="Serve the app through the browser")
@@ -277,9 +278,7 @@ def serve_app(host: str, port: int) -> None:
277
278
  server.Server(shlex.join(args), host=host, port=port).serve()
278
279
 
279
280
 
280
- def run_app(
281
- quiz_file: pathlib.Path,
282
- ) -> None:
281
+ def run_app(quiz_file: pathlib.Path, dump_state_on_exit: bool = False) -> None:
283
282
  """Run the app in the terminal.
284
283
 
285
284
  :param quizfile: File to use for this quiz
@@ -293,7 +292,8 @@ def run_app(
293
292
  try:
294
293
  app.run()
295
294
  finally:
296
- models.dump_config_if_not_finished(config)
295
+ if dump_state_on_exit:
296
+ models.dump_config_if_not_finished(config)
297
297
 
298
298
 
299
299
  def main() -> NoReturn:
@@ -303,5 +303,5 @@ def main() -> NoReturn:
303
303
  if namespace.serve:
304
304
  serve_app(namespace.host, namespace.port)
305
305
  else:
306
- run_app(namespace.quizfile)
306
+ run_app(namespace.quizfile, namespace.dump_state_on_exit)
307
307
  sys.exit(0)
@@ -840,7 +840,7 @@ wheels = [
840
840
 
841
841
  [[package]]
842
842
  name = "quizzy"
843
- version = "0.5.0"
843
+ version = "0.6.0"
844
844
  source = { editable = "." }
845
845
  dependencies = [
846
846
  { name = "pydantic" },
Binary file
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