updated github pages to includes altstore source

This commit is contained in:
Balackburn 2023-07-07 17:44:32 +02:00
parent 7687f6fc87
commit 295b6933f6
6 changed files with 222 additions and 25 deletions

50
.github/workflows/update_source.yml vendored Normal file
View file

@ -0,0 +1,50 @@
name: Update apps.json everyday
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
repository_dispatch:
types: [update-altstore-source-trigger]
jobs:
update_json:
runs-on: ubuntu-latest
steps:
- name: Delay for repository_dispatch event
if: github.event_name == 'repository_dispatch'
run: |
echo "Waiting for 8 minutes..."
sleep 480 # 8 minutes x 60 seconds
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests
- name: Run script
run: |
python Altstore/scripts/update_json.py
- name: Check for changes
id: check_changes
run: |
git diff --exit-code || echo "::set-output name=has_changes::true"
- name: Commit and push changes
if: steps.check_changes.outputs.has_changes == 'true'
run: |
git config --global user.email "actions@github.com"
git config --global user.name "GitHub Actions"
git add .
git commit -m "Update JSON file with latest release"
git push

108
Altstore/apps.json Normal file
View file

@ -0,0 +1,108 @@
{
"name": "YTLitePlus (for Altstore)",
"identifier": "com.ytlite.source",
"apps": [
{
"beta": false,
"name": "Youtube (YTLitePlus)",
"bundleIdentifier": "com.google.ios.youtube",
"developerName": "Dayanch96 & Arichorn",
"subtitle": "YTLite with more features!",
"version": "18.25.1",
"versionDate": "2023-07-07T11:40:48Z",
"versionDescription": "Current YouTube IPA: \"18.25.1\" \r\nCurrent YTLitePlus Version: \"2.2\" \r\nCurrent App Compatibility: \"iOS/iPadOS 14.0\" or later\r\n\r\nRELEASE 18.25.1\u20222.2: (2023\u202207\u202207)\r\n\r\n\u2022 Updated YTLite from \"2.1\" to \"2.2\" (@dayanch96) \r\n \u2022 Added:\r\n \u2022 Extra speed options\r\n \u2022 Auto fullscreen\r\n \u2022 Remove 'Play next in queue' from the menu\r\n \u2022 Remove 'Continue watching' block\r\n \u2022 Fixed:\r\n \u2022 'Classic Video Quality' option for newer YT versions (See line 278)\r\n \u2022 'Disable Double Tap To Seek' option for newer YT versions\r\n \u2022 Some Shorts was appearing in Search results\r\n \u2022 Enabled ads was displaying blank blocks instead of ads in home feed\r\n\r\n\u2022 Added \"YTNoCommunityPosts\" (@arichorn)\r\n \u2022 Tweak to add a setting to disable all Community Posts on the YouTube app\r\n \r\n\u2022 Added \"AppVersionSpoofer\" (@arichorn)\r\n \u2022 Mimic YouTube versions to access specific features, layouts, and resolve issues.\r\n\r\n\u2022 Fixed issue 3 \r\n\r\nIssues in this Release:\r\n\u2022 LowContrastMode doesn't work (it work with older YT version)\r\n\u2022 YTSpeed not working (both broken in v18.19.1+)",
"downloadURL": "https://github.com/Balackburn/YTLitePlus/releases/download/v18.25.1-2.2/YTLitePlus_18.25.1_2.2.ipa",
"localizedDescription": "YTLite with more features! \n\nSupercharge your YouTube experience with +15 tweaks: \n\n\u2022 YTLite: Ad-blocking & background playback, +50 options\n\u2022 iSponsorBlock: Skip sponsor ads\n\u2022 YouPiP: Native PiP mode\n\u2022 YTUHD: 2K & 4K video quality\n\u2022 YouTube Dislike Return: Reinstate dislike counts\n\u2022 YTClassicVideoQuality: Old video quality selector\n\u2022 YTNoHoverCards: Disable suggested videos\n\u2022 YTABGoodies: Disable A/B testing features\n\u2022 NOYTPremium: Remove Premium upsell alerts\n\u2022 YTSpeed: Add 2.25x to 4x playback speeds\n\u2022 YTMiniplayerEnabler: Enable Miniplayer\n\u2022 DontEatMyContent: Prevent notch issues\n\u2022 YTShortsProgress: Enable progress bar for Shorts\n\u2022 YTABConfig: Control A/B testing flags\n\u2022 YouMute: Mute/unmute videos\n\u2022 LowContrastMode: Reduce interface contrast\n\u2022 And many more...",
"iconURL": "https://balackburn.github.io/YTLitePlus/images/image_0.png",
"tintColor": "e22a41",
"size": 102617217,
"screenshotURLs": [
"https://balackburn.github.io/YTLitePlus/images/image_6.png",
"https://balackburn.github.io/YTLitePlus/images/image_7.png",
"https://balackburn.github.io/YTLitePlus/images/image_8.png",
"https://balackburn.github.io/YTLitePlus/images/image_9.png",
"https://balackburn.github.io/YTLitePlus/images/image_10.png",
"https://balackburn.github.io/YTLitePlus/images/image_11.png",
"https://balackburn.github.io/YTLitePlus/images/image_12.png",
"https://balackburn.github.io/YTLitePlus/images/image_13.png"
],
"appPermissions": {
"entitlements": [
{
"name": "com.apple.security.application-groups"
},
{
"name": "com.apple.developer.associated-domains"
},
{
"name": "com.apple.developer.coremedia.allow-alternate-video-decoder-selection"
},
{
"name": "com.apple.developer.usernotifications.time-sensitive"
},
{
"name": "com.apple.developer.coremedia.allow-alternate-video-decoder-selection"
},
{
"name": "com.apple.developer.usernotifications.time-sensitive"
},
{
"name": "get-task-allow"
},
{
"name": "com.apple.developer.device-information.user-assigned-device-name"
},
{
"name": "com.apple.developer.group-session"
},
{
"name": "keychain-access-groups"
},
{
"name": "com.apple.developer.networking.multicast"
},
{
"name": "aps-environment"
},
{
"name": "com.apple.developer.networking.wifi-info"
}
],
"privacy": [
{
"name": "AppleMusic",
"usageDescription": "YTLitePlus requires access to your Apple Music library."
},
{
"name": "BluetoothPeripheral",
"usageDescription": "YTLitePlus requires Bluetooth access to connect with nearby peripherals."
},
{
"name": "Camera",
"usageDescription": "YTLitePlus requires access to the camera to capture photos and videos."
},
{
"name": "Contacts",
"usageDescription": "YTLitePlus requires access to your contacts to help you share content with your friends."
},
{
"name": "LocalNetwork",
"usageDescription": "YTLitePlus requires local network access to connect and communicate with nearby devices."
},
{
"name": "LocationWhenInUse",
"usageDescription": "YTLitePlus requires access to your location while using the app to provide personalized recommendations."
},
{
"name": "Microphone",
"usageDescription": "YTLitePlus requires access to your microphone to record audio."
},
{
"name": "PhotoLibrary",
"usageDescription": "YTLitePlus requires access to your Photo Library to save photos and videos."
}
]
}
}
]
}

View file

@ -1,24 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Altstore JSON Content</title>
<script>
fetch("https://raw.githubusercontent.com/Balackburn/YTLitePlusAltstore/main/apps.json")
.then((response) => {
if (!response.ok) {
throw new Error("HTTP error " + response.status);
}
return response.text();
})
.then((data) => {
document.body.innerHTML = "<pre>" + data + "</pre>";
})
.catch((error) => {
console.error("Fetch Error: ", error);
});
</script>
</head>
<body>
</body>
</html>

View file

@ -0,0 +1,61 @@
import json
import re
import requests
# Fetch the latest release information from GitHub
def fetch_latest_release(repo_url, keyword):
api_url = f"https://api.github.com/repos/{repo_url}/releases"
headers = {"Accept": "application/vnd.github+json"}
response = requests.get(api_url, headers=headers)
releases = response.json()
sorted_releases = sorted(releases, key=lambda x: x["published_at"], reverse=True)
for release in sorted_releases:
if keyword in release["name"]:
return release
raise ValueError(f"No release found containing the keyword '{keyword}'.")
# Update the JSON file with the fetched data
def remove_tags(text):
text = re.sub('<[^<]+?>', '', text) # Remove HTML tags
text = re.sub(r'#{1,6}\s?', '', text) # Remove markdown header tags
return text
def update_json_file(json_file, fetched_data):
with open(json_file, "r") as file:
data = json.load(file)
app = data["apps"][0]
version = re.search(r"(\d+\.\d+\.\d+)", fetched_data["tag_name"]).group(1)
app["version"] = version
app["versionDate"] = fetched_data["published_at"]
description = fetched_data["body"]
keyword = "YTLitePlus Release Information"
if keyword in description:
description = description.split(keyword, 1)[1].strip()
description = remove_tags(description)
description = re.sub(r'\*{2}', '', description)
description = re.sub(r'-', '', description)
description = re.sub(r'`', '"', description)
app["versionDescription"] = description
app["downloadURL"] = fetched_data["assets"][0]["browser_download_url"]
app["size"] = fetched_data["assets"][0]["size"]
with open(json_file, "w") as file:
json.dump(data, file, indent=2)
# Main function
def main():
repo_url = "Balackburn/YTLitePlus"
json_file = "../apps.json"
keyword = "YTLitePlus"
fetched_data = fetch_latest_release(repo_url, keyword)
update_json_file(json_file, fetched_data)
if __name__ == "__main__":
main()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB

View file

@ -426,6 +426,8 @@
.app__logo {
width: 100%;
height: auto;
border-radius: 20px;
border: 1px solid #858585;
}
.app__name {
@ -625,7 +627,7 @@
<p class="app__description">YTLite with more features!</p>
<div class="app__buttons app__buttons--desktop">
<a class="app__button-ios"
href="altstore://source/?url=https://balackburn.github.io/YTLitePlus/Altstore"
href="altstore://source/?url=https://balackburn.github.io/YTLitePlus/Altstore/apps.json"
target="_blank" title="Add to Altstore">
<img alt="Add to Altstore" src="./images/image_1.png" />
</a>