Skip to content

Commit

Permalink
Small update
Browse files Browse the repository at this point in the history
  • Loading branch information
KazukiPrzyborowski committed Oct 17, 2024
1 parent 5161345 commit b0bd7d7
Show file tree
Hide file tree
Showing 22 changed files with 34 additions and 31 deletions.
2 changes: 1 addition & 1 deletion example.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
Copyright 2015-2024 Game Maker 2k - https://github.com/GameMaker2k
Copyright 2015-2024 Kazuki Przyborowski - https://github.com/KazukiPrzyborowski
$FileInfo: example.py - Last Update: 10/11/2024 Ver. 0.9.2 RC 1 - Author: cooldude2k $
$FileInfo: example.py - Last Update: 10/17/2024 Ver. 0.9.4 RC 1 - Author: cooldude2k $
'''

from __future__ import print_function
Expand Down
2 changes: 1 addition & 1 deletion mkhockeybundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
Copyright 2015-2024 Game Maker 2k - https://github.com/GameMaker2k
Copyright 2015-2024 Kazuki Przyborowski - https://github.com/KazukiPrzyborowski
$FileInfo: mkbundle.py - Last Update: 10/11/2024 Ver. 0.9.2 RC 1 - Author: cooldude2k $
$FileInfo: mkbundle.py - Last Update: 10/17/2024 Ver. 0.9.4 RC 1 - Author: cooldude2k $
'''

import os
Expand Down
2 changes: 1 addition & 1 deletion mkhockeytool.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
Copyright 2015-2024 Game Maker 2k - https://github.com/GameMaker2k
Copyright 2015-2024 Kazuki Przyborowski - https://github.com/KazukiPrzyborowski
$FileInfo: mkhockeytool.py - Last Update: 10/11/2024 Ver. 0.9.2 RC 1 - Author: cooldude2k $
$FileInfo: mkhockeytool.py - Last Update: 10/17/2024 Ver. 0.9.4 RC 1 - Author: cooldude2k $
'''

from __future__ import (absolute_import, division, print_function,
Expand Down
2 changes: 1 addition & 1 deletion php/data/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
Copyright 2015-2020 Game Maker 2k - https://github.com/GameMaker2k
Copyright 2015-2020 Kazuki Przyborowski - https://github.com/KazukiPrzyborowski
$FileInfo: index.php - Last Update: 12/03/2023 Ver. 0.8.8 RC 1 - Author: cooldude2k $
$FileInfo: index.php - Last Update: 10/17/2024 Ver. 0.9.4 RC 1 - Author: cooldude2k $
*/
header('Location: ../index.php');
2 changes: 1 addition & 1 deletion php/html.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
Copyright 2015-2024 Game Maker 2k - https://github.com/GameMaker2k
Copyright 2015-2024 Kazuki Przyborowski - https://github.com/KazukiPrzyborowski
$FileInfo: html.php - Last Update: 10/11/2024 Ver. 0.9.0 RC 1 - Author: cooldude2k $
$FileInfo: html.php - Last Update: 10/17/2024 Ver. 0.9.4 RC 1 - Author: cooldude2k $
*/
if (!ob_start("ob_gzhandler")) {
ob_start();
Expand Down
2 changes: 1 addition & 1 deletion php/old.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
Copyright 2015-2024 Game Maker 2k - https://github.com/GameMaker2k
Copyright 2015-2024 Kazuki Przyborowski - https://github.com/KazukiPrzyborowski
$FileInfo: index.php - Last Update: 10/11/2024 Ver. 0.9.0 RC 1 - Author: cooldude2k $
$FileInfo: index.php - Last Update: 10/17/2024 Ver. 0.9.4 RC 1 - Author: cooldude2k $
*/
if (!ob_start("ob_gzhandler")) {
ob_start();
Expand Down
2 changes: 1 addition & 1 deletion php/xhtml.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
Copyright 2015-2024 Game Maker 2k - https://github.com/GameMaker2k
Copyright 2015-2024 Kazuki Przyborowski - https://github.com/KazukiPrzyborowski
$FileInfo: xhtml.php - Last Update: 10/11/2024 Ver. 0.9.0 RC 1 - Author: cooldude2k $
$FileInfo: xhtml.php - Last Update: 10/17/2024 Ver. 0.9.4 RC 1 - Author: cooldude2k $
*/
if (!ob_start("ob_gzhandler")) {
ob_start();
Expand Down
2 changes: 1 addition & 1 deletion php/xml.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
Copyright 2015-2024 Game Maker 2k - https://github.com/GameMaker2k
Copyright 2015-2024 Kazuki Przyborowski - https://github.com/KazukiPrzyborowski
$FileInfo: xml.php - Last Update: 10/11/2024 Ver. 0.9.0 RC 1 - Author: cooldude2k $
$FileInfo: xml.php - Last Update: 10/17/2024 Ver. 0.9.4 RC 1 - Author: cooldude2k $
*/
if (!ob_start("ob_gzhandler")) {
ob_start();
Expand Down
2 changes: 1 addition & 1 deletion pyhockeystats/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
Copyright 2015-2024 Game Maker 2k - https://github.com/GameMaker2k
Copyright 2015-2024 Kazuki Przyborowski - https://github.com/KazukiPrzyborowski
$FileInfo: __init__.py - Last Update: 10/11/2024 Ver. 0.9.2 RC 1 - Author: cooldude2k $
$FileInfo: __init__.py - Last Update: 10/17/2024 Ver. 0.9.4 RC 1 - Author: cooldude2k $
'''

from __future__ import (absolute_import, division, print_function,
Expand Down
2 changes: 1 addition & 1 deletion pyhockeystats/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
Copyright 2015-2024 Game Maker 2k - https://github.com/GameMaker2k
Copyright 2015-2024 Kazuki Przyborowski - https://github.com/KazukiPrzyborowski
$FileInfo: __main__.py - Last Update: 10/11/2024 Ver. 0.9.2 RC 1 - Author: cooldude2k $
$FileInfo: __main__.py - Last Update: 10/17/2024 Ver. 0.9.4 RC 1 - Author: cooldude2k $
'''

from __future__ import (absolute_import, division, print_function,
Expand Down
2 changes: 1 addition & 1 deletion pyhockeystats/hockeydatabase.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
Copyright 2015-2024 Game Maker 2k - https://github.com/GameMaker2k
Copyright 2015-2024 Kazuki Przyborowski - https://github.com/KazukiPrzyborowski
$FileInfo: hockeydatabase.py - Last Update: 10/11/2024 Ver. 0.9.2 RC 1 - Author: cooldude2k $
$FileInfo: hockeydatabase.py - Last Update: 10/17/2024 Ver. 0.9.4 RC 1 - Author: cooldude2k $
'''

from __future__ import (absolute_import, division, print_function,
Expand Down
2 changes: 1 addition & 1 deletion pyhockeystats/hockeydwnload.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
Copyright 2015-2024 Game Maker 2k - https://github.com/GameMaker2k
Copyright 2015-2024 Kazuki Przyborowski - https://github.com/KazukiPrzyborowski
$FileInfo: downloader.py - Last Update: 10/11/2024 Ver. 0.9.2 RC 1 - Author: cooldude2k $
$FileInfo: downloader.py - Last Update: 10/17/2024 Ver. 0.9.4 RC 1 - Author: cooldude2k $
'''

from __future__ import absolute_import, division, print_function, unicode_literals
Expand Down
2 changes: 1 addition & 1 deletion pyhockeystats/hockeyfunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
Copyright 2015-2024 Game Maker 2k - https://github.com/GameMaker2k
Copyright 2015-2024 Kazuki Przyborowski - https://github.com/KazukiPrzyborowski
$FileInfo: hockeyfunctions.py - Last Update: 10/11/2024 Ver. 0.9.2 RC 1 - Author: cooldude2k $
$FileInfo: hockeyfunctions.py - Last Update: 10/17/2024 Ver. 0.9.4 RC 1 - Author: cooldude2k $
'''

from __future__ import (absolute_import, division, print_function,
Expand Down
2 changes: 1 addition & 1 deletion pyhockeystats/hockeyoopfuncs.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
Copyright 2015-2024 Game Maker 2k - https://github.com/GameMaker2k
Copyright 2015-2024 Kazuki Przyborowski - https://github.com/KazukiPrzyborowski
$FileInfo: hockeyoopfuncs.py - Last Update: 10/11/2024 Ver. 0.9.2 RC 1 - Author: cooldude2k $
$FileInfo: hockeyoopfuncs.py - Last Update: 10/17/2024 Ver. 0.9.4 RC 1 - Author: cooldude2k $
'''

from __future__ import (absolute_import, division, print_function,
Expand Down
2 changes: 1 addition & 1 deletion pyhockeystats/hockeyshortcuts.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
Copyright 2015-2024 Game Maker 2k - https://github.com/GameMaker2k
Copyright 2015-2024 Kazuki Przyborowski - https://github.com/KazukiPrzyborowski
$FileInfo: hockeyshortcuts.py - Last Update: 10/11/2024 Ver. 0.9.2 RC 1 - Author: cooldude2k $
$FileInfo: hockeyshortcuts.py - Last Update: 10/17/2024 Ver. 0.9.4 RC 1 - Author: cooldude2k $
'''

from __future__ import (absolute_import, division, print_function,
Expand Down
2 changes: 1 addition & 1 deletion pyhockeystats/sgmldtd/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
Copyright 2015-2024 Game Maker 2k - https://github.com/GameMaker2k
Copyright 2015-2024 Kazuki Przyborowski - https://github.com/KazukiPrzyborowski
$FileInfo: __init__.py - Last Update: 10/11/2024 Ver. 0.9.2 RC 1 - Author: cooldude2k $
$FileInfo: __init__.py - Last Update: 10/17/2024 Ver. 0.9.4 RC 1 - Author: cooldude2k $
'''

from __future__ import (absolute_import, division, print_function,
Expand Down
6 changes: 3 additions & 3 deletions pyhockeystats/versioninfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
Copyright 2015-2024 Game Maker 2k - https://github.com/GameMaker2k
Copyright 2015-2024 Kazuki Przyborowski - https://github.com/KazukiPrzyborowski
$FileInfo: versioninfo.py - Last Update: 10/11/2024 Ver. 0.9.2 RC 1 - Author: cooldude2k $
$FileInfo: versioninfo.py - Last Update: 10/17/2024 Ver. 0.9.4 RC 1 - Author: cooldude2k $
'''

from __future__ import (absolute_import, division, print_function,
Expand Down Expand Up @@ -98,7 +98,7 @@ def get_python_info(infotype=None):
__project__ = __program_name__
__project_url__ = "https://github.com/GameMaker2k/Neo-Hockey-Test"
__project_release_url__ = "https://github.com/GameMaker2k/Neo-Hockey-Test/releases/latest"
__version_info__ = (0, 9, 2, "RC 1", 1)
__version_info__ = (0, 9, 4, "RC 1", 1)
__build_time__ = {"timestamp": None, "year": None, "month": None,
"day": None, "hour": None, "minute": None, "second": None}
__build_time_utc__ = {"timestamp": None, "year": None, "month": None,
Expand Down Expand Up @@ -138,7 +138,7 @@ def version_info():
return {"major": __version_info__[0], "minor": __version_info__[1], "build": __version_info__[2], "release": None}


__version_date_info__ = (2024, 10, 12, "RC 1", 1)
__version_date_info__ = (2024, 10, 17, "RC 1", 1)


def version_date():
Expand Down
2 changes: 1 addition & 1 deletion pyhockeystats/xmldtd/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
Copyright 2015-2024 Game Maker 2k - https://github.com/GameMaker2k
Copyright 2015-2024 Kazuki Przyborowski - https://github.com/KazukiPrzyborowski
$FileInfo: __init__.py - Last Update: 10/11/2024 Ver. 0.9.2 RC 1 - Author: cooldude2k $
$FileInfo: __init__.py - Last Update: 10/17/2024 Ver. 0.9.4 RC 1 - Author: cooldude2k $
'''

from __future__ import (absolute_import, division, print_function,
Expand Down
2 changes: 1 addition & 1 deletion pyshell-old.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
Copyright 2015-2024 Game Maker 2k - https://github.com/GameMaker2k
Copyright 2015-2024 Kazuki Przyborowski - https://github.com/KazukiPrzyborowski
$FileInfo: pyshell-old.py - Last Update: 10/11/2024 Ver. 0.9.2 RC 1 - Author: cooldude2k $
$FileInfo: pyshell-old.py - Last Update: 10/17/2024 Ver. 0.9.4 RC 1 - Author: cooldude2k $
'''

from __future__ import print_function
Expand Down
2 changes: 1 addition & 1 deletion pyshell.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
Copyright 2015-2024 Game Maker 2k - https://github.com/GameMaker2k
Copyright 2015-2024 Kazuki Przyborowski - https://github.com/KazukiPrzyborowski
$FileInfo: pyshell.py - Last Update: 10/11/2024 Ver. 0.9.2 RC 1 - Author: cooldude2k $
$FileInfo: pyshell.py - Last Update: 10/17/2024 Ver. 0.9.4 RC 1 - Author: cooldude2k $
'''

from __future__ import absolute_import, division, print_function
Expand Down
2 changes: 1 addition & 1 deletion pyverinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
Copyright 2015-2024 Game Maker 2k - https://github.com/GameMaker2k
Copyright 2015-2024 Kazuki Przyborowski - https://github.com/KazukiPrzyborowski
$FileInfo: pyverinfo.py - Last Update: 10/11/2024 Ver. 0.9.2 RC 1 - Author: cooldude2k $
$FileInfo: pyverinfo.py - Last Update: 10/17/2024 Ver. 0.9.4 RC 1 - Author: cooldude2k $
'''

import json
Expand Down
19 changes: 11 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
Copyright 2015-2024 Game Maker 2k - https://github.com/GameMaker2k
Copyright 2015-2024 Kazuki Przyborowski - https://github.com/KazukiPrzyborowski
$FileInfo: setup.py - Last Update: 10/11/2024 Ver. 0.9.2 RC 1 - Author: cooldude2k $
$FileInfo: setup.py - Last Update: 10/17/2024 Ver. 0.9.4 RC 1 - Author: cooldude2k $
'''

import datetime
Expand Down Expand Up @@ -95,27 +95,30 @@
verinfofilename = os.path.realpath("." + os.path.sep + "pyhockeystats" + os.path.sep + "versioninfo.py")

# Use `with` to ensure the file is properly closed after reading
with open(verinfofilename, "r") as verinfofile:
# In Python 2, open defaults to text mode; in Python 3, it’s better to specify encoding
open_kwargs = {'encoding': 'utf-8'} if sys.version_info[0] >= 3 else {}
with open(verinfofilename, "r", **open_kwargs) as verinfofile:
verinfodata = verinfofile.read()

# Define the regex pattern for extracting version info
setuppy_verinfo_esc = re.escape("__version_info__ = (") + r"(\d+,\s*\d+,\s*\d+,\s*'?\w+\s?\d*'?,\s*\d+)" + re.escape(");")
setuppy_verinfo = re.findall(setuppy_verinfo_esc, verinfodata)
# We ensure the pattern works correctly in both Python 2 and 3 by escaping the strings properly
version_pattern = "__version_info__ = \(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*['\"]([\w\s]+)['\"]\s*,\s*(\d+)\s*\)"
setuppy_verinfo = re.findall(version_pattern, verinfodata)[0]

# If version info is found, process it; handle the case where no match is found
if setuppy_verinfo:
setuppy_verinfo_exp = [vergetspt.strip().replace("\"", "").replace("'", "") for vergetspt in setuppy_verinfo[0].split(',')]
setuppy_verinfo_exp = setuppy_verinfo
else:
print("Version info not found.")
setuppy_verinfo_exp = None # Handle missing version info gracefully

# Define the regex pattern for extracting version date info
setuppy_dateinfo_esc = re.escape("__version_date_info__ = (") + r"(\d+,\s*\d+,\s*\d+,\s*'?\w+\s?\d*'?,\s*\d+)" + re.escape(");")
setuppy_dateinfo = re.findall(setuppy_dateinfo_esc, verinfodata)
date_pattern = "__version_date_info__ = \(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*['\"]([\w\s]+)['\"]\s*,\s*(\d+)\s*\)"
setuppy_dateinfo = re.findall(date_pattern, verinfodata)[0]

# If date info is found, process it; handle the case where no match is found
if setuppy_dateinfo:
setuppy_dateinfo_exp = [vergetspt.strip().replace("\"", "").replace("'", "") for vergetspt in setuppy_dateinfo[0].split(',')]
setuppy_dateinfo_exp = setuppy_dateinfo
else:
print("Date info not found.")
setuppy_dateinfo_exp = None # Handle missing date info gracefully
Expand Down

0 comments on commit b0bd7d7

Please sign in to comment.