Skip to content

Commit b74246c

Browse files
committed
- created separate entrypoint for ffdl
- fixed help prog name (diff for ffdl and -m)
1 parent 9d2cf48 commit b74246c

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Issues = "https://github.com/python-ffmpegio/python-ffmpegio-downloader/issues"
3535
Pull_Requests = "https://github.com/python-ffmpegio/python-ffmpegio-downloader/pulls"
3636

3737
[project.scripts]
38-
ffdl = "ffmpeg_downloader.__main__:main"
38+
ffdl = "ffmpeg_downloader.ffdl:run"
3939

4040
[project.gui-scripts]
4141
ffdl-gui = "ffmpeg_downloader.qt.__main__:main"

src/ffmpeg_downloader/__main__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,11 @@ def show(args):
249249
pass
250250

251251

252-
def main():
252+
def main(prog: str):
253253
# create the top-level parser
254-
parser = argparse.ArgumentParser(description="Download and manage FFmpeg prebuilds")
254+
parser = argparse.ArgumentParser(
255+
prog=prog, description="Download and manage FFmpeg prebuilds"
256+
)
255257

256258
parser.add_argument(
257259
"--proxy",

src/ffmpeg_downloader/ffdl.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from .__main__ import main
2+
3+
4+
def run():
5+
main("ffdl")

0 commit comments

Comments
 (0)