Skip to content

Commit

Permalink
Merge pull request #49 from djotaku/devel
Browse files Browse the repository at this point in the history
V3.0
  • Loading branch information
djotaku authored Nov 23, 2019
2 parents 20ff3da + 231730c commit c537364
Show file tree
Hide file tree
Showing 22 changed files with 852 additions and 541 deletions.
1 change: 1 addition & 0 deletions .github/workflows/linuxbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
cp participant.conf dist/gui/
cp Engineer.png dist/gui
cp Donation.mp3 dist/gui
cp icon.png dist/gui
tar fcvz gui.tar.gz dist/gui/
- name: Upload artifact
uses: actions/upload-artifact@v1.0.0
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/windowsbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
cp participant.conf dist/gui/
cp Engineer.png dist/gui
cp Donation.mp3 dist/gui
cp icon.png dist/gui
cp dist/gui/Qt5Core.dll dist/gui/PyQt5/Qt/bin
- name: Upload artifact
uses: actions/upload-artifact@v1.0.0
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.kdev4
*kdev4
.pytest_cache
backup_participant.conf
bin
*.pyc
how-branch
Expand All @@ -12,3 +11,4 @@ pyvenv.cfg
*.orig
OriginalDonation.mp3
for_lots_of_donors
*.bak
6 changes: 2 additions & 4 deletions IPC.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@
in because a new donation has ocurred.
"""

import readparticipantconf


def writeIPC(value):
def writeIPC(folder, value):
"""Write to the IPC file."""
folders = readparticipantconf.textfolderOnly()
folders = folder
try:
with open(f'{folders}/trackerIPC.txt', 'w') as file:
file.write(value)
Expand Down
14 changes: 12 additions & 2 deletions QTdesignerfiles/design.ui
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,17 @@
<property name="windowTitle">
<string>Extra Life Donation Tracker</string>
</property>
<property name="windowIcon">
<iconset>
<normaloff>../icon.png</normaloff>../icon.png</iconset>
</property>
<widget class="QWidget" name="centralwidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<widget class="QPushButton" name="SettingsButton">
<property name="geometry">
<rect>
Expand Down Expand Up @@ -320,7 +330,7 @@
<string>Test Alert</string>
</property>
</widget>
<widget class="QGroupBox" name="groupBox">
<widget class="QGroupBox" name="TeamGroupBox">
<property name="geometry">
<rect>
<x>10</x>
Expand Down Expand Up @@ -532,7 +542,7 @@
<string>Stop</string>
</property>
</widget>
<widget class="QLabel" name="label_8">
<widget class="QLabel" name="CopyrightLabel">
<property name="geometry">
<rect>
<x>30</x>
Expand Down
130 changes: 78 additions & 52 deletions QTdesignerfiles/settings.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,53 +6,43 @@
<rect>
<x>0</x>
<y>0</y>
<width>612</width>
<height>279</height>
<width>697</width>
<height>298</height>
</rect>
</property>
<property name="windowTitle">
<string>Settings</string>
</property>
<widget class="QWidget" name="">
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>10</x>
<y>0</y>
<width>591</width>
<height>271</height>
<width>681</width>
<height>289</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="2" column="1">
<widget class="QLineEdit" name="lineEditCurrencySymbol"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Text Folder</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLabel" name="label_tracker_image">
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<property name="verticalSpacing">
<number>2</number>
</property>
<item row="5" column="1">
<widget class="QLabel" name="label_sound">
<property name="text">
<string>No Image Selected</string>
<string>No Sound Selected</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="lineEditParticipantID"/>
</item>
<item row="1" column="1" colspan="2">
<widget class="QLabel" name="labelTextFolder">
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>No Folder Selected</string>
<string>Participant ID</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
Expand All @@ -73,54 +63,84 @@
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label">
<item row="7" column="4">
<widget class="QPushButton" name="pushButtonSave">
<property name="text">
<string>Participant ID</string>
<string>Save</string>
</property>
</widget>
</item>
<item row="1" column="1" colspan="2">
<widget class="QLabel" name="labelTextFolder">
<property name="text">
<string>No Folder Selected</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Text Folder</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QSpinBox" name="spinBox_DonorsToDisplay"/>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Tracker Image</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_4">
<item row="5" column="3" colspan="2">
<widget class="QPushButton" name="pushButton_sound">
<property name="text">
<string>Team ID</string>
<string>select Sound</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="lineEditParticipantID"/>
</item>
<item row="4" column="1">
<widget class="QLabel" name="label_tracker_image">
<property name="text">
<string>No Image Selected</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="lineEditTeamID"/>
</item>
<item row="6" column="2" colspan="2">
<item row="7" column="2" colspan="2">
<widget class="QPushButton" name="pushButtonRevert">
<property name="text">
<string>Revert</string>
</property>
</widget>
</item>
<item row="6" column="4">
<widget class="QPushButton" name="pushButtonSave">
<item row="6" column="0">
<widget class="QLabel" name="label_donors_to_display">
<property name="text">
<string>Save</string>
<string>Donors to Display</string>
</property>
</widget>
</item>
<item row="4" column="3" colspan="2">
<widget class="QPushButton" name="pushButton_tracker_image">
<item row="3" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>select Image</string>
<string>Team ID</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
Expand All @@ -131,20 +151,26 @@
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLabel" name="label_sound">
<item row="3" column="1">
<widget class="QLineEdit" name="lineEditTeamID"/>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="lineEditCurrencySymbol"/>
</item>
<item row="4" column="3" colspan="2">
<widget class="QPushButton" name="pushButton_tracker_image">
<property name="text">
<string>No Sound Selected</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
<string>select Image</string>
</property>
</widget>
</item>
<item row="5" column="3" colspan="2">
<widget class="QPushButton" name="pushButton_sound">
<item row="8" column="2" colspan="3">
<widget class="QPushButton" name="pushButton_persistentsave">
<property name="statusTip">
<string>To have the settings persist across upgrades</string>
</property>
<property name="text">
<string>select Sound</string>
<string>Persist Settings</string>
</property>
</widget>
</item>
Expand Down
38 changes: 21 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,28 @@ If you find this useful, please consider donating to my Extra Life campagin: htt

# How To use with a GUI

Watch one of these videos (click on the image):
Watch one of these videos:

*Linux:*
<a href="https://youtu.be/ruS6GUZiceQ" target="_blank">How to use Extra Life Donation Tracker with Linux</a>

<a href="https://youtu.be/oEZJXh3jaec" target="_blank"><img src="http://img.youtube.com/vi/oEZJXh3jaec/0.jpg"
alt="Link to Linux instruction video"/></a>

*Windows:*

<a href="https://youtu.be/YwvxuauPzhM" target="_blank"><img src="http://img.youtube.com/vi/YwvxuauPzhM/0.jpg"
alt="Link to Linux instruction video"/></a>
<a href="https://youtu.be/yPL3hDivwPE" target="_blank">How to use Extra Life Donation Tracker with Wkndows</a>

or follow the instructions below:

NOTE: Major Changes occurred in the v3.0 release. Make sure to read the release notes!

I am now creating executables with each release. Download the executable that goes with your operating system. After you unzip or untar the file:

On Windows launch gui.exe.

On Linux launch gui - you may first need to chmod 775 to make it executable.

Then click on the Settings button to fill in the fields there. Click save and exit the settings Window. In the main GUI hit Run to grab your data for the first time. From there, use the text files it generates in OBS or XSplit.
Then click on the Settings button to fill in the fields there. If you wish to have your settings persist across version updates, click on Persist Settings. Otherwise, click save and exit the settings window. Open the tracker window and capture that window in OBS or XSplit. In the main GUI hit Run to grab your data for the first time. From there, use the text files it generates in OBS or XSplit.

# How To use without a GUI

NOTE: These videos are VERY OUT OF DATE.

To watch a video of how to use this program on Linux: https://youtu.be/sKaFQPoQeJw

To watch a video of how to use this program on Windows: https://youtu.be/hN94aPcEFng
Expand All @@ -58,6 +56,8 @@ On Windows it's easiest to open extralifedonations.py in IDLE and then run the s

# How To for developers

Please see CONTRIBUTING.MD if you wish to contribute.

If you prefer to run from a git clone or from downloading one of the source downloads, follow the instructions below:

## Linux
Expand All @@ -74,25 +74,29 @@ to grab the requirements:

pip install -r requirements.txt

Finally, to run type:
Finally, decide if you want the GUI or just the commandline. If commandline, only:

Fist edit the participant.conf file in a text editor. Then run:

python3 extralifedonations.py

for the GUI type:

python3 gui.py

Once the GUI comes up you can click "tracker" to get a window that will display an image and text when a donation is registered
The benefit you get from using the GUI is that cnce the GUI comes up you can click "tracker" to get a window that will display an image and text when a donation is registered

Use the settings window to enter your settings and then hit save to save them.

To run the program, hit run. You should get the same output on the commandline as when just running the commandline utility.

## Windows

You will need the PyQt5 packages. If you already have Python installed from the official Python release (see the video above if you need help), then type:

python -m pip install PyQt5
You will need the PyQt5 packages. If you already have Python installed from the official Python release (see the video above if you need help), then go to the directory with the files you downloaded from Github and type:

(I'm pretty sure the package name is case-sensitive)
python -m pip install -r rquirements.txt

Once that's installed, navigate to the directory where you cloned the git repo. If you're using Windows Explorer - double-click on gui.py. If you're on the Windows commandline you should be able to type python gui.py.
If you're using Windows Explorer - double-click on gui.py. If you're on the Windows commandline you should be able to type python gui.py.

Once the GUI comes up you can click "tracker" to get a window that will display an image and text when a donation is registered

Expand Down
18 changes: 18 additions & 0 deletions backup_participant.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"Version" : "1.0",

"extralife_id" : "348774",

"text_folder" : "/home/ermesa/Dropbox/ELtracker/",

"currency_symbol" : "$",

"team_id" : "44013",

"tracker_image": "Engineer.png",

"donation_sound": "/home/ermesa/Programming Projects/python/extralife/Donation.mp3",

"donors_to_display": "5"

}
Loading

0 comments on commit c537364

Please sign in to comment.