-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
apps.0install.net
committed
Sep 23, 2021
1 parent
bf80d34
commit 5565209
Showing
10 changed files
with
96 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,6 @@ | ||
#os=Linux | ||
from urllib import request | ||
import re | ||
from datetime import datetime | ||
import sys, os | ||
sys.path.insert(0, os.path.abspath(os.path.dirname(__file__))) | ||
import blender | ||
|
||
def regex(url, pattern): | ||
return re.findall(pattern, request.urlopen(url).read().decode('utf-8')) | ||
|
||
def to_zi_version(input): | ||
suffix = '' | ||
if input.endswith('-alpha'): | ||
input = input.replace('-alpha', '') | ||
suffix = '-pre-pre' | ||
if input.endswith('-beta'): | ||
input = input.replace('-beta', '') | ||
suffix = '-pre' | ||
if not input[-1].isdigit(): | ||
input = input[:-1] + '-' + str(ord(input[-1]) - 96) | ||
return input + suffix | ||
|
||
releases = [] | ||
|
||
for version_main in regex('https://download.blender.org/release/', r'>Blender([\d\.a-z]+)\/<\/a>'): | ||
for match in regex('https://download.blender.org/release/Blender' + version_main + '/', r'>blender-([\d\.\-a-z]+)-linux-x64\.tar\.xz<\/a>\s+(..-...-....)'): | ||
releases.append({ | ||
'version': to_zi_version(match[0].replace('-release', '').replace('rc', '-rc')), | ||
'version-main': version_main, | ||
'version-full': match[0], | ||
'stability': 'testing' if 'alpha' in match[0] or 'beta' in match[0] or 'rc' in match[0] else 'stable', | ||
'released': datetime.strftime(datetime.strptime(match[1], '%d-%b-%Y'), '%Y-%m-%d') | ||
}) | ||
releases = blender.releases('linux-x64.tar.xz') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,6 @@ | ||
#os=Darwin | ||
from urllib import request | ||
import re | ||
from datetime import datetime | ||
import sys, os | ||
sys.path.insert(0, os.path.abspath(os.path.dirname(__file__))) | ||
import blender | ||
|
||
def regex(url, pattern): | ||
return re.findall(pattern, request.urlopen(url).read().decode('utf-8')) | ||
|
||
def to_zi_version(input): | ||
suffix = '' | ||
if input.endswith('-alpha'): | ||
input = input.replace('-alpha', '') | ||
suffix = '-pre-pre' | ||
if input.endswith('-beta'): | ||
input = input.replace('-beta', '') | ||
suffix = '-pre' | ||
if not input[-1].isdigit(): | ||
input = input[:-1] + '-' + str(ord(input[-1]) - 96) | ||
return input + suffix | ||
|
||
releases = [] | ||
|
||
for version_main in regex('https://download.blender.org/release/', r'>Blender([\d\.a-z]+)\/<\/a>'): | ||
for match in regex('https://download.blender.org/release/Blender' + version_main + '/', r'>blender-([\d\.\-a-z]+)-macos-x64\.dmg<\/a>\s+(..-...-....)'): | ||
releases.append({ | ||
'version': to_zi_version(match[0].replace('-release', '').replace('rc', '-rc')), | ||
'version-main': version_main, | ||
'version-full': match[0], | ||
'stability': 'testing' if 'alpha' in match[0] or 'beta' in match[0] or 'rc' in match[0] else 'stable', | ||
'released': datetime.strftime(datetime.strptime(match[1], '%d-%b-%Y'), '%Y-%m-%d') | ||
}) | ||
releases = blender.releases('macos-x64.dmg') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,6 @@ | ||
#os=Windows | ||
from urllib import request | ||
import re | ||
from datetime import datetime | ||
import sys, os | ||
sys.path.insert(0, os.path.abspath(os.path.dirname(__file__))) | ||
import blender | ||
|
||
def regex(url, pattern): | ||
return re.findall(pattern, request.urlopen(url).read().decode('utf-8')) | ||
|
||
def to_zi_version(input): | ||
suffix = '' | ||
if input.endswith('-alpha'): | ||
input = input.replace('-alpha', '') | ||
suffix = '-pre-pre' | ||
if input.endswith('-beta'): | ||
input = input.replace('-beta', '') | ||
suffix = '-pre' | ||
if not input[-1].isdigit(): | ||
input = input[:-1] + '-' + str(ord(input[-1]) - 96) | ||
return input + suffix | ||
|
||
releases = [] | ||
|
||
for version_main in regex('https://download.blender.org/release/', r'>Blender([\d\.a-z]+)\/<\/a>'): | ||
for match in regex('https://download.blender.org/release/Blender' + version_main + '/', r'>blender-([\d\.\-a-z]+)-windows-x64\.zip<\/a>\s+(..-...-....)'): | ||
releases.append({ | ||
'version': to_zi_version(match[0].replace('-release', '').replace('rc', '-rc')), | ||
'version-main': version_main, | ||
'version-full': match[0], | ||
'stability': 'testing' if 'alpha' in match[0] or 'beta' in match[0] or 'rc' in match[0] else 'stable', | ||
'released': datetime.strftime(datetime.strptime(match[1], '%d-%b-%Y'), '%Y-%m-%d') | ||
}) | ||
releases = blender.releases('windows-x64.zip') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from urllib import request | ||
import re | ||
from datetime import datetime | ||
|
||
def regex(url, pattern): | ||
return re.findall(pattern, request.urlopen(url).read().decode('utf-8')) | ||
|
||
def releases(suffix): | ||
for minor_version in regex('https://download.blender.org/release/', r'>Blender([\d\.a-z]+)\/<\/a>'): | ||
for match in regex('https://download.blender.org/release/Blender' + minor_version + '/', r'>blender-([\d\.\-a-z]+)-' + re.escape(suffix) + '<\/a>\s+(..-...-....)'): | ||
yield { | ||
'version': match[0], | ||
'minor-version': minor_version, | ||
'released': datetime.strftime(datetime.strptime(match[1], '%d-%b-%Y'), '%Y-%m-%d') | ||
} |