kemayo / leech

Turn a story on certain websites into an ebook for convenient reading
MIT License
154 stars 24 forks source link

consistent locations for cache and configuration files #50

Open keturn opened 3 years ago

keturn commented 3 years ago

This establishes consistent locations for the configuration and cache files instead of looking for them in whatever the current working directory happens to be.

It makes use of AppDirs to pick appropriate places.

To avoid directly interacting with the request cache by filename, this patch removes explicit use of sqlite to vacuum the cache file; requests-cache does that itself as of 0.5.1.

kemayo commented 3 years ago

I'm generally for this, but I think if the cache is getting moved somewhere less-visible it'd probably be good to add an explicit call to remove_expired_responses to the regular execution path.