Skip to content

Fix Git import for nested export folders#252

Open
cnra wants to merge 1 commit into
Stvad:masterfrom
cnra:fix-nested-deck-import
Open

Fix Git import for nested export folders#252
cnra wants to merge 1 commit into
Stvad:masterfrom
cnra:fix-nested-deck-import

Conversation

@cnra

@cnra cnra commented May 14, 2026

Copy link
Copy Markdown

Hi, first of all, thanks for this great addon. It helps a lot!

I ran into a small problem:

I had an Anki deck named cryllic for learning the Cyrillic alphabet and tried using it with CrowdAnki. I exported it, but I chose to export it into a custom folder named anki-cryllic, since that seemed more suitable for GitHub usage with a clearer name.

The exporter created an additional nested folder named cryllic inside the anki-cryllic directory. I then pushed this structure to GitHub in this repository:

https://github.com/cnra/anki-cryllic

Then I tried to import it from GitHub. However, the import failed because deck.json was not found. The file was not at the root of the repository checkout, but inside the nested folder.

I inspected the code and saw that nested directories were already considered, but only under the assumption that the nested folder name is the same as the root folder name. In this example, it was not.

This fix makes the import logic more general: it now finds deck.json wherever it exists inside the nested export directory.

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.

1 participant