summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cli-project/flashcard_cli.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/cli-project/flashcard_cli.py b/cli-project/flashcard_cli.py
index 64a26b2..bb2847f 100644
--- a/cli-project/flashcard_cli.py
+++ b/cli-project/flashcard_cli.py
@@ -7,8 +7,8 @@ from flashcards import Session, SCHEDULERS
def cli():
pass
-def displayCard(card, index: int, prompt_mode: str) -> None:
- click.echo(click.style(f"{index + 1} ===========================================================", fg="blue"))
+def displayCard(card, index: int, count: int, prompt_mode: str) -> None:
+ click.echo(click.style(f"{index + 1}/{count} ===========================================================", fg="blue"))
match prompt_mode:
case "front":
@@ -38,7 +38,7 @@ def practice(state_file, card_files, scheduler_name, count, prompt):
session = Session(scheduler_name, card_files, state_file)
for i, card in enumerate(session.practice(count)):
- displayCard(card, i, prompt)
+ displayCard(card, i, count, prompt)
@cli.command()
@click.argument("state_file", nargs=1, type=click.Path())
@@ -53,7 +53,7 @@ def test(state_file, card_files, scheduler_name, count, prompt):
session = Session(scheduler_name, card_files, state_file)
for i, (card, correct) in enumerate(session.test(count)):
- displayCard(card, i, prompt)
+ displayCard(card, i, count, prompt)
correct(click.confirm(click.style("Correct?", bold=True)))
if __name__ == '__main__':