Skip to content
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

use a saner, cleaner and standard default linux conf file storage location #49

Closed
wants to merge 1 commit into from

Conversation

vaab
Copy link

@vaab vaab commented Nov 11, 2013

Hi, thanks a lot for Anki ! Learning Chinese with anki support !

I'm a linux user, and well, I tidy my computer often and don't like to see that "Anki" stores its stuff by default in ~/Anki. There's a widely used standards in linux world which is to use dotted files name to avoid clutering the home user directory with millions of subfolders. And BTW, use of uppercases is usually avoided. So I changed it to "~/.anki".

So, please consider my small contribution to this marvellous piece of code. It should'nt break existing installation neither. I'm open to all comments !

I'm aware that there is a -b option, but its is not very convenient to edit all the hidden shortcuts in Ubuntu ".desktop" files. And, well it's not working for me, and even if it was, I don't want to do this after any updates. I felt that this change was legitimate as all other package are using this convention. I'm ready to hear you on this topic if you think otherwise.

Thanks for reading !

…ation for anki, without breaking existing installs.
@dae
Copy link
Member

dae commented Nov 11, 2013

Please see the user manual for an explanation of why Anki does not use a
dot file. In a future development round I may move the default to
~/Documents/Anki, but I'm afraid a dot file is unlikely to be used.

On Mon, Nov 11, 2013 at 10:57 AM, Valentin Lab notifications@github.comwrote:

Hi, thanks a lot for Anki ! Learning Chinese with anki support !

I'm a linux user, and well, I tidy my computer often and don't like to see
that "Anki" stores its stuff by default in /Anki. There's a widely used
standards in linux world which is to use dotted files name to avoid
clutering the home user directory with millions of subfolders. And BTW, use
of uppercases is usually avoided. So I changed it to "
/.anki".

So, please consider my small contribution to this marvellous piece of
code. It should'nt break existing installation neither. I'm open to all
comments !

I'm aware that there is a -b option, but its is not very convenient to
edit all the hidden shortcuts in Ubuntu ".desktop" files. And, well it's
not working for me, and even if it was, I don't want to do this after any
updates. I felt that this change was legitimate as all other package are
using this convention. I'm ready to hear you on this topic if you think
otherwise.

Thanks for reading !

You can merge this Pull Request by running

git pull https://github.com/vaab/anki master

Or view, comment on, or merge it at:

#49
Commit Summary

  • use a saner, cleaner and standard default linux conf file storage
    location for anki, without breaking existing installs.

File Changes

Patch Links:

@vaab
Copy link
Author

vaab commented Nov 12, 2013

Thanks for the answer, a link to the manual where you explain why this is not a solution for you would have been appreciated. I didn't see it despite me actively trying to find ways to get over it (hence the link to the manual about the -b option). For other users, this is the link that I finally found: http://ankisrs.net/docs/manual.html#file-locations

And this is the specific about this topic:

On Unix systems, Anki deliberately uses ~/Anki rather than a hidden folder. The bulk of the data stored in that folder is important user data rather than easily restored preferences, and it would be a disaster if a user lost it because they overlooked it when backing up files. There are also more and more Linux users who are not familiar with hidden folders. If you’re an advanced user, you can specify a custom folder with a command line argument, described in the next section.

I don't see the actual solution as satisfactory. I have plenty of software on my computer, and Anki is the only one sticking in front of my nose it's folder AND that don't give me an easy way to definitively move it around. I think I wouldn't complain if you used a way for moving it around without having to edit some distribution provided files (I'm thinking of the binary /usr/bin/anki, or the *.desktop files). For example a gconf entry, or a small configuration file ~/.ankirc that would only offer an option to change anki's folder, this would be enough for me (BTW, this is what does firefox and thunderbird).

It's not because some people are messing around with standard that you should do it yourself, or at least give what you feel like are your advanced users a simple way to change this.

And the command line option you provide is not satisfactory. It's only usefull for temporary tests or special usages. Look for example at firefox / thunderbird : they do provide a way to change where their profile folder is located, and BTW, by default, the profile data is located in a "hidden" dot file directory. Actually, I'm not able to name an application that is storing its data outside a dotted file (except for Ubuntu One and Dropbox, but they are actually not showing their application data but a very special directory).

A very large number of configuration data is stored in dotted files/directory nowadays in all distribution I know about, only a few are not (and I can't name them, cause I don't know about them). I don't feel neither that you are making things easier for new linux user by breaking a well established convention and making an exception for your software.

I'm so happy NOT TO have a "Skype", "XMame", "WorldOfGoo", "Transmission", "Thunderbird", "teamviewer", "SpiderOak", "PlayOnLinux", "OpenOffice", "Opera", "Mozilla", "Minecraft", "Mathematica", "Macromedia", "Java", "Inkscape", "GoogleEarth", "Eclipse", "Azureus", "Adobe"... directories in my actual ~/. These are all dotted in any linux distribution. And you'll notice this is a small selection of more than 300 dotted files and directory I currently have in my home folder (against 10 not dotted directories that are not related to an application). I've selected these because a lot of them are not Linux specific, and not for linux guru user only, nor they are all very old and unused softwares, but these are very common softs used by common "basic" linux users nowadays. Lot of them have to be archived also from time to time and contains very important data (mail of POP accounts for thunderbird, bookmarks in Opera and Firefox, Worlds in Minecraft, whole windows programs for wine ...), nevertheless all the companies behind these softwares have chosen not to break the linux convention. This is why I was under the impression that your choice spun out from not knowing enough the linux conventions.

Don't forget that ~ is the home directory: for most basic level linux user, as a starting point, this is the folder they'll open the most often, and I don't think you are helping them by making a mess of it. And even if I'm aware that there are some user that don't care about their home folderbeing a mess, there are actually a lot of them who actually cares.

Anyway, thank you for your answer. At least you have stated your position, and me mine ;) . I can afford rebasing this patch from time to time ;)

@jaseg
Copy link

jaseg commented Feb 10, 2014

We could solve this by using ~/.anki by default, but by default creating ~/.anki as a symlink to ~/Anki. In this case you could just do $ rm ~/.anki && mv ~/Anki ~/.anki to hide the folder.
[edit] Though, probably the nicest solution is to just try ~/Anki and ~/.anki. If the user wants, she can hide ~/Anki by moving it to ~/.anki, but the default still is the visible folder. [/edit]
[edit2] I think it would be perfectly sensible, though, to hide this folder by default. Users forgetting about hidden folders on backup will also forget about all their firefox profiles, chat logs and emails. [/edit2]

@dae
Copy link
Member

dae commented Feb 10, 2014

Please avoid creating discussions in multiple places at once.

@dae dae closed this Feb 10, 2014
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.

3 participants