PierrotAWB / simple-fc

GNU General Public License v2.0
0 stars 0 forks source link

Remove hardcoded paths #3

Closed PierrotAWB closed 3 years ago

PierrotAWB commented 3 years ago

Rather than look at the 'example' directory by default, read from XDG_DATA_HOME instead, for example.

One possibility is to, by default, read all of the ".catalogue" files there, and from those, figure out which files contain cards.

Ideally, however, we figure out from the contents of the file whether what we're reading is a catalogue, a series of cards, or something else.

Alternatively, we can enforce a hierarchy at XDG_DATA_HOME such as:

|- catalogues
   |- catalogue1
   |- catalogue2
|- cards
   |- cardfile1
   |- cardfile2
   |- cardfile3

but this is fairly limiting.

Still another alternative is to define a SimplefcHome (XDG_DATA_HOME by default), which can be set in a configuration file in XDG_CONFIG_HOME. This lets the user control default behaviour (what to load and from where). This should probably be documented in a manual page.