Seperating Anki and Anki source code build

I am trying to play around with the anki source code. In parallel I am using anki, for studies. What file will I have to change to separate decks from the “real” anki, and the experimental version? I think that anki decks are stored in the Anki2 folder (I may be wrong), so I would like to change the folder the Anki source build uses (lets say naming it “anki_source2”)?

There’s no need to create a separate Anki2 folder. Just create a separate Anki profile for development. Each profile has its own collection, so your decks will be separated.

You can pass the arguments “-p [profile name]” when starting Anki to load a specific profile: Mixing Development and Study

3 Likes

Thanks. For learning purposes though, where can I find the specific line that allows a seperate folder to be created?

I am trying to edit the anki source code build to store its data in a folder named something else than Anki2. What file would I have to change to archive that?

You don’t need to change the source. Pass the folder name to the -b command line flag:

anki -b ankidata

See Managing Files - Anki Manual

7 Likes

I would like to know how to change the source, within the source code.

You can modify the _defaultBase function (not sure why you want to do that, though).

4 Likes

This was helpful for me for separating dev from user anki. Only switching the profile as described above Seperating Anki and Anki source code build - #2 by kleinerpirat still shared the addon21 folder - which is problematic when developing addons.

Indeed. I use the -b option very frequently in almost every add-on I test/develop to keep things isolated.

4 Likes