GutenSearch.java uses the Gutendex REST API to search Project Gutenberg, to retrieve books and other resources, such as audio.
Three types of search are possible: using keywords to search book titles and author fields, using a topic to search in bookshelf and subject fields, and search by book ID.
The retrieved information is listed and numbered. This number and a media type can be utilized to download a book or display it in the browser (if the file type is HTML or txt). Another approach is to search by ID with a media type. The single match will be listed, and the accompanying file retrieved.
If the resource isn't a book (e.g. audio, or a music score) then the parent folder of the media is displayed in the browser. Such resources usually consist of multiple parts, and its easiest to select the one you want by clicking on its link in a browser.
GutenSearch.java processes its command line arguments using the Picocli library, which I've described in more detail here. The JSON data returned by HttpClient is converted to Java objects using Google GSON, with the mappings defined in Gutenberg.java.
GutenSearch help:
A GutenSearch search using keywords:
A GutenSearch download of an epub document to a local file:
A GutenSearch display of an HTML document in the browser: