Commit graph

72 commits

Author SHA1 Message Date
06a4dc286d 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
2024-06-26 13:47:48 +12:00
1b11097ba0 Reorder method attributes and add pure attribute to some methods 2024-06-26 13:47:48 +12:00
8564fd3003 Heavily refactor esvapi.d (add ESVMode enum, ...) and apply changes to main.d 2024-06-26 13:47:48 +12:00
45890a6051 esv.d -> esvapi.d 2024-06-26 13:47:48 +12:00
d3558feb35 Readme changes 2024-06-26 13:47:48 +12:00
0285e0979d More makefile changes 2024-06-26 13:47:48 +12:00
5dc2a12f1e Refactor config parsing code in main.d, rename esv.d -> esvapi.d, rename class EsvAPI to ESVApi, makefile changes 2024-06-26 13:47:48 +12:00
7f61d7bfa6 Rename ESVAPI_BIBLE_BOOKS to BIBLE_BOOKS and make it use spaces for book names, instead of underscores. 2024-06-26 13:47:48 +12:00
64fca717c6 Reduce repetition in Makefile 2024-06-26 13:47:48 +12:00
7d96227dc2 Remove 'this' in front of every member variable in the EsvAPI class, and correct function parameter definitions 2024-06-26 13:47:48 +12:00
56d69af099 Add @safe attribute to main.extractOpt() 2024-06-26 13:47:48 +12:00
6a6f39e0bd Remove gmake-exclusive ifeq statements in Makefile 2024-06-26 13:47:39 +12:00
dddf0db33f Add in, @nogc and @safe attributes to functions and parameters 2023-05-11 13:25:08 +12:00
f2e056bf06 License everything under the GPL version 2 2023-03-28 10:44:58 +13:00
fc93266113 Use a default approved API key and update to 0.2.0 2023-03-27 13:58:05 +13:00
0147fe1c60 Add support for changing the MP3 audio player through the ESV_PLAYER environment variable 2023-03-27 13:32:18 +13:00
3751040fe0 Use environment.get()'s second default value argument instead of using null checks 2023-03-27 13:08:04 +13:00
dcb847578d Take non-lowercase options into account 2023-03-27 12:52:36 +13:00
4992a8684c De-hardcode mpg123
The MPEG player is no longer hard-coded as mpg123, and now customizable
by changing the enum `DEFAULT_MPEGPLAYER`.
2023-03-27 12:46:35 +13:00
04aea47d80 Rename BIBLE_BOOKS array to ESVAPI_BIBLE_BOOKS 2023-03-27 12:03:32 +13:00
2e4b067e49 Preserve dmd compatibility by removing one byte from the Makefile 2023-03-27 12:02:37 +13:00
a0341e72d7 Add source code
Added:
 - esv.d: reusable D interface to the ESV web API
 - main.d: the main program
 - Makefile
 - README.md
 - modified version of dini (dependency)
 - man pages
 - licenses
2023-03-23 15:59:09 +13:00