ankinotes working except an }
This commit is contained in:
parent
2390a6c738
commit
1cd6f62adc
2 changed files with 8 additions and 6 deletions
|
|
@ -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.
|
||||
"""
|
||||
# Incrementing both forces a completely clean slate for both layout and deck container
|
||||
model_id = 1684329015
|
||||
deck_id = 1684329015
|
||||
# Bumping IDs to completely clear any remaining local cache
|
||||
model_id = 1684329050
|
||||
deck_id = 1684329050
|
||||
|
||||
# Global Configuration Pace Resolver Mapping
|
||||
settings = database.load_all_settings() or {}
|
||||
|
|
@ -58,7 +58,7 @@ def compile_anki_package(records, output_path, deck_name):
|
|||
'afmt': '{{FrontSide}}<hr id="answer">'
|
||||
'<div style="font-family: Arial; font-size: 28px; text-align: center; color: #2980B9; font-weight: bold;">{{SpanishText}}</div><br>'
|
||||
'<div style="font-family: Arial; font-size: 14px; text-align: center; color: #34495E;">{{Notes}}</div>'
|
||||
'{{#AnkiNotes}}<div style="font-family: Arial; font-size: 13px; text-align: center; color: #8E44AD; border-top: 1px dashed #E5E7E9; padding-top: 6px; margin-top: 6px;"><b>Anki Meta:</b> {{AnkiNotes}}</div>{{/AnkiNotes}}<br>'
|
||||
'{{#AnkiNotes}}<div style="font-family: Arial; font-size: 13px; text-align: center; color: #8E44AD; border-top: 1px dashed #E5E7E9; padding-top: 6px; margin-top: 6px;"><b>Anki Meta:</b> {{{AnkiNotes}}}</div>{{/AnkiNotes}}<br>'
|
||||
'<div style="text-align: center;">{{SpanishAudio}}</div>',
|
||||
},
|
||||
{
|
||||
|
|
@ -69,7 +69,7 @@ def compile_anki_package(records, output_path, deck_name):
|
|||
'afmt': '{{FrontSide}}<hr id="answer">'
|
||||
'<div style="font-family: Arial; font-size: 22px; text-align: center; color: #2C3E50; font-weight: 500;">{{EnglishText}}</div><br>'
|
||||
'<div style="font-family: Arial; font-size: 14px; text-align: center; color: #34495E;">{{Notes}}</div>'
|
||||
'{{#AnkiNotes}}<div style="font-family: Arial; font-size: 13px; text-align: center; color: #8E44AD; border-top: 1px dashed #E5E7E9; padding-top: 6px; margin-top: 6px;"><b>Anki Meta:</b> {{AnkiNotes}}</div>{{/AnkiNotes}}<br>'
|
||||
'{{#AnkiNotes}}<div style="font-family: Arial; font-size: 13px; text-align: center; color: #8E44AD; border-top: 1px dashed #E5E7E9; padding-top: 6px; margin-top: 6px;"><b>Anki Meta:</b> {{{AnkiNotes}}}</div>{{/AnkiNotes}}<br>'
|
||||
'<div style="text-align: center;">{{EnglishAudio}}</div>',
|
||||
}
|
||||
]
|
||||
|
|
@ -105,7 +105,9 @@ def compile_anki_package(records, output_path, deck_name):
|
|||
notes_html_parts.append(f"<div style='font-size: 12px; color: #95A5A6; font-style: italic;'>Context: {record['source_context'].strip()}</div>")
|
||||
|
||||
notes_html = "".join(notes_html_parts)
|
||||
anki_notes_html = f"<div>{record['anki_notes'].strip()}</div>" if record.get('anki_notes') else ""
|
||||
|
||||
# Safely isolate the raw text data string down to Anki
|
||||
anki_notes_html = record['anki_notes'].strip() if record.get('anki_notes') else ""
|
||||
|
||||
# Standard Unique Media Filenames
|
||||
en_audio_filename = f"edge_en_{idx}_{model_id}.mp3"
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Reference in a new issue