semvec/pypi-packages huggingface dataset:
yt2mp4 1.0.5
Download YouTube videos and playlists as MP4 files (and other formats)
License: MIT
Requires Python: >=3.0

# yt2mp4

Download YouTube videos and playlists as MP4 files (and other formats)

## Get geckodriver

### Linux (Debian)

```sh
sudo apt install wget ffmpeg firefox-esr -y
wget https://github.com/mozilla/geckodriver/releases/download/v0.30.0/geckodriver-v0.30.0-linux64.tar.gz
sudo tar xvzf geckodriver-v0.30.0-linux64.tar.gz -C /usr/bin/
chmod +x /usr/bin/geckodriver
rm geckodriver-v0.30.0-linux64.tar.gz
```

### Other

Figure it yourself

## Installation

### From PyPI

```sh
pip3 install yt2mp4
```

### From GitHub

```sh
pip3 install git+https://github.com/donno2048/yt2mp4
```

## Usage

### In Python

```py
from yt2mp4 import download
download("dQw4w9WgXcQ", outname='output.mp4') # dowload video from https://www.youtube.com/watch?v=dQw4w9WgXcQ and name it output.mp4
# will also work:
# download("dQw4w9WgXcQ", outname='output.mp4', binary_path=path) # use a different binary path
# download("youtube.com/watch?v=dQw4w9WgXcQ", output="output.mov")
# download("youtu.be/dQw4w9WgXcQ")
# download("www.youtube.com/watch?v=dQw4w9WgXcQ", output="output.mov")
# download("music.youtube.com/watch?v=dQw4w9WgXcQ", output="output.mov")
# download("https://www.youtube.com/watch?v=dQw4w9WgXcQ", output="output.mov")
# download("https://music.youtube.com/watch?v=dQw4w9WgXcQ", output="output.mov")
# download("https://youtu.be/dQw4w9WgXcQ")
```

### In cmd

```sh
# each of those will convert to another format
yt2mp4 # or python3 -m yt2mp4
yt2webm
yt2mkv
yt2flv
yt2wmv
yt2avi
yt2mov
yt2m4v
yt2mp3
```

### Download playlist

For this you will have to configure a YouTube API key

#### Get API key

1. Go to the [Developer console dashboard](https://console.cloud.google.com/home/dashboard) and click on _CREATE PROJECT_, you can name the project and then press _CREATE_
1. Now go to the [Credentials tab](https://console.cloud.google.com/apis/credentials) and click on _CREATE CREDENTIALS_ and choose _API key_, copy the API key you see and save it somewhere safe, then you can click on _CLOSE_
1. Now go to the [YouTube API tab](https://console.cloud.google.com/apis/api/youtube.googleapis.com) and click on _ENABLE_

#### In Python

```py
from yt2mp4 import download_playlist
download_playlist(id, api_key)
'''
 - the first argument is the id of the playlist, you can pass either of the following forms
                    - https://www.youtube.com/watch?v=***********&list=PLAYLIST_ID
                    - https://www.youtube.com/playlist?list=PLAYLIST_ID
                    - PLAYLIST_ID
 - the second argument is the API key
 - the third is the extension, the default value is 'mp4'
 - the fourth one is the fps, the default value is 60
 - the last one is the binary path to the geckodriver
'''
```

#### In cmd

```sh
# each of those will convert to other formats
ytp2mp4
ytp2webm
ytp2mkv
ytp2flv
ytp2wmv
ytp2avi
ytp2mov
ytp2m4v
ytp2mp3
```

## Supported formats

- mp4
- webm
- mkv
- flv
- wmv
- avi
- mov
- m4v
- mp3 (auto format as audio)
code2img 0.0.3
Generate an image from source code (local or repository)
License: MIT
Requires Python: >=3.7

# Code2img

Use code2img from terminal to generate images of your source code

![GitHub](https://img.shields.io/github/license/leugimkm/code2img)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.0-4baaaa.svg)](./code_of_conduct.md)
![GitHub languages](https://img.shields.io/github/languages/top/leugimkm/code2img)
![GitHub repo size](https://img.shields.io/github/repo-size/leugimkm/code2img)
![Github last-commit](https://img.shields.io/github/last-commit/leugimkm/code2img)
![maintenance](https://img.shields.io/maintenance/yes/2022)

                                 
               _     ___ _           
     ___ ___ _| |___|_  |_|_____ ___ 
    |  _| . | . | -_|  _| |     | . |
    |___|___|___|___|___|_|_|_|_|_  |
                                |___|


`code2img` is a simple tool to generate an image from a local file or
from a GitHub repository. It can also be used to send the source code
to carbon.now.sh and generate the image there.

# Installation

`code2img` is available on [PyPi](https://pypi.org/project/code2img/) (MIT license)
and installation can be performed by running [pip](https://docs.python.org/es/3/installing/index.html)

```
python -m pip install code2img
```
To upgrade the package:
```
python -m pip install code2img --upgrade
```
To delete the package:
```
python -m pip uninstall code2img
```

# Example

To generate an image from a local file:

    > python -m code2img main.py -s
    Done!
    Image created in current directory: main.png

To generate an image from a GitHub repository:

    > python -m code2img soluciones/fibonacci.py -g
    Done!
    Image created in current directory: fibonacci.png

You can also send the content of the source code to carbon.now.sh:

    > python -m code2img main.py -c
    Sent to Carbon.now.sh

    > python -m code2img soluciones/fibonacci.py -gc
    Sent to Carbon.now.sh

Help command:

    > code2img -h

or:

    > code2img --help


# Contribution

If you'd like to contribute, fork the repository, commit your changes to main branch 
and send a pull request.
Make sure you add yourself to authors.