Skip to content

Commit

Permalink
Remove references to donations as we don't take donations anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
drojf committed Jul 12, 2024
1 parent 58f8dd1 commit 26e704c
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 71 deletions.
29 changes: 0 additions & 29 deletions common.py
Original file line number Diff line number Diff line change
Expand Up @@ -718,35 +718,6 @@ def sevenZipTest(archive_path):
]
return runProcessOutputToTempFile(arguments, sevenZipMode=True)

def getDonationStatus():
# type: () -> (Optional[str], Optional[str])
"""
:return: (months_remaining, funding_goal_percentage) as a tuple (can both be None if download or parsing failed)
"""
try:
entirePage = downloadFile(r"https://07th-mod.com/wiki/", is_text=True)
except HTTPError as error:
return None, None

class DonationHTMLParser(HTMLParser, object):
def __init__(self):
super(DonationHTMLParser, self).__init__()
self.funding_goal_percentage = None
self.months_remaining = None

def handle_starttag(self, tag, attrs):
if tag == "progress":
for k, v in attrs:
if k == 'value':
self.funding_goal_percentage = v
elif k == 'data-months-remaining':
self.months_remaining = v

parser = DonationHTMLParser()
parser.feed(entirePage)

return parser.months_remaining, parser.funding_goal_percentage

def preloadModUpdatesHTML():
html, errorInfo = getJSON("https://github.com/07th-mod/python-patcher-updates/releases/latest/download/updates.json", isURL=True)

Expand Down
8 changes: 0 additions & 8 deletions httpGUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -722,9 +722,6 @@ def __init__(self):
self.threadException = None # type: Optional[Exception]
self.selectedModName = None # type: Optional[str] # user sets this while navigating the website

self.donationMonthsRemaining = ""
self.donationProgressPercent = ""

self.lastInstallPath = "" #type: str
self.lastSubModID = 0 #type: int

Expand All @@ -738,9 +735,6 @@ def __init__(self):
def shutdown(self):
self.installRunningLock.release()

def loadDonationStatus(self):
self.donationMonthsRemaining, self.donationProgressPercent = common.getDonationStatus()

def preloadModUpdatesHTML(self):
self.updates = common.preloadModUpdatesHTML()

Expand Down Expand Up @@ -918,8 +912,6 @@ def getSubModHandlesRequestHandler(requestData):
'installAlreadyInProgress': self.installAlreadyInProgress(), # This is true if the install is currently running. Use to resume displaying an ongoing installation if the user accidentally closed the browser tab.
'lastInstallPath': self.lastInstallPath, # The last path installed to - only valid if an install is currently running.
'lastSubModID': self.lastSubModID, # The ID of the last submod installed to - only valid if an install is currently running.
'donationMonthsRemaining': self.donationMonthsRemaining, # How many months the server can be paid for with current funding
'donationProgressPercent': self.donationProgressPercent, # How close funding is to the 12 month donation goal, in percent
'landingBannerHTML': self.getUpdate('Landing Banner'), # HTML for the index page landing banner
},
}
Expand Down
8 changes: 0 additions & 8 deletions httpGUI/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,6 @@ <h5 class="uppercase mb0">Shutdown the installer</h5>

</section>
<section class="section-small-padding bg-secondary">
<div class="container">
<h4>Donation Status</h4>
<p>
Server time remaining: <b>{{ metaInfo.donationMonthsRemaining }}</b><b> months</b><br>
This year's funding goal is <b>{{ metaInfo.donationProgressPercent }}</b>% complete.<br>
<a href="https://07th-mod.com/wiki/Donations/" target="_blank">Click Here</a> to Donate!<br>
</p>
</div>
<div class="container">{{ metaInfo.buildInfo }}</div>
</section>
</div>
Expand Down
4 changes: 0 additions & 4 deletions httpGUI/python-patcher-index.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,12 @@ window.onload = function onWindowLoaded() {
dataFilters: ['Question Arcs', 'Answer Arcs', 'Console Arcs', 'Bonus Content'],
currentDataFilter: null,
masonryInitialized: false,
donationProgress: 'N months',
donationMonthsRemaining: 'XXX%',
metaInfo: {
buildInfo: '', // Installer Build Version and Date
installerIsLatest: [null, ''], // 2- Tuple of whether installer is latest, and description of version information
lockFileExists: false, // This indicates if a install is already running in a different instance, or a previous install was killed while running
operatingSystem: '', // The operating system - either 'windows', 'linux', or 'mac'
installAlreadyInProgress: false, // This is true if the install is currently running. Use to resume displaying an ongoing installation if the user accidentally closed the browser tab.
donationMonthsRemaining: '', // How many months the server can be paid for with current funding
donationProgressPercent: '', // How close funding is to the 12 month donation goal, in percent
},
modalVisible: false,
},
Expand Down
2 changes: 0 additions & 2 deletions httpGUI/python-patcher-lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,6 @@ window.onload = function onWindowLoaded() {
lockFileExists: false, // This indicates if a install is already running in a different instance, or a previous install was killed while running
operatingSystem: '', // The operating system - either 'windows', 'linux', or 'mac'
installAlreadyInProgress: false, // This is true if the install is currently running. Use to resume displaying an ongoing installation if the user accidentally closed the browser tab.
donationMonthsRemaining: '', // How many months the server can be paid for with current funding
donationProgressPercent: '', // How close funding is to the 12 month donation goal, in percent
},
// freeSpaceAdvisoryString: a message to the user indicating whether there is enough space on the selected install path
freeSpaceAdvisoryString: null,
Expand Down
1 change: 0 additions & 1 deletion httpGUI/python-patcher-rest-lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ function setModNameAndNavigate(modName) {
}

function getInitStatus(onStatusReceived) {
// Retrieve the donation status
doPost('getInitStatus', [], (response) => {
onStatusReceived(response);
});
Expand Down
4 changes: 0 additions & 4 deletions httpGUI/python-patcher-umineko-warning.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,12 @@ window.onload = function onWindowLoaded() {
data: {
subModList: [],
masonryInitialized: false,
donationProgress: 'N months',
donationMonthsRemaining: 'XXX%',
metaInfo: {
buildInfo: '', // Installer Build Version and Date
installerIsLatest: [null, ''], // 2- Tuple of whether installer is latest, and description of version information
lockFileExists: false, // This indicates if a install is already running in a different instance, or a previous install was killed while running
operatingSystem: '', // The operating system - either 'windows', 'linux', or 'mac'
installAlreadyInProgress: false, // This is true if the install is currently running. Use to resume displaying an ongoing installation if the user accidentally closed the browser tab.
donationMonthsRemaining: '', // How many months the server can be paid for with current funding
donationProgressPercent: '', // How close funding is to the 12 month donation goal, in percent
},
modalVisible: false,
},
Expand Down
8 changes: 0 additions & 8 deletions httpGUI/umineko-warning.html
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,6 @@ <h3>Please read the information below!</h3>
</section>

<section class="section-small-padding bg-secondary">
<div class="container">
<h4>Donation Status</h4>
<p>
Server time remaining: <b>{{ metaInfo.donationMonthsRemaining }}</b><b> months</b><br>
This year's funding goal is <b>{{ metaInfo.donationProgressPercent }}</b>% complete.<br>
<a href="https://07th-mod.com/wiki/Donations/" target="_blank">Click Here</a> to Donate!<br>
</p>
</div>
<div class="container">{{ metaInfo.buildInfo }}</div>
</section>
</div>
Expand Down
7 changes: 0 additions & 7 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,18 +212,11 @@ def thread_getSubModConfigList():
return getSubModConfigList(modList)

def thread_unimportantTasks():
t_loadDonations = common.makeThread(installerGUI.loadDonationStatus)
t_loadLatestInstallerStatus = common.makeThread(common.Globals.loadInstallerLatestStatus)
t_preloadModUpdatesHTML = common.makeThread(installerGUI.preloadModUpdatesHTML)
t_loadDonations.start()
t_loadLatestInstallerStatus.start()
t_preloadModUpdatesHTML.start()

try:
t_loadDonations.join(timeout=6)
except Exception as e:
print(e)

try:
t_loadLatestInstallerStatus.join(timeout=6)
except Exception as e:
Expand Down

0 comments on commit 26e704c

Please sign in to comment.