* Capitalize chapter type in get_content_metadata function
The get_content_metadata function in audible_cli's models.py file has been updated to capitalize the chapter type parameter. This ensures any case variations in the parameter will pass the assert condition, improving the handling of chapter types and method consistency.
* Update chapter type handling in cmd_download.py
Updated the cmd_download.py file to add a "config" choice to the chapter type and move the declaration of chapter_type to a more appropriate location. Also, the logging message has been updated to include the selected chapter type. This enhances traceability and ensures chapter type is handled consistently.
Flat chapters can be enabled by default in the config file. In the APP or profile section must be a setting `chapter_type = "flat"`.
* Update README with new `chapter_type` option
Updated README.md to include a new `chapter_type` field in both the APP and profile sections. This new field allows users to specify a chapter type for the `download` command with the `--chapter-type` option. If not provided, it defaults to "tree". This change aims to increase customizability for users.
* Update CHANGELOG to include new config file option
The CHANGELOG has been updated to reflect the addition of the ability to set a default chapter type in the config file. This allows the user to specify whether chapters should be downloaded as `flat` or `tree` type without having to state it each time a download command is given.
* Update audible-cli version
Version number has been updated from "0.3.2b2" to "0.3.2b3" in the _version.py file. This indicates a new build of the code that may include minor enhancements or bug fixes.
# Added
- `--aax-fallback` option to `download` command to download books in aax format and fallback to aaxc, if the book is not available as aax
- `--annotation` option to `download` command to get bookmarks and notes
- `questionary` package to dependencies
- `add` and `remove` subcommands to wishlist
- `full_response_callback` to `utils`
- `export_to_csv` to `utils`
- `run_async` to `decorators`
- `pass_client` to `decorators`
- `profile_option` to `decorators`
- `password_option` to `decorators`
- `timeout_option` to `decorators`
- `bunch_size_option` to `decorators`
- `ConfigFile.get_profile_option` get the value for an option for a given profile
- `Session.selected.profile` to get the profile name for the current session
- `Session.get_auth_for_profile` to get an auth file for a given profile
- `models.BaseItem.create_base_filename` to build a filename in given mode
- `models.LibraryItem.get_annotations` to get annotations for a library item
# Changed
- bump `audible` to v0.8.2 to fix a bug in httpx
- rework plugin examples in `plugin_cmds`
- rename `config.Config` to `config.ConfigFile`
- move `click_verbosity_logger` from `_logging` to `decorators` and rename it to `verbosity_option`
- move `wrap_async` from `utils` to `decorators`
- move `add_param_to_session` from `config` to `decorators`
- move `pass_session` from `config` to `decorators`
- `download` command let you now select items when using `--title` option
# Fixed
- the `library export` and `wishlist export` command will now export to `csv` correctly
These PR contains a filename mode options when using the `audible download` command.
It can be used in these ways and order:
1. Using `audible download ... --filename-mode ***`
2. Add the `filename_mode` option to the profile section of the config file (using `audible manage config edit`) to use it with these profile.
3. Add the `filename_mode` option to the APP section of the config file (using `audible manage config edit`) to use it on all profiles.
4. If no setting is provided, the `ascii` mode is used (like before)
The filename mode supports these values:
- ascii: Same filename mode like before these changes
- asin_ascii: Add the asin of the book and a underscore before the ascii filename
- unicode: Using a unicode filename scheme.
- asin_unicode: Like unicode but add the asin of the book and a underscore before
Underline activation_bytes is incorrect.
Call `audible -h` to let you show all main subcommands. At this time, there
are the `activation_bytes`, `download`, `library` and `manage` subcommands.
The `manage` command has multiple subcommands. So take a look with the
`audible manage -h` and `audible manage <subcommand> -h`.
# Added
- Set a custom plugin dir via environment variable
- Provide plugin packages where commands can hook in audible command.
# Changed
- Plugin commands are now placed in the command root instead of ``plugin-cmds`` subcommand. So replacing of build-in commands are possible.
# Removed
- The `--config`` option. A custom config dir can now only be set via environment variable.
- The `--plugins`` option. A custom plugin dir can now only be set via environment variable
# Misc
- Some code optimations