This is a rough implementation that allows user to choose where to look
for the mapping files. The user chooses the directory using the -mapdir
option. The user directory replaces the default mapping directory,
which might not be ideal.
Being able to choose the mapping directory allows to use custom mappings
without tempering with the MartiniTools directory. It also allows to
write mappings on the fly using a script without the risk of loosing
defaults mappings.
It may be better to allow -mapdir to be repeated so the user can set multiple directories (a global one, one specific to the project, and one just for that system for instance). It may not be ideal to replace the default directory, instead it may be better to keep the default directory and add the user ones on top of it; a -nodefmap option could be implemented to not use the default.
This is a rough implementation that allows user to choose where to look for the mapping files. The user chooses the directory using the
-mapdir
option. The user directory replaces the default mapping directory, which might not be ideal.Being able to choose the mapping directory allows to use custom mappings without tempering with the MartiniTools directory. It also allows to write mappings on the fly using a script without the risk of loosing defaults mappings.
It may be better to allow
-mapdir
to be repeated so the user can set multiple directories (a global one, one specific to the project, and one just for that system for instance). It may not be ideal to replace the default directory, instead it may be better to keep the default directory and add the user ones on top of it; a-nodefmap
option could be implemented to not use the default.