Commit graph

43 commits

Author SHA1 Message Date
47045188fb tree: update copyright to 2025 2025-01-29 11:37:27 +13:00
663cb91cd3 esv, esvsearch: reorder variables 2024-08-08 17:56:09 +12:00
e1cf13c8d7 esv: substitute hyphens in books with -a
Fixes: https://todo.sr.ht/~jeremy/esv/7
2024-08-08 17:56:09 +12:00
f353279458 esvapi: refactor
18 insertions, 68 deletions! (🚀)

Fixes: https://todo.sr.ht/~jeremy/esv/6
2024-08-08 17:56:09 +12:00
ec8be68b49 esvsearch: split esv search code into separate program
Requires rewiring the build system to accommodate for two executables.

Fixes: https://todo.sr.ht/~jeremy/esv/4
2024-08-08 17:56:09 +12:00
692d413bfa esv: improve configuration path code 2024-08-08 17:56:09 +12:00
3507d9ca24 esv: initialise cFlag to null
Before this change a user could pass an empty string as the argument
to -C and it would go undetected.
2024-08-08 17:56:09 +12:00
8f699c3212 esv: rename -C flag to -c
The capital C flag is often associated with changing directories. The tar
and make programs use it this way.
2024-08-08 17:56:09 +12:00
f540160ff3 esv: remove invalid path checks
They're catering to too much of an edge case. It can just be checked with
std.file.exists() later on.
2024-08-08 17:56:09 +12:00
bf3eb2953a esv: strip trailing whitespace from header 2024-08-08 17:56:09 +12:00
7a9866a4e2 util: split getopt error handling into utility function 2024-08-08 17:56:09 +12:00
d8e267d5ba esv: split utility functions into separate module 2024-08-08 17:56:09 +12:00
1ed36260f3 esv: remove bad use of UFCS 2024-08-08 17:56:09 +12:00
1ba023122a esv: revise comments 2024-08-08 17:56:09 +12:00
6096e01e01 esv: rename mpegPlayer to player 2024-08-08 17:56:09 +12:00
59c92c8db7 esv: refactor compile time configuration 2024-08-08 17:56:09 +12:00
982273b9d7 esv: detect passage line length based on terminal width
Implements: https://todo.sr.ht/~jeremy/esv/2
2024-08-08 17:56:09 +12:00
d68b83b722 esv: preserve compatibility with the newest initial 2024-08-08 17:56:09 +12:00
6bd5af01f8 esv: trim configuration file 2024-06-26 13:47:48 +12:00
a3a575e8c5 esv, esvapi: include 2023 in copyright year range 2024-06-26 13:47:48 +12:00
0c0a5cab70 esv: handle thrown CurlExceptions 2024-06-26 13:47:48 +12:00
11543da52f esv: handle absence of search results with -s
previously this would throw an unhandled ESVException.
2024-06-26 13:47:48 +12:00
5a9103bfa8 mark development version 2024-06-26 13:47:48 +12:00
467573c99a reword version 2024-06-26 13:47:48 +12:00
49e2606a2e improve error message system
Move away from the exception-based system where we throw an Exception
to stop the program (which is caught by main) and use a new die
function that accesses args[0], prints an error and stops the program.
Users should not notice a difference, I think this system is more
lightweight and requires less code.
2024-06-26 13:47:48 +12:00
8b392c5bab use @safe everywhere
with a little bit of evil @trusted magic...
2024-06-26 13:47:48 +12:00
2e93c891fd migrate to initial.d over dini
initial.d is my very own INI parser, see
  <https://git.sr.ht/~jeremy/initial>
2024-06-26 13:47:48 +12:00
de9e18f06e update copyright year to 2024 2024-06-26 13:47:48 +12:00
aecbdfec4f Add call to pledge() on OpenBSD 2024-06-26 13:47:48 +12:00
1c9bb056e8 Remove automatic pager functionality 2024-06-26 13:47:48 +12:00
97c9c427ff Add @safe and final where possible, remove unnecessary documentation and fix incorrect indentation 2024-06-26 13:47:48 +12:00
472261e15a Document everything and fix out-of-bounds memory error 2024-06-26 13:47:48 +12:00
12d5d9dcea Add search functionality and make other improvements 2024-06-26 13:47:48 +12:00
ca36b7fb90 OpenBSD code style 2024-06-26 13:47:48 +12:00
c21ab033ee Add module statement to esv.d 2024-06-26 13:47:48 +12:00
7ebc0d7b66 Rename main.d -> esv.d 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
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
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
04aea47d80 Rename BIBLE_BOOKS array to ESVAPI_BIBLE_BOOKS 2023-03-27 12:03:32 +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