diff options
author | garret <garret@airmail.cc> | 2024-08-11 11:43:12 +0100 |
---|---|---|
committer | garret <garret@airmail.cc> | 2024-08-11 11:43:12 +0100 |
commit | b5298403470347bfba79130c49bb7dca7ee906d8 (patch) | |
tree | 458efb22b87b2fb693d98e2c3418e5af39346dfa /misc | |
parent | 032c7951143e6452aeda34863bb38fed7ad26d3e (diff) | |
download | yt-dlp-rajiko-b5298403470347bfba79130c49bb7dca7ee906d8.tar.gz yt-dlp-rajiko-b5298403470347bfba79130c49bb7dca7ee906d8.tar.bz2 yt-dlp-rajiko-b5298403470347bfba79130c49bb7dca7ee906d8.zip |
move misc stuff to "misc" folder
the tests arent tests really, probably shouldnt give that impression
+ maybe now they wont get automatically included in the build
Diffstat (limited to 'misc')
-rw-r--r-- | misc/how to do a release | 46 | ||||
-rwxr-xr-x | misc/randominfo.py | 12 | ||||
-rwxr-xr-x | misc/test-tokens.py | 26 |
3 files changed, 84 insertions, 0 deletions
diff --git a/misc/how to do a release b/misc/how to do a release new file mode 100644 index 0000000..ca99af6 --- /dev/null +++ b/misc/how to do a release @@ -0,0 +1,46 @@ +putting this here because i'll forget how to do it otherwise + +update the pyproject.toml +tag it in git, eg v1.0 + +## build the builds +python3 -m build + +and then put BOTH items from `dist` into the pip index dir - ~/site2/yt-dlp-rajiko/pip/yt-dlp-rajiko/ +because without the .whl pip has to "build" it itself, with all the stuff that needs to be installed for that to work +update the pip index html + +## update the changelog file + +~/site2/yt-dlp-rajiko/CHANGELOG + +``` +version number +date (git log v1.0 --pretty --date=rfc2822) +url: whl download link +sha256: sha256 of the whl +brief summary of the release +can span multiple lines + +bullet points of changes, 1 per line +simple present tense, third person singular - continue "this release...", eg.. +fixes a bug where the computer would explode +makes downloading 5000x faster +``` + +./generate_changelog.py to make the new rss feed + +## update the website + +move the previous release into the "Previous releases" <details> +update the sha256 (just sha256 command in the pip dir) +update the whl link +repeat for japanese version + +now push to the server + +## update github + +paste the changelog output into a github release, upload the new builds + +and thats probably all diff --git a/misc/randominfo.py b/misc/randominfo.py new file mode 100755 index 0000000..bdb7660 --- /dev/null +++ b/misc/randominfo.py @@ -0,0 +1,12 @@ +#!/usr/bin/env python3 +from yt_dlp_plugins.extractor import radiko +from yt_dlp import YoutubeDL + + +ie = radiko._RadikoBaseIE() +ydl = YoutubeDL(auto_init=False) +ie.set_downloader(ydl) + +info = ie._generate_random_info() +print("random device info") +print(info) diff --git a/misc/test-tokens.py b/misc/test-tokens.py new file mode 100755 index 0000000..ba6475f --- /dev/null +++ b/misc/test-tokens.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python3 +import unittest + +from yt_dlp_plugins.extractor import radiko +from yt_dlp import YoutubeDL + + +class test_tokens(unittest.TestCase): + + def setUp(self): + self.ie = radiko._RadikoBaseIE() + ydl = YoutubeDL(auto_init=False) + self.ie.set_downloader(ydl) + + def test_area(self): + # check areas etc work + for i in range(1, 48): + area = "JP" + str(i) + with self.subTest(f"Negotiating token for {area}", area=area): + token = self.ie._negotiate_token(area) + self.assertEqual(token.get("X-Radiko-AreaId"), area) + + +if __name__ == '__main__': + unittest.main() + # may wish to set failfast=True |