added contributing info

This commit is contained in:
Hellow2 2023-02-06 09:44:11 +01:00
parent bbf7181b13
commit 5b25aa2cc1
4 changed files with 61 additions and 0 deletions

View File

@ -7,6 +7,8 @@
5. [About the Audio](#download)
6. [About the Lyrics](#lyrics)
I am happy about every pull request. To contribute look [here](contribute.md).
![](https://github.com/HeIIow2/music-downloader/blob/master/assets/logo_cropped.jpg?raw=true)
## Installation

13
contribute.md Normal file
View File

@ -0,0 +1,13 @@
# How to contribute
I am always happy about pull requests.
If you wanna contribute, this is for you. Some options will follow:
## Add an audio/metadata source
The audio and Metadata Sources all inherint the class `Page` in [abstract.py](src/music_kraken/pages/abstract.py)
You can create a subclass of this class for for example youtube or musify or whatever.
I documented the function it should have in the docstrings of [abstract.py](src/music_kraken/pages/abstract.py). If you are unsure about how it works, look at either the doccumentation *(will get more detailed soon)* or an [example](src/music_kraken/pages/encyclopaedia_metallum.py). For trying you're class you can make a skript simmilar to [this one](src/metal_archives.py). Make sure it is in the same directory though.
> Read the part of the documentation, I already have written.

View File

@ -0,0 +1,46 @@
from typing import List
import requests
from bs4 import BeautifulSoup
import pycountry
from ..utils.shared import (
ENCYCLOPAEDIA_METALLUM_LOGGER as LOGGER
)
from .abstract import Page
from ..database import (
MusicObject,
Artist,
Source,
SourcePages,
Song,
Album,
ID3Timestamp,
FormattedText
)
from ..utils import (
string_processing
)
INVIDIOUS_INSTANCE = "https://yewtu.be/feed/popular"
class Youtube(Page):
"""
The youtube downloader should use https://invidious.io/
to make the request.
They are an alternative frontend.
To find an artist filter for chanel and search for
`{artist.name} - Topic`
and then ofc check for viable results.
Ofc you can also implement searching songs by isrc.
NOTE: I didn't look at the invidious api yet. If it sucks,
feel free to use projects like youtube-dl.
But don't implement you're own youtube client.
I don't wanna maintain that shit.
"""
API_SESSION: requests.Session = requests.Session()
SOURCE_TYPE = SourcePages.YOUTUBE