diff --git a/anki_exporter.py b/anki_exporter.py index 20a2650..57a5df7 100644 --- a/anki_exporter.py +++ b/anki_exporter.py @@ -23,9 +23,9 @@ def compile_anki_package(records, output_path, deck_name): Resolves voice models dynamically by gender selection parameters and applies global speed coefficient rates from the active configurations. """ - # Bumping IDs to completely clear any remaining local cache - model_id = 1684329050 - deck_id = 1684329050 + # Incremented IDs to force a fresh schema mapping without legacy 'Notes' fields + model_id = 1684329060 + deck_id = 1684329060 # Global Configuration Pace Resolver Mapping settings = database.load_all_settings() or {} @@ -44,7 +44,6 @@ def compile_anki_package(records, output_path, deck_name): fields=[ {'name': 'EnglishText'}, {'name': 'SpanishText'}, - {'name': 'Notes'}, {'name': 'AnkiNotes'}, {'name': 'EnglishAudio'}, {'name': 'SpanishAudio'} @@ -57,7 +56,6 @@ def compile_anki_package(records, output_path, deck_name): '
{{EnglishAudio}}
', 'afmt': '{{FrontSide}}
' '
{{SpanishText}}

' - '
{{Notes}}
' '{{#AnkiNotes}}
Anki Meta: {{{AnkiNotes}}}
{{/AnkiNotes}}
' '
{{SpanishAudio}}
', }, @@ -68,7 +66,6 @@ def compile_anki_package(records, output_path, deck_name): '
{{SpanishAudio}}
', 'afmt': '{{FrontSide}}
' '
{{EnglishText}}

' - '
{{Notes}}
' '{{#AnkiNotes}}
Anki Meta: {{{AnkiNotes}}}
{{/AnkiNotes}}
' '
{{EnglishAudio}}
', } @@ -97,16 +94,7 @@ def compile_anki_package(records, output_path, deck_name): raw_tags = record.get("tags") or "" note_tags = [t.strip().replace(" ", "_") for t in raw_tags.split(",") if t.strip()] - # Dynamic HTML Notes Mapping Builder - notes_html_parts = [] - if record.get('notes') and record['notes'].strip(): - notes_html_parts.append(f"
{record['notes'].strip()}
") - if record.get('source_context') and record['source_context'].strip(): - notes_html_parts.append(f"
Context: {record['source_context'].strip()}
") - - notes_html = "".join(notes_html_parts) - - # Safely isolate the raw text data string down to Anki + # Safely isolate the raw text/HTML data string down to Anki notes field anki_notes_html = record['anki_notes'].strip() if record.get('anki_notes') else "" # Standard Unique Media Filenames @@ -130,9 +118,10 @@ def compile_anki_package(records, output_path, deck_name): else: es_audio_field = "" + # Clean sequential matching fields array matching schema mapping above note = genanki.Note( model=anki_model, - fields=[en_text, es_text, notes_html, anki_notes_html, en_audio_field, es_audio_field], + fields=[en_text, es_text, anki_notes_html, en_audio_field, es_audio_field], tags=note_tags ) deck.add_note(note) diff --git a/spanish_trainer.db b/spanish_trainer.db index 7dc33ea..f2aef98 100644 Binary files a/spanish_trainer.db and b/spanish_trainer.db differ