Refactor most of the code
- Replace panic()-based error handling in main() with Exception-based error handling - Put hardcoded defaults in config.di - Make general optimisations and readability improvements for a lot of the code - Change some of the ESVApi's interface
This commit is contained in:
parent
1b11097ba0
commit
06a4dc286d
3 changed files with 397 additions and 362 deletions
18
config.di
Normal file
18
config.di
Normal file
|
@ -0,0 +1,18 @@
|
|||
/* default configuration for esv */
|
||||
|
||||
module config;
|
||||
|
||||
public:
|
||||
|
||||
enum DEFAULT_APIKEY = "abfb7456fa52ec4292c79e435890cfa3df14dc2b";
|
||||
enum DEFAULT_CONFIGPATH = "~/.config/esv.conf";
|
||||
enum DEFAULT_MPEGPLAYER = "mpg123";
|
||||
enum DEFAULT_PAGER = "less";
|
||||
|
||||
enum ENV_CONFIG = "ESV_CONFIG";
|
||||
enum ENV_PAGER = "ESV_PAGER";
|
||||
enum ENV_PLAYER = "ESV_PLAYER";
|
||||
|
||||
enum BUGREPORTURL = "https://codeberg.org/jtbx/esv/issues";
|
||||
|
||||
// vi: ft=d
|
Loading…
Add table
Add a link
Reference in a new issue