Metadata-Version: 2.1
Name: yv_xtract
Version: 1.0
Summary: CLI tool to download YouTube videos
Author-email: Ricardo Ramirez <ricaiditodev@gmail.com>
License: MIT License
        
        Copyright (c) 2023 Ricardo Arturo
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/Ricaidito/yv-xtract
Project-URL: Bug Tracker, https://github.com/Ricaidito/yv-xtract/issues
Project-URL: Repository, https://github.com/Ricaidito/yv-xtract.git
Keywords: python,youtube,video,downloader,cli,mp3,mp4
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pytube
Requires-Dist: moviepy
Requires-Dist: termcolor

# YouTube Video Xtractor

A simple CLI tool to download videos from YouTube either in mp4 or mp3 format and with the ability to crop them.

## Usage

```console
yvx [-h] [--path PATH] [-mp3] [--start-time START_TIME] [--end-time END_TIME] url

positional arguments:
  url                   URL of the video to download.

options:
  -h, --help            show this help message and exit
  --path PATH           Path to store the downloaded file (default: current_directory/out/).
  -mp3                  Convert the video to MP3 format.
  --start-time START_TIME
                        Time from where the video will start (Format: HH:MM:SS [e.g., 00:02:30]).
  --end-time END_TIME   Time where the video will end (Format: HH:MM:SS [e.g., 00:05:00]).
```

### Examples:

To download a video, run the following command:

```console
yvx <video_url>
```

If you want to download the video in mp3 format, run the following command:

```console
yvx <video_url> -mp3
```

You can also extract a clip from the video by specifying the start and end time of the clip. For example, to extract a clip from 2:30 to 5:00, run the following command:

```console
yvx <video_url> --start-time 00:02:30 --end-time 00:05:00
```

And if you want the video only until certain time, you can specify the end time only. For example, to download the video until 5:00, run the following command:

```console
yvx <video_url> --end-time 00:05:00
```

**_Note: All methods shown here will download the video either in mp4 or mp3 format and store it in a folder named "out" in the tool directory._**

To download the video in a specific directory, you can add the `--path` flag as shown below:

```console
yvx <video_url> --path <path_to_directory>
```

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
