main
 1{
 2  lib,
 3  writeShellApplication,
 4  audible-cli,
 5  aaxtomp3,
 6  ffmpeg,
 7  mediainfo,
 8  jq,
 9}:
10
11writeShellApplication {
12  name = "audible-converter";
13
14  runtimeInputs = [
15    audible-cli
16    aaxtomp3
17    ffmpeg
18    mediainfo
19    jq
20  ];
21
22  text = builtins.readFile ./convert.sh;
23
24  meta = {
25    description = "Download and convert Audible audiobooks to Audiobookshelf-compatible formats";
26    longDescription = ''
27      A wrapper tool that combines audible-cli and AAXtoMP3 to download
28      audiobooks from Audible and convert them to M4B format for use with
29      Audiobookshelf or other audiobook players.
30
31      Features:
32      - Download entire Audible library or specific books
33      - Convert AAX to M4B/MP3/M4A
34      - Preserve chapter markers and metadata
35      - Organize output for Audiobookshelf
36    '';
37    homepage = "https://github.com/vdemeester/home";
38    license = lib.licenses.mit;
39    platforms = lib.platforms.linux;
40    maintainers = [ ];
41  };
42}