Skip to content

Allow cards to be formatted #88

Draft
FineFindus wants to merge 2 commits into
wbernard:mainfrom
FineFindus:feat/deck-markup
Draft

Allow cards to be formatted #88
FineFindus wants to merge 2 commits into
wbernard:mainfrom
FineFindus:feat/deck-markup

Conversation

@FineFindus

Copy link
Copy Markdown

Often times anki cards contain formatting (to e.g. highlight something), this enables the formatting, by converting the anki formatting to pango markup.

Card with formatted text

@bertob

bertob commented Mar 5, 2025

Copy link
Copy Markdown
Collaborator

I haven't tried it yet but just for context, why is this marked as a draft?

Anki files can be exported as Deck packages`.apkg`. These contain the
anki2 file itself, alongside all the media included in the deck. As
they are renamed zipfiles, we can simply extract the `collection.anki2`
and import it normally.

Ref: https://docs.ankiweb.net/exporting.html#deck-apkg
@FineFindus

Copy link
Copy Markdown
Author

There are some issue when the formatting isn't valid pango formatting (between weird symbols and crashing) and I haven't had the time to check for more possible edge cases and fix them.
I also didn't want to build up even more PRs :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants