|
| 1 | +# ARCHITECTURE |
| 2 | + |
| 3 | +YTD is a tool for searching and downloading video and audio content from Youtube. It includes primitives for basic data retrieval, content search, download and conversion to other audio and video file formats. |
| 4 | + |
| 5 | + |
| 6 | +## Overview |
| 7 | + |
| 8 | +It contains three main packages namely: |
| 9 | +* the API(Data retrieval and requests to the Youtube API), |
| 10 | +* Auth(Uses OAuth to make authenticated requests by the API package) when connecting to the Youtube API. There also consists a converter which is part of the API package to convert downloaded youtube data into other file formats such as FLV and mp3 only. |
| 11 | +* The CMD basically gets the tool up and running taking queries from the user and returning data output to the user. |
| 12 | + |
| 13 | + ---------------------- ========================= |
| 14 | + | |
| 15 | + | OAuth |
| 16 | + | API | -----> | Youtube API |
| 17 | + | |
| 18 | + | |
| 19 | + ---------------------- ========================= |
| 20 | + |
| 21 | + ^ |
| 22 | + ' |
| 23 | + ' |
| 24 | + ' |
| 25 | + |
| 26 | + |
| 27 | + --------------------- ------------------- |
| 28 | + | | | |
| 29 | + Auth <-------> CMD |
| 30 | + | | | |
| 31 | + --------------------- ------------------- |
| 32 | + |
| 33 | + --> = Channel |
| 34 | + |
| 35 | + |
| 36 | +## Features |
| 37 | + |
| 38 | +The basic features are listed here below |
| 39 | + |
| 40 | +* YTD API |
| 41 | + **- apidata.go: Sends authenticated requests to the Google Youtube API |
| 42 | + Process video feeds and downloads video data from Youtube. |
| 43 | + **- apisearch.go: Performs search queries on Youtube and parses the results to `apidata.go` |
| 44 | + **- apiconv.go: Converts downloaded videos to FLV and mp3 |
| 45 | + |
| 46 | +* YTD Auth |
| 47 | + **- auth.go: Uses OAuth to perform authenticated requests with Youtube, creating the `YoutubeRequestSettings` and `YoutubeSettings` objects. |
| 48 | + |
| 49 | +* YTD CMD |
| 50 | + **- main.go: Program entry point, gets queries from the user. |
| 51 | + Creates requests via `AUTH` API and connects to `API` package and displays results to user. |
| 52 | + |
| 53 | +* YTD UI |
| 54 | + **- ui.go: UI creates GUI interface for parsing of response data to user(UI/UX) |
| 55 | + |
| 56 | + |
| 57 | +## Build |
| 58 | + |
| 59 | +Requirements: |
| 60 | + |
| 61 | +* Go 1.8 or higher |
| 62 | +* Docker CE 17 |
| 63 | +* A working Golang environment |
| 64 | +* Protobuf 3.x or higher to regenerate protocol buffer files (e.g. using make generate) |
| 65 | + |
| 66 | +`ytd` is built in Go using the standard `go` project structure to work well with Go tooling. |
| 67 | + |
| 68 | + |
| 69 | +## Test |
| 70 | + |
| 71 | +Tests are ran by running `make` or `make all` |
| 72 | + |
| 73 | +``` |
| 74 | +$ make |
| 75 | +``` |
| 76 | +--- |
0 commit comments