From 422608b35f321cd736278daf5448106e5f02818f Mon Sep 17 00:00:00 2001 From: Zev Averbach Date: Thu, 7 Oct 2021 22:42:58 +0200 Subject: [PATCH] nice description for pypi --- app/extract_audio.py | 12 ++++++++++-- pyproject.toml | 6 ++++++ setup.py | 8 +++++++- 3 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 pyproject.toml diff --git a/app/extract_audio.py b/app/extract_audio.py index 6757907..a89d70f 100755 --- a/app/extract_audio.py +++ b/app/extract_audio.py @@ -2,7 +2,7 @@ from pathlib import Path from subprocess import check_output -from sys import argv as args +from sys import argv as args, exit import threading @@ -13,7 +13,15 @@ def extract_audio(dir_, fp): def main(): dir_ = args[1] threads = [] - for fp in Path(dir_).iterdir(): + try: + fps = list(Path(dir_).iterdir()) + except FileNotFoundError: + print("that dir doesn't exist") + if not fps: + print("no files in that dir") + exit() + + for fp in fps: a = threading.Thread( target=extract_audio, args=( diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..374b58c --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,6 @@ +[build-system] +requires = [ + "setuptools>=42", + "wheel" +] +build-backend = "setuptools.build_meta" diff --git a/setup.py b/setup.py index 894ac5e..e10d16f 100644 --- a/setup.py +++ b/setup.py @@ -1,11 +1,17 @@ +from pathlib import Path from setuptools import setup +this_directory = Path(__file__).parent +long_description = (this_directory / "README.md").read_text() + setup( name="extract-audio", - version="0.1", + version="0.3", packages=["app"], description="Extract audio from a directory of video files.", + long_description=long_description, + long_description_content_type="text/markdown", author="Zev Averbach", author_email="zev@averba.ch", url="https://github.com/zevaverbach/extract_audio_from_video",