#deck header in text files

Hi, is this a bug?

To ease importing text based decks:

When using #deck:test,
it does not create the deck if it is missing,
but adds the cards to the previous selected deck.

It only works if the deck is already present,
it does not create a new one from scratch.

Same for #deck:test::test2

Thank you for your attention!

As documented, the deck file-header can be used to create the cards in an existing deck. So, no – it does not appear to be a bug.

1 Like

If the deck does not exist, a deck with the given name will be created.

I am not completely sure though as the manual gives conflicting information in this section (I’ll update it when I can). But pretty sure that this was either supported before/or is supported in a newer version of Anki.

Are you using the latest 24.06.03 version? You can download that from apps.ankiweb.net and check again.

Sorry, this was about deck column and not header.

so i also got confused with deck column info.

But i am still wondering,
the #deck header should create a the deck if not present.

Why would there be a deck header at all, otherwise.

What do you think?

Thank you for time and quick responses!

If you look at the table, the table is calling the keys “deck column”, “guid column”, etc. And then it says,

Some headers have further implications

and goes on to explain the columns. But, notice that there’s no GUID header. There’s only a GUID column. And the columns aren’t file headers so seems like we’ve got things mixed up in the manual.

Okay no, I got confused again. There is a File header called GUID column but there’s also something called the GUID column.

You are probably supposed to create the deck first by yourself. I have never used text files for import/export so not sure how much that makes sense.

:smile:

it actually should always create the deck, if the deck or deck column header is given. This seems more like the expected behavior. If it does not exist in the first place.

I am using the text imports, because i want to simplify importing my GPT generated flashcards. One text file contains all the flashcards for one topic (deck).

Can i bring this up somewhere? This should be an easy fix, right?

I think you need a deck column header and a deck column with the deck names for each note. That would create a deck for you but not a deck header. You are using GPT so should be easy (Again, I don’t use .txt so could be wrong).

Feature requests go to Suggestions.

1 Like

You’ve brought it up just fine right here. You don’t need to create a separate post in Suggestions.

The #deck header works just like the GUI deck selector, which also requires an existing deck.
While it could create the deck for you, this is slightly complicated by the fact that Anki doesn’t know if the value is supposed to be a deck name or ID.
As was pointed out above, you can use the deck column to create new decks, so I think there is not much value in changing the existing behaviour.

1 Like

Thank you all for your answers!

I’m a bit confused about what the GUI deck selector is—sorry about that.

Therefore, the following might stem from my ignorance:

I would think that the #deck and #deck columns behave the same way:
Both, when used, look for an existing deck name or an existing deck ID to add the notes to.
If nothing is found, they assume that what is associated with the deck headers is a name (not an ID) and create a deck with that name.

This would lead, in some cases with misspelled IDs, to decks being created with IDs as names, but still, the behavior is as expected and easy to understand and fix.

I also agree that this topic is a minor problem and that Anki is great as it is.

Thank you for your attention!

(GUI = Graphical User Interface)

Rumo is talking of the option you get in the text file import screen in Anki.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.