Skip to content

Commit

Permalink
bump version number
Browse files Browse the repository at this point in the history
  • Loading branch information
tobi committed May 25, 2021
1 parent 7a08531 commit f784887
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 19 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ build.bat
config.ini
oconsole.spec
.vscode/settings.json
blender_alternative.ico
49 changes: 30 additions & 19 deletions BlenderUpdater.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

app.setAttribute(QtCore.Qt.AA_EnableHighDpiScaling)

appversion = "1.9.6"
appversion = "1.9.7"
dir_ = ""
config = configparser.ConfigParser()
btn = {}
Expand Down Expand Up @@ -316,16 +316,16 @@ def check(self):
soup = BeautifulSoup(req.text, "html.parser")

def clean(text):
''' Removes spaces and uneeded characters from the given text. '''
""" Removes spaces and uneeded characters from the given text. """

return text.strip().strip("\xa0")

def parse_description(element):
''' Parses the given description element.
"""Parses the given description element.
Input text may look like:
<span>May 24, 07:44:19 - blender-v283-release - d553edeb7dbb - zip - 171.79MB</span>
'''
Input text may look like:
<span>May 24, 07:44:19 - blender-v283-release - d553edeb7dbb - zip - 171.79MB</span>
"""

if element is None:
return None
Expand Down Expand Up @@ -363,7 +363,9 @@ def parse_description(element):
info["size"] = description_data["size"]
info["type"] = description_data["type"]
info["url"] = clean(url)
info["version"] = description_data["name"] + "_" + description_data["hash"]
info["version"] = (
description_data["name"] + "_" + description_data["hash"]
)

# Set "os" based on URL
if "windows" in clean(url):
Expand All @@ -378,12 +380,12 @@ def parse_description(element):
finallist = results

def render_buttons(os_filter=["windows", "osx", "linux"]):
''' Renders the download buttons on screen.
"""Renders the download buttons on screen.
os_filter: Will modify the buttons to be rendered.
If an empty list is being provided, all operating systems
will be shown.
'''
os_filter: Will modify the buttons to be rendered.
If an empty list is being provided, all operating systems
will be shown.
"""
# Generate buttons for downloadable versions.
global btn
opsys = platform.system()
Expand Down Expand Up @@ -429,24 +431,33 @@ def render_buttons(os_filter=["windows", "osx", "linux"]):
btn[index].move(6, 50 + i)
i += 32
btn[index].clicked.connect(
lambda throwaway=0, entry=entry: self.download(
entry
)
lambda throwaway=0, entry=entry: self.download(entry)
)
btn[index].show()


def filterall():
render_buttons(os_filter=["windows", "osx", "linux"])

def filterosx():
render_buttons(os_filter=["osx",])
render_buttons(
os_filter=[
"osx",
]
)

def filterlinux():
render_buttons(os_filter=["linux",])
render_buttons(
os_filter=[
"linux",
]
)

def filterwindows():
render_buttons(os_filter=["windows",])
render_buttons(
os_filter=[
"windows",
]
)

self.lbl_available.show()
self.lbl_caution.show()
Expand Down

0 comments on commit f784887

Please sign in to comment.