From 4da89eb38eee3137a1b6912ce79f7d05113d0826 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Tue, 28 Jan 2020 07:53:55 +1000 Subject: [PATCH] better help link for blank cards --- pylib/anki/template.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pylib/anki/template.py b/pylib/anki/template.py index cee9b2d94..cfb5ae6d5 100644 --- a/pylib/anki/template.py +++ b/pylib/anki/template.py @@ -34,13 +34,16 @@ from typing import Any, Dict, List, Optional, Tuple import anki from anki import hooks from anki.cards import Card -from anki.consts import HELP_SITE from anki.lang import _ from anki.models import NoteType from anki.notes import Note from anki.rsbackend import TemplateReplacementList from anki.sound import AVTag +CARD_BLANK_HELP = ( + "https://anki.tenderapp.com/kb/card-appearance/the-front-of-this-card-is-blank" +) + class TemplateRenderContext: """Holds information for the duration of one card render. @@ -129,7 +132,8 @@ def render_card( if not output.question_text.strip(): msg = _("The front of this card is blank.") help = _("More info") - msg += f"{help}" + helplink = CARD_BLANK_HELP + msg += f"
{help}" output.question_text = msg hooks.card_did_render(output, ctx)