kahoot-to-anki 1.2.0__py3-none-any.whl → 1.2.1__py3-none-any.whl

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 +1 @@
1
- __version__ = "1.2.0"
1
+ __version__ = "1.2.1"
@@ -3,6 +3,7 @@ import logging
3
3
  import os
4
4
  import glob
5
5
  from typing import Iterator, Optional
6
+ import html
6
7
 
7
8
  # Third-party library imports
8
9
  import genanki
@@ -89,6 +90,9 @@ def df_processing(data: pd.DataFrame) -> pd.DataFrame:
89
90
  # delete duplicated questions
90
91
  data = data.drop_duplicates(subset=["Question Number"])
91
92
  data = data.fillna("")
93
+
94
+ # HTML-encode special chars
95
+ data = data.apply(lambda col: col.map(lambda x: html.escape(x) if isinstance(x, str) else x))
92
96
 
93
97
  data["Possible Answers"] = data[
94
98
  ["Answer 1", "Answer 2", "Answer 3", "Answer 4", "Answer 5", "Answer 6"]
@@ -96,7 +100,7 @@ def df_processing(data: pd.DataFrame) -> pd.DataFrame:
96
100
 
97
101
  # keep only needed columns
98
102
  data = data[["Question", "Possible Answers", "Correct Answers"]]
99
-
103
+
100
104
  return data
101
105
 
102
106
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kahoot-to-anki
3
- Version: 1.2.0
3
+ Version: 1.2.1
4
4
  Summary: CLI tool to convert Kahoot quiz reports into Anki flashcards
5
5
  Author: Simon Hardmeier
6
6
  License-Expression: MIT
@@ -15,10 +15,11 @@ Dynamic: license-file
15
15
  # kahoot-to-anki
16
16
  [![Python](https://img.shields.io/badge/python-3.9+-blue.svg)](#installation)
17
17
  [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
18
+ ![PyPI](https://img.shields.io/pypi/v/kahoot-to-anki.svg)
18
19
 
19
20
  <br>
20
21
 
21
- **kahoot-to-anki** is a commandline tool that converts exported Kahoot quiz reports (Excel Files) into Anki flashcard decks (.apkg format).<br>
22
+ **kahoot-to-anki** is a command-line tool that converts exported Kahoot quiz reports (`.xlsx` files) into Anki flashcard decks (`.apkg` format).<br>
22
23
  Designed for educators, students, and any self-learners to easily turn quiz results into effective spaced‑repetition decks.
23
24
 
24
25
  ## Installation & Usage
@@ -36,6 +37,9 @@ kahoot-to-anki --inp "./exports" --out "./data" --csv
36
37
  ```
37
38
 
38
39
  ### Option 2: Run with Docker
40
+ You can run **kahoot-to-anki** in a Docker container in three ways:
41
+
42
+ #### A) Build Image from Source Code (Clone Repo)
39
43
  ```
40
44
  # Clone Repository
41
45
  git clone https://github.com/SimonHRD/kahoot-to-anki.git
@@ -50,12 +54,54 @@ docker build -t kahoot-to-anki .
50
54
  docker run --rm kahoot-to-anki --help
51
55
 
52
56
  # Run with local data
53
- docker run --rm -v "$(pwd)/data:/app/data" kahoot-to-anki --out "./data" --csv
57
+ docker run --rm -v "$(pwd)/data:/app/data" kahoot-to-anki \
58
+ --inp "./data" --out "./data" --csv
54
59
  ```
55
60
 
56
61
  On PowerShell:
57
62
  ```
58
- docker run --rm -v ${PWD}\data:/app/data kahoot-to-anki --out "./data" --csv
63
+ docker run --rm -v ${PWD}\data:/app/data kahoot-to-anki \
64
+ --inp "./data" --out "./data" --csv
65
+ ```
66
+
67
+ #### B) Use a Minimal Dockerfile That Installs from PyPI
68
+ It is not needed to clone the repository, you can just create a minimal Dockerfile:
69
+ ```Dockerfile
70
+ FROM python:3.13-slim
71
+
72
+ WORKDIR /app
73
+ RUN pip install kahoot-to-anki
74
+ ENTRYPOINT ["kahoot-to-anki"]
75
+ ```
76
+ Then run:
77
+ ```bash
78
+ # Build the image
79
+ docker build -t kahoot-to-anki-pypi .
80
+
81
+ # Run the tool
82
+ docker run --rm -v "$(pwd)/data:/app/data" kahoot-to-anki-pypi \
83
+ --inp "./data" --out "./data" --csv
84
+ ```
85
+
86
+ On PowerShell:
87
+ ```
88
+ docker run --rm -v ${PWD}\data:/app/data kahoot-to-anki-pypi \
89
+ --inp "./data" --out "./data" --csv
90
+ ```
91
+
92
+ #### C) Run Without a Dockerfile (Install from PyPI at Runtime)
93
+ If you want to avoid writing a Dockerfile, just run the CLI directly from a fresh Python container. This method downloads everything at runtime in a temporary container. No files or installed packages will persist after the container exits.
94
+
95
+ ```bash
96
+ docker run --rm -v "$(pwd)/data:/app/data" python:3.13-slim \
97
+ sh -c "pip install kahoot-to-anki && kahoot-to-anki --out ./data --csv"
98
+ ```
99
+
100
+ On PowerShell:
101
+ ```
102
+ docker run --rm -v ${PWD}\data:/app/data python:3.13-slim `
103
+ sh -c "pip install kahoot-to-anki && kahoot-to-anki --out ./data --csv"
104
+
59
105
  ```
60
106
 
61
107
  ## CLI Arguments
@@ -0,0 +1,13 @@
1
+ kahoot_to_anki/__init__.py,sha256=aFv1WGaOhOg9bRuL25OuA7ozD3PSckRRpjaC84FZ7uo,21
2
+ kahoot_to_anki/cli.py,sha256=2tRiIcnbcrPXVPQ8mdeUOHXYP3LO9ExNfp3Uy1FSaFk,4484
3
+ kahoot_to_anki/main.py,sha256=oVmOLqXUnzy1Q0Xnn4Dzr65bFf8Jaw4vYRwvDTSd_ro,936
4
+ kahoot_to_anki/processing.py,sha256=lH2ZXZ3Q5lMYRdeqgXUHF9tlEjjPwzgcoZMwUP7C1DA,4501
5
+ kahoot_to_anki-1.2.1.dist-info/licenses/LICENSE,sha256=HxPBlT4sSfEgRBrX0jZd8WTfM0c31VFgnLaCEWzGMZc,1122
6
+ tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
+ tests/test_cli.py,sha256=SL1WEJoA59-G7hRdWg5wOUyCPrjzZvsgPJxAZMPXpWg,3195
8
+ tests/test_processing.py,sha256=swLG2gkcwWm1ZG0T5u6izlhV-2AIsaMKdg174jp3za8,10951
9
+ kahoot_to_anki-1.2.1.dist-info/METADATA,sha256=md7jcX16XeQ_pYebAG2DfMHkxzSXqbcRXpTAR7RFWFo,4409
10
+ kahoot_to_anki-1.2.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
11
+ kahoot_to_anki-1.2.1.dist-info/entry_points.txt,sha256=VqCk_PPVpGFgnGCBIlEnz8Y0qUqYV8J2tYNZZa8IRWA,60
12
+ kahoot_to_anki-1.2.1.dist-info/top_level.txt,sha256=aTMCk83rMZjWFZ556EHLIxVOgEawIWsMZzRpR3IPQ1w,21
13
+ kahoot_to_anki-1.2.1.dist-info/RECORD,,
@@ -1,13 +0,0 @@
1
- kahoot_to_anki/__init__.py,sha256=Btl_98iBIXFtvGx47MqpfbaEVYoOMPBQn9bao7UASkQ,21
2
- kahoot_to_anki/cli.py,sha256=2tRiIcnbcrPXVPQ8mdeUOHXYP3LO9ExNfp3Uy1FSaFk,4484
3
- kahoot_to_anki/main.py,sha256=oVmOLqXUnzy1Q0Xnn4Dzr65bFf8Jaw4vYRwvDTSd_ro,936
4
- kahoot_to_anki/processing.py,sha256=Ku8nFhgWpprmYWdLL6f-T8P7J_SmMuQD2NLVCQQErCs,4346
5
- kahoot_to_anki-1.2.0.dist-info/licenses/LICENSE,sha256=HxPBlT4sSfEgRBrX0jZd8WTfM0c31VFgnLaCEWzGMZc,1122
6
- tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
- tests/test_cli.py,sha256=SL1WEJoA59-G7hRdWg5wOUyCPrjzZvsgPJxAZMPXpWg,3195
8
- tests/test_processing.py,sha256=swLG2gkcwWm1ZG0T5u6izlhV-2AIsaMKdg174jp3za8,10951
9
- kahoot_to_anki-1.2.0.dist-info/METADATA,sha256=I8iBo7bvvBQMyMticSKPHsILRASFMaB0VRi45EWhv3E,2953
10
- kahoot_to_anki-1.2.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
11
- kahoot_to_anki-1.2.0.dist-info/entry_points.txt,sha256=VqCk_PPVpGFgnGCBIlEnz8Y0qUqYV8J2tYNZZa8IRWA,60
12
- kahoot_to_anki-1.2.0.dist-info/top_level.txt,sha256=aTMCk83rMZjWFZ556EHLIxVOgEawIWsMZzRpR3IPQ1w,21
13
- kahoot_to_anki-1.2.0.dist-info/RECORD,,