rexstout / abcde

Automatically exported from code.google.com/p/abcde
GNU General Public License v2.0
0 stars 0 forks source link

Use XDG Base Dirs spec #90

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
abcde uses ~/.abcde.conf and ~/.cddb/ by default currently.

I would like to see it use the XDG Base Dirs spec 
(http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html) by 
default. XDG Base Dirs has built in flexibility, but the defaults include 
~/.config/$appname and ~/.cache/$appname

An increasing number of programs use these, it cleans up a lot of home dir 
clutter, puts configs together, puts deleteable cache in one place, and allows 
users to override locations for all programs that use it at once.

Original issue reported on code.google.com by Kelly.Clowers on 2 Apr 2013 at 4:49

GoogleCodeExporter commented 9 years ago
Interesting, although a patch to support such a large change would be nice :).

Original comment by and...@andrews-corner.org on 8 Apr 2013 at 1:58

GoogleCodeExporter commented 9 years ago
I am not much of a programmer, but I will see what I can do.

Original comment by Kelly.Clowers on 8 Apr 2013 at 2:35

GoogleCodeExporter commented 9 years ago
Just in case they're of interest, there are a couple of workarounds in lieu of 
patched versions: 

  - XDG_CONFIG_HOME can be respected by passing the '-c' flag to abcde when it's run (e.g. in an alias).
  - XDG_CACHE_HOME can be respected via assigning an appropriate path to WAVOUTPUTDIR.

As far as making this default behaviour goes... 

In addition to the patch in issue 112, to this end I attempted to make some 
changes to respect XDG_CACHE_HOME. The intent was to make this the default 
destination for intermediate WAVs and this patch does achieve that.

There are some issues:

  - I'm not sure the XDG specs should apply to OSX so I've retained existing behaviour (current directory)
  - KEEPWAVS=y should probably put the WAVs somewhere else by default (XDG_DATA_HOME or leave it as the current directory). However, this is awkward due to the way the configuration options are applied, so I left it alone.
  - !Pedantry alert! I think the "abcde." prefix on the temp directories is a bit redundant when they're in an "abcde" subdirectory, but for simplicity I left it as-is. This script *really* doesn't need more code.

Original comment by ajcc...@gmail.com on 24 Oct 2014 at 6:32

Attachments: