diff --git a/.aiderignore b/.aiderignore new file mode 100644 index 0000000..1c57c12 --- /dev/null +++ b/.aiderignore @@ -0,0 +1,7 @@ +# Add files or directories to ignore here + +run +lint +test +install +clean diff --git a/.gitignore b/.gitignore index b6e4761..573224d 100644 --- a/.gitignore +++ b/.gitignore @@ -127,3 +127,7 @@ dmypy.json # Pyre type checker .pyre/ + +.aider* +!.aider.conf.yml +!.aiderignore \ No newline at end of file diff --git a/tox.ini b/tox.ini index aeda83a..7515cf9 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ # content of: tox.ini , put in same dir as setup.py [tox] -envlist = py36,py38 +envlist = py310 [flake8] per-file-ignores = __init__.py:F401 diff --git a/ytclip/cmd.py b/ytclip/cmd.py index 11f70f4..4b746e6 100644 --- a/ytclip/cmd.py +++ b/ytclip/cmd.py @@ -43,10 +43,18 @@ def run() -> int: # pylint: disable=too-many-branches,too-many-statements ) parser.add_argument("--outname", help="output name of the file (auto saved as mp4)") parser.add_argument("--keep", action="store_true", help="keeps intermediate files") + parser.add_argument("--upgrade", action="store_true", help="Upgrades yt-dlp") args = parser.parse_args() if args.version: print(f"{VERSION}") return 0 + + if args.upgrade: + # get pip from the current python environment + python_exe = sys.executable + cmd = f'"{python_exe}" -m pip install --upgrade yt-dlp' + print(f"Running: {cmd}") + os.system(cmd) if args.concurrent: run_concurrent()