-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Adds check to latest GitHub release - If new version found, can open up to that webpage
- Loading branch information
Showing
5 changed files
with
76 additions
and
5 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
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,5 +1,10 @@ | ||
from importlib.metadata import version | ||
|
||
from .gui import MainWindow | ||
|
||
# Get the version | ||
__version__ = version(__name__) | ||
|
||
__all__ = [ | ||
"MainWindow", | ||
] |
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 @@ | ||
import requests | ||
|
||
def check_github_version(): | ||
"""Check NXBrew-dl version on GitHub. Returns version and associated URL""" | ||
|
||
url = "https://api.github.com/repos/bbtufty/nxbrew-dl/releases/latest" | ||
r = requests.get(url) | ||
|
||
json = r.json() | ||
|
||
# Pull out version and URL | ||
version = json["name"] | ||
github_url = json["html_url"] | ||
|
||
return version, github_url |