You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactors the project to support building Anki decks for both Scouting America merit badges and Cub Scout Adventures, renaming the repository and codebase from `scout-merit-badges-anki` to `scout-anki`. It introduces a more flexible CLI, updates documentation and configuration, and adds a new processor for Cub Scout adventures. The changes streamline deck building, clarify usage, and enable the generation of multiple deck types.
Copy file name to clipboardExpand all lines: .github/copilot-instructions.md
+16-10Lines changed: 16 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
-
# Copilot Instructions for scout-merit-badges-anki
1
+
# Copilot Instructions for scout-anki
2
2
3
3
## Repository Overview
4
4
5
-
This is a Python CLI tool that generates Anki flashcard decks (.apkg files) for learning Scouting America merit badges by image. The tool processes local archive files (.zip, .tar.gz) containing merit badge data and images, maps badges to their corresponding images using sophisticated pattern matching, and creates structured Anki decks with stable IDs to prevent duplicates on reimport.
5
+
This is a Python CLI tool that generates Anki flashcard decks (.apkg files) for Scouting content. Supports learning Scouting America merit badges and Cub Scout adventures by image. The tool processes local archive files (.tar.gz) containing badge/adventure data and images, maps content to images using direct `image_filename` field mapping, and creates structured Anki decks with stable IDs to prevent duplicates on reimport.
6
6
7
7
**Repository Stats:**
8
8
- Language: Python 3.11+ (currently using 3.12)
@@ -59,7 +59,13 @@ make cov-report
59
59
uv run pytest --cov-report=html && open htmlcov/index.html
60
60
61
61
# Run CLI tool for testing
62
-
uv run scout-merit-badges-anki --help
62
+
uv run scout-anki --help
63
+
64
+
# Build merit badge deck
65
+
uv run scout-anki build merit-badges extracted/
66
+
67
+
# Build cub adventure deck
68
+
uv run scout-anki build cub-adventures extracted/
63
69
```
64
70
65
71
### Pre-commit Hooks (MANDATORY)
@@ -79,7 +85,7 @@ uv run pre-commit run --all-files
79
85
### Validation Commands
80
86
```bash
81
87
# Test CLI functionality (dry run - safe to run)
82
-
uv run scout-merit-badges-anki build --dry-run --quiet *.zip *.tar.gz
88
+
uv run scout-anki build --dry-run --quiet *.zip *.tar.gz
Generates an Anki deck for learning Scouting America merit badges by sight. The front of the card is an image of the merit badge. The back of the card is the name, description, and an indicator if it is required for the Eagle rank.
3
+
Anki deck builder for Scouting content. Generates Anki decks for learning Scouting America merit badges and Cub Scout adventures by sight. The front of the card is an image of the merit badge or adventure loop. The back of the card is the name, description, and additional details.
4
4
5
5
## Usage
6
6
@@ -9,87 +9,105 @@ Generates an Anki deck for learning Scouting America merit badges by sight. The
9
9
First, download and extract the scout-archive release files:
10
10
11
11
```bash
12
-
# Download and extract latest release archives
13
-
make fetch-and-build
12
+
# Download and extract latest release archives for merit badges
13
+
make fetch-and-build-merit-badges
14
+
15
+
# Download and extract latest release archives for cub adventures
16
+
make fetch-and-build-cub-adventures
17
+
18
+
# Build both deck types
19
+
make fetch-releases extract-archives build-all
14
20
```
15
21
16
-
This downloads archives, extracts them to `extracted/` directory, and creates `merit_badges_image_trainer.apkg` that can be imported into Anki.
22
+
This downloads archives, extracts them to `extracted/` directory, and creates `.apkg` files that can be imported into Anki.
-**Back**: Adventure name, rank, type, and description
86
104
87
105
## Development
88
106
89
107
To contribute to this tool, first checkout the code. Then set up the development environment:
90
108
91
109
```bash
92
-
cd scout-merit-badges-anki
110
+
cd scout-anki
93
111
uv sync
94
112
```
95
113
@@ -107,22 +125,6 @@ To run the tests:
107
125
make test
108
126
```
109
127
110
-
### Development Commands
111
-
112
-
```bash
113
-
make setup-pre-commit # Install pre-commit hooks (REQUIRED)
114
-
make fmt # Format code with ruff and fix linting issues
115
-
make lint # Lint code with ruff (check only, no fixes)
116
-
make check-all # Run all pre-commit hooks on all files
117
-
make test# Run tests (8 focused tests)
118
-
make test-no-cov # Run tests without coverage (faster for development)
119
-
make fetch-releases # Download scout-archive releases using gh CLI
120
-
make extract-archives # Extract downloaded archives to extracted/ directory
121
-
make build-deck # Build Anki deck from extracted directory
122
-
make fetch-and-build # Fetch, extract, and build deck in one command
123
-
make clean # Clean temporary files
124
-
```
125
-
126
128
## Data Source
127
129
128
-
This tool works with releases from the [scout-archive](https://github.com/dasevilla/scout-archive) repository, which contains merit badge data and images updated roughly weekly.
130
+
This tool is built using data from the [scout-archive](https://github.com/dasevilla/scout-archive) repository, which is updated roughly weekly.
0 commit comments