tubetoyou

module
v0.0.0-...-64b567c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 4, 2023 License: GPL-3.0

README

TubeToYou (YoDo)

TubeToYou is an API server written in Go that provides functionality to retrieve information about YouTube videos and playlists, as well as the ability to download them.

The API documentation can be found in the api.yml file (OpenAPI v3.0.2).


Dependencies

The server relies on the following dependencies:

  • github.com/google/uuid v1.3.0
  • github.com/gorilla/mux v1.8.0
  • github.com/kkdai/youtube/v2 v2.8.1
  • github.com/rs/zerolog v1.29.1

Environment Variables

By default, the server will use the following environment variables:

  • LOG_FORMAT (default: "pretty")
  • LOG_LEVEL (default: 0)
  • YOUTUBE_DEBUG (default: "false")
  • YOUTUBE_MAX_ROUTINES (default: 10)
  • YOUTUBE_CHUNK_SIZE (default: 10)

Feel free to modify these variables according to your needs.


Getting Started

Running Locally

To set up and run the TubeToYou API server locally, you will need Go 1.20.4 installed on your system. Follow these steps:

  1. Clone the repository: git clone https://github.com/Jak3BD/TubeToYou.git
  2. Change to the project directory: cd TubeToYou
  3. Install the required dependencies: go mod download && go mod verify
  4. Build the server: cd src && go build -v -o tubetoyou .
  5. Run the server: ./tubetoyou

Using Docker

Alternatively, you can run TubeToYou using Docker. A Dockerfile is provided for easy containerization. Follow these steps:

  1. Clone the repository: git clone https://github.com/Jak3BD/TubeToYou.git
  2. Change to the project directory: cd TubeToYou
  3. Build the Docker image: docker build -t tubetoyou .
  4. Run the Docker container: docker run -p 8080:8080 tubetoyou

The server will be accessible at http://localhost:8080


Development

During development, you can use the Air tool for hot-reloading.

An .air.toml configuration file is included in the project.


API Documentation

Please refer to the api.yml file for detailed documentation on the available API endpoints etc.


Contributing

Contributions to TubeToYou are welcome!

If you find any issues or have suggestions for improvement, please open an issue or submit a pull request.

Directories

Path Synopsis
src
env
yt

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL