Skip to content

Commit

Permalink
Merge pull request Toufool#1 from Avasam/livesplit-integration
Browse files Browse the repository at this point in the history
Livesplit integration
  • Loading branch information
Avasam authored May 24, 2021
2 parents 2361ded + 2c403b3 commit 0bd1764
Show file tree
Hide file tree
Showing 7 changed files with 207 additions and 98 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ This program compares split images to a capture region of any window (OBS, xspli
### Compatability
- Windows 7 and 10.

### Building
- Read [requirements.txt](/requirements.txt) for information on how to run/build the python code

### Opening the program
- Download the [latest version](https://github.com/austinryan/Auto-Split/releases)
- Extract the file and open AutoSplit.exe.
Expand Down
22 changes: 22 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Requirements file for AutoSplit
#
# Python: CPython 3.7 (not 3.8 as there is no cp38 wheel for PyQt4)
#
# Usage: pip install -r requirements.txt
#
# Creating AutoSplit.exe with PyInstaller: pyinstaller -w -F --icon=src\icon.ico src\AutoSplit.py
#
# You can find other wheels here: https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyqt4
# If you use 32-bit installation of Python, use the the 2nd URL instead.
https://download.lfd.uci.edu/pythonlibs/w4tscw6k/PyQt4-4.11.4-cp37-cp37m-win_amd64.whl
# https://download.lfd.uci.edu/pythonlibs/w4tscw6k/PyQt4-4.11.4-cp37-cp37m-win32.whl
#
# Comment this out if you don't want to create AutoSplit.exe:
PyInstaller
#
# Other dependencies:
opencv-python
Pillow
ImageHash
pywin32
keyboard
2 changes: 1 addition & 1 deletion res/about.ui
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
</rect>
</property>
<property name="text">
<string>Version: 1.2.0</string>
<string>Version: </string>
</property>
</widget>
<widget class="QLabel" name="donatetextLabel">
Expand Down
257 changes: 168 additions & 89 deletions src/AutoSplit.py

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions src/about.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def retranslateUi(self, aboutAutoSplitWidget):
aboutAutoSplitWidget.setWindowTitle(_translate("aboutAutoSplitWidget", "About AutoSplit", None))
self.okButton.setText(_translate("aboutAutoSplitWidget", "OK", None))
self.createdbyLabel.setText(_translate("aboutAutoSplitWidget", "<html><head/><body><p>Created by <a href=\"https://twitter.com/toufool\"><span style=\" text-decoration: underline; color:#0000ff;\">Toufool</span></a> and <a href=\"https://twitter.com/faschz\"><span style=\" text-decoration: underline; color:#0000ff;\">Faschz</span></a></p></body></html>", None))
self.versionLabel.setText(_translate("aboutAutoSplitWidget", "Version: 1.5.0", None))
self.versionLabel.setText(_translate("aboutAutoSplitWidget", "Version: ", None))
self.donatetextLabel.setText(_translate("aboutAutoSplitWidget", "If you enjoy using this program, please\n"
" consider donating. Thank you!", None))
self.donatebuttonLabel.setText(_translate("aboutAutoSplitWidget", "<html><head/><body><p><a href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=BYRHQG69YRHBA&item_name=AutoSplit+development&currency_code=USD&source=url\"><img src=\":/resources/donatebutton.png\"/></p></body></html>", None))
Expand All @@ -75,4 +75,3 @@ def retranslateUi(self, aboutAutoSplitWidget):
ui.setupUi(aboutAutoSplitWidget)
aboutAutoSplitWidget.show()
sys.exit(app.exec_())

11 changes: 8 additions & 3 deletions src/menu_bar.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,23 @@
from PyQt4 import QtGui
import about

# AutoSplit Version number
VERSION = "1.5.0"


# About Window
class AboutWidget(QtGui.QWidget, about.Ui_aboutAutoSplitWidget):
def __init__(self):
super(AboutWidget, self).__init__()
self.setupUi(self)
self.createdbyLabel.setOpenExternalLinks(True)
self.donatebuttonLabel.setOpenExternalLinks(True)
self.versionLabel.setText(f"Version: {VERSION}")
self.show()

def viewHelp(self):
os.system("start \"\" https://github.com/Toufool/Auto-Split#tutorial")
return

def viewHelp():
os.system("start \"\" https://github.com/Toufool/Auto-Split/blob/master/README.md#tutorial")


def about(self):
Expand Down
7 changes: 4 additions & 3 deletions src/settings_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,10 @@ def loadSettings(self):
keyboard.remove_hotkey(self.split_hotkey)
except AttributeError:
pass
self.splitLineEdit.setText(str(self.split_key))
self.split_hotkey = keyboard.add_hotkey(str(self.split_key), self.startAutoSplitter)
self.old_split_key = self.split_key
if self.is_auto_controlled == False:
self.splitLineEdit.setText(str(self.split_key))
self.split_hotkey = keyboard.add_hotkey(str(self.split_key), self.startAutoSplitter)
self.old_split_key = self.split_key
# pass if the key is an empty string (hotkey was never set)
except ValueError:
pass
Expand Down

0 comments on commit 0bd1764

Please sign in to comment.