New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow a saner, cleaner and standard default linux conf file storage location #58
Conversation
Didn't Anki 1.0 use Having said that, If we actually want to go with standards, then I'd highly suggest the XDG Base Directory Specification, which is widely adopted by Debian, Ubuntu, and most other modern *nix systems. This would place the config in The big advantage of using the XDG standard is that operating systems and users can specify how they'd like files stored. It makes it much easier to produce portable apps, which can run on a USB key (you set your XDG root to the USB key, and you're done!). And if you do a |
As I said in the previous PR, I am considering moving to Documents/Anki to bring it in line with other platforms, but will not use a dotfile as there are too many Linux users who aren't familiar with them and risk failing to back up their data. If you want to use ~/.anki or some other path on a USB stick, that is what the -b option is for. |
Keeping things simple is nice but the extra clutter is a tradeoff. What use case are you describing that isn't covered by the auto-backup and sync? ( |
There was more than one case in Anki 1 where users moved their files to On Mon, Feb 10, 2014 at 9:16 PM, porcoesphino notifications@github.comwrote:
|
Do many people actually use Documents/ and would look into it already? And if Documents/ is separate from Pictures/ and Music/, isn't it for word processor output? |
On 02/11/2014 07:09 PM, aleksejrs wrote:
|
I completely agree with vaab in the referenced PR. Hard coding either ~/Anki or ~/Documents/Anki is unnecessary. There's already a well established convention here, but this should still be left for a user to specify. |
@dae how about an environment variable to customize the location, rather than a command-line option? |
I have no fundamental objections to that, but does it really buy you much over a command line flag? |
It would help me a fair bit. I don't use the command-line flag right now as it's annoying to configure the mac Spotlight to use it (not sure how to do that) which applies similarly to running programs in other OSes. Nearly all of the data/config for the programs I use is gathered into consistent places (following the XDG standards - XDG_CONFIG_HOME, XDG_DATA_HOME, etc) on mac and Linux, in part using a bunch of environment variable flags to set the location for mac programs which don't recognize the XDG variables. It makes switching back and forth between Linux and mac much easier. Anki's data is symlinked into a same place, but that symlink is more of a hassle than an environment variable and as we saw the Documents location messed with things on mac recently... |
I've added it to the dev code. |
nvm the below, looks like this is the commit: 88d8be3 ANKI_BASE is the env variable.
|
As discussed in PR #49, allow
~/.anki
to be used as a configuration directory without changing the default. Though I still think PR #49 would be the better solution.