audible-cli/plugin_cmds
mkb79 5492a8ae13
v0.1.0 (#59)
# Added

- add the `api` command to make requests to the AudibleAPI
- a counter of downloaded items for the download command
- the `--verbosity/-v` option; default is INFO
- the `--bunch-size` option to the download, library export and library list subcommand; this is only needed on slow internet connections
- `wishlist` subcommand
- the `--resolve-podcasts` flag to download subcommand; all episodes of a podcast will be fetched at startup, so a single episode can be searched via his title or asin
- the `--ignore-podcasts` flag to download subcommand; if a podcast contains multiple episodes, the podcast will be ignored
- the`models.Library.resolve_podcasts` method to append all podcast episodes to given library.
- the `models.LibraryItem.get_child_items` method to get all episodes of a podcast item or parts for a MultiPartBook.
- the`models.BaseItem` now holds a list of `response_groups` in the `_response_groups` attribute. 
- the`--format` option to `library export` subcommand
- the `models.Catalog` class
- the `models.Library.from_api_full_sync` method to fetch the full library

# Changed

- the `--aaxc` flag of the download command now try to check if a voucher file exists before a `licenserequest` is make (issue #60)
- the `--aaxc` flag of the download command now downloads mp3/m4a files if the `aaxc` format is not available and the `licenserequest` offers this formats
- the `download` subcommand now download podcasts
- *Remove sync code where async code are available. All plugins should take care about this!!!*
- Bump `audible` to v0.7.0
- rebuild `models.LibraryItem.get_aax_url` to build the aax download url in another way 
- `models.BaseItem.full_title` now contains publication name for podcast episodes
- `models.LibraryItem` now checks the customer rights when calling `LibraryItem._is_downloadable`
- `models.BaseItem` and `models.BaseList` now holds the `api_client` instead the `locale` and `auth`
- rename `models.Wishlist.get_from_api` to `models.Wishlist.from_api`
- rename `models.Library.get_from_api` to `models.Library.from_api`; this method does not fetch the full library for now

# Misc

- bump click to v8

# Bugfix

- removing an error using the `--output` option of the `library export` command
- fixing some other bugs
2022-03-11 08:44:02 +01:00
..
cmd_image-urls.py v0.1.0 (#59) 2022-03-11 08:44:02 +01:00
cmd_remove-encryption.py v0.1.0 (#59) 2022-03-11 08:44:02 +01:00
convert_oa_cred.py v0.1.0 (#59) 2022-03-11 08:44:02 +01:00
README.md Update plugin_cmds/README.md 2021-01-28 20:18:46 +01:00

Plugin Commands

Command priority order

Commands will be added in the following order:

  1. plugin dir commands
  2. plugin packages commands
  3. build-in commands

If a command is added, all further commands with the same name will be ignored. This enables you to "replace" build-in commands very easy.

Location

Audible-cli expected plugin commands in the plugins subdir of the app dir. You can provide a custom dir with the AUDIBLE_PLUGIN_DIR environment variable.

Commands in this folder

To use commands in these folder simply copy them to the plugin folder.

Custom Commands

You can provide own subcommands and execute them with audible SUBCOMMAND. All plugin commands must be placed in the plugin folder. Every subcommand must have his own file. Every file have to be named cmd_{SUBCOMMAND}.py. Each subcommand file must have a function called cli as entrypoint. This function have to be decorated with @click.group(name="GROUP_NAME") or
@click.command(name="GROUP_NAME").

Relative imports in the command files doesn't work. So you have to work with absolute imports. Please take care about this.

Own Plugin Packages

If you want to develop a complete plugin package for audible-cli you can do this on an easy way. You only need to register your sub-commands or sub-groups to an entry-point in your setup.py that is loaded by the core package.

Example for a setup.py

from setuptools import setup

setup(
    name="yourscript",
    version="0.1",
    py_modules=["yourscript"],
    install_requires=[
        "click",
        "audible_cli"
    ],
    entry_points="""
        [audible.cli_plugins]
        cool_subcommand=yourscript.cli:cool_subcommand
        another_subcommand=yourscript.cli:another_subcommand
    """,
)