Added support for chapters as well as convert to bash script

This commit is contained in:
KrumpetPirate
2016-03-30 21:48:35 -05:00
parent c387b1e03b
commit 9d28be4f06
4 changed files with 59 additions and 123 deletions

View File

@ -12,33 +12,29 @@ your **personal** Audible account. The purpose of this software is to
create a method for you to download and store your books just in case
Audible fails for some reason.
I recently converted this script to bash instead of perl. Something about more people knowing bash or something rather.
Additionally I put some work into creating chaptered files as well as the mp3 version. A directory of structure GENRE/WRITER/TITLE
will contain the large mp3 as well as chaptered mp3s extracted from the AAX file metadata.
TODO: Automatically fix the MP3 tags on the generated audio files. For now I use easytag which seems to work okay.
## Setup
You will need your four byte authitication code that comes from Audible's
servers. This will be used by ffmpeg to perform the initial audio convert. You
can obtain this string from a tool like [audible-activator](https://github.com/inAudible-NG/audible-activator).
## Requirements
* perl version 5.22.0 or later
* bash 4.3.42 or later tested
* ~~perl version 5.22.0 or later~~ (Converted the script to bash for greater readability!)
* ffmpeg version 2.8.3 or later
* libmp3lame (came from lame package on Arch, not sure where else this is stored)
You will also require the following perl modules:
* autodie
* Getopt::Long
* File::Basename
* IO::CaptureOutput
I would suggest installing cpanminus either through CPAN or (preferably) through your
distro's repositories. Take note that many perl modules can be packaged in your repos
as well so take a look there before resorting to cpan/cpanminus.
## Usage
```
perl AAXtoMP3.pl -a AUTHCODE -i AAXFILE -v
bash AAXtoMP3.sh <AUTHCODE> {INPUT_FILES}
```
* -a: **your** Audible auth code (it won't correctly decode otherwise) (required)
* -i: the input AAX file to be converted (required)
* -v: verbose (optional)
* AUTHCODE: **your** Audible auth code (it won't correctly decode otherwise) (required)
* Everything else is considered an input file, useful for batching!
Tested on Linux with the above requirements. No effort will be made to
port this work to any other operating system, though it may work fine. Want a Windows/
@ -59,24 +55,7 @@ hear, and enjoy. Dont be a parasite.
This blurb is borrowed from the https://apprenticealf.wordpress.com/ page.
## License
The MIT License
Changed the license to the WTFPL, do whatever you like with this script. Ultimately it's just a front-end for ffmpeg after all.
Copyright (c) 2015 KrumpetPirate
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
## Need Help?
I'll help out if you are having issues, just submit and issue and I'll get back to you when I can.