crypti / ccoin

:part_alternation_mark: Convert and fetch the cost of over 1000 cryptocurrencies within your terminal, and save repeated queries
MIT License
23 stars 1 forks source link

Profiles are deleted after reinstall or update of ccoin #9

Closed radiovisual closed 7 years ago

radiovisual commented 7 years ago

Currently, the profiles are saved in a file called profiles.json, which sits in the module's root directory, so when the module is updated, it brings in a fresh (empty) version of the profiles.json file, which effectively deletes any existing profiles.

To solve this, we would either need to write an export/import feature, or save the profile data somewhere outside of the module directory (this gets my vote).

I won't have time to write this for awhile, but it shouldn't be too hard if someone wants to send in a PR.

radiovisual commented 7 years ago

I guess we could just store the profiles in the user's home directory, like so many other apps do. require('os').homedir()