audible-cli/setup.py
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

75 lines
2.1 KiB
Python

import pathlib
import re
import sys
from os import system
from setuptools import setup, find_packages
# 'setup.py publish' shortcut.
if sys.argv[-1] == "publish":
system("python setup.py sdist bdist_wheel")
system("twine upload dist/*")
sys.exit()
if sys.version_info < (3, 6, 0):
raise RuntimeError("audible requires Python 3.6.0+")
here = pathlib.Path(__file__).parent
long_description = (here / "README.md").read_text("utf-8")
about = (here / "src" / "audible_cli" / "_version.py").read_text("utf-8")
def read_from_file(key):
return re.search(f"{key} = ['\"]([^'\"]+)['\"]", about).group(1)
setup(
name=read_from_file("__title__"),
version=read_from_file("__version__"),
packages=find_packages("src"),
package_dir={"": "src"},
include_package_data=True,
description=read_from_file("__description__"),
url=read_from_file("__url__"),
license=read_from_file("__license__"),
author=read_from_file("__author__"),
author_email=read_from_file("__author_email__"),
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU Affero General Public License v3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8"
],
install_requires=[
"aiofiles",
"audible==0.7.*",
"click>=8",
"colorama; platform_system=='Windows'",
"httpx==0.20.*",
"Pillow",
"tabulate",
"toml",
"tqdm"
],
extras_require={
'pyi': [
'pyinstaller'
]
},
python_requires=">=3.6",
keywords="Audible, API, async, cli",
long_description=long_description,
long_description_content_type="text/markdown",
project_urls={
"Documentation": "https://audiblecli.readthedocs.io/",
"Source": "https://github.com/mkb79/Audible-cli",
},
entry_points={
"console_scripts": ["audible = audible_cli:main",
"audible-quickstart = audible_cli:quickstart"]
}
)