Skip to content

Commit

Permalink
Change capitalization #45
Browse files Browse the repository at this point in the history
  • Loading branch information
mak448a committed Aug 15, 2024
1 parent 4219416 commit 8214654
Show file tree
Hide file tree
Showing 23 changed files with 88 additions and 89 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build-mac.yml.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: "3.12.4"
- run: git clone https://github.com/mak448a/QTCord/ --depth=1
- run: cd QTCord && pip install -r requirements.txt && pip install pyinstaller && python3 helper_scripts/package_mac.py
- run: git clone https://github.com/mak448a/Qtcord/ --depth=1
- run: cd Qtcord && pip install -r requirements.txt && pip install pyinstaller && python3 helper_scripts/package_mac.py
- uses: actions/upload-artifact@v4
with:
name: "QTCord-Mac"
path: "QTCord/src/dist/QTCord"
name: "Qtcord-Mac"
path: "Qtcord/src/dist/Qtcord"
8 changes: 4 additions & 4 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: "3.12.4"
- run: git clone https://github.com/mak448a/QTCord/ --depth=1
- run: cd QTCord && pip install -r requirements.txt && pip install pyinstaller && python3 helper_scripts/package_windows.py
- run: git clone https://github.com/mak448a/Qtcord/ --depth=1
- run: cd Qtcord && pip install -r requirements.txt && pip install pyinstaller && python3 helper_scripts/package_windows.py
- uses: actions/upload-artifact@v4
with:
name: "QTCord-Windows"
path: "QTCord/src/dist/QTCord"
name: "Qtcord-Windows"
path: "Qtcord/src/dist/Qtcord"
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# QTCord Contributor Agreement and Guidelines
# Qtcord Contributor Agreement and Guidelines

By contributing to this repository, you agree that I (mak448a) have the rights to use the code contributed to this repository however I want, under any license.

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

Qtcord is a Discord client built with QT aiming to bring a lightweight, native experience. I am not responsible if you get your account banned from this project.

<a href='https://flathub.org/apps/io.github.mak448a.QTCord'>
<a href='https://flathub.org/apps/io.github.mak448a.Qtcord'>
<img width='150' alt='Download on Flathub' src='https://dl.flathub.org/assets/badges/flathub-badge-en.png'/>
</a>

[Download for Windows](https://github.com/mak448a/QTCord/releases)
[Download for Windows](https://github.com/mak448a/Qtcord/releases)
<br>

![Screenshot of Qtcord](demo1.png)
Expand Down
4 changes: 2 additions & 2 deletions main.spec
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ exe = EXE(
a.scripts,
[],
exclude_binaries=True,
name='QTCord',
name='Qtcord',
debug=False,
bootloader_ignore_signals=False,
strip=False,
Expand All @@ -43,5 +43,5 @@ coll = COLLECT(
strip=False,
upx=True,
upx_exclude=[],
name='QTCord',
name='Qtcord',
)
2 changes: 1 addition & 1 deletion project_notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ https://discord.com/developers/docs/
https://luna.gitlab.io/discord-unofficial-docs/
https://www.youtube.com/channel/UC8PPJFudLUM1eJlM4BiJ40A

If you want to package for Linux, take a look at https://github.com/flathub/io.github.mak448a.QTCord.
If you want to package for Linux, take a look at https://github.com/flathub/io.github.mak448a.Qtcord.
If you want to package for Windows, run package_windows.py.


Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Essentials
platformdirs~=4.2.2
PySide6~=6.7.1
requests~=2.32.3

websocket-client~=1.8.0
# Only essential if you don't have it installed in your system package manager.
PySide6~=6.7.1


# Depedencies of dependencies. You need not install these manually, but here for good measure.
Expand Down
19 changes: 9 additions & 10 deletions src/discord_integration.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import os
import requests
import json
import platformdirs
from datetime import datetime

Expand All @@ -14,8 +13,8 @@

def load_token():
global auth, headers
if os.path.isfile(platformdirs.user_config_dir("QTCord") + "/discordauth.txt"):
with open(platformdirs.user_config_dir("QTCord") + "/discordauth.txt") as f:
if os.path.isfile(platformdirs.user_config_dir("Qtcord") + "/discordauth.txt"):
with open(platformdirs.user_config_dir("Qtcord") + "/discordauth.txt") as f:
auth = f.read()
headers["authorization"] = auth.strip()

Expand Down Expand Up @@ -49,9 +48,9 @@ def validate_token() -> bool:
# Inside validate_token is a function that checks for internet, too.
if not validate_token():
# If there is a token and it's invalid
if os.path.exists(platformdirs.user_config_dir("QTCord") + "/discordauth.txt"):
if os.path.exists(platformdirs.user_config_dir("Qtcord") + "/discordauth.txt"):
print("TOKEN INVALID")
os.remove(platformdirs.user_config_dir("QTCord") + "/discordauth.txt")
os.remove(platformdirs.user_config_dir("Qtcord") + "/discordauth.txt")



Expand Down Expand Up @@ -188,7 +187,7 @@ def get_guilds() -> dict:
# You get the rest of the info from this function.
for server in r.json():
if os.path.exists(
f"{platformdirs.user_cache_dir('QTCord')}/servers/{server['id']}.png"
f"{platformdirs.user_cache_dir('Qtcord')}/servers/{server['id']}.png"
):
continue

Expand All @@ -201,11 +200,11 @@ def get_guilds() -> dict:
if server_icon.status_code == 404:
continue

if not os.path.exists(f"{platformdirs.user_cache_dir('QTCord')}/servers"):
os.makedirs(f"{platformdirs.user_cache_dir('QTCord')}/servers")
if not os.path.exists(f"{platformdirs.user_cache_dir('Qtcord')}/servers"):
os.makedirs(f"{platformdirs.user_cache_dir('Qtcord')}/servers")

with open(
f"{platformdirs.user_cache_dir('QTCord')}/servers/{server['id']}.png", "wb"
f"{platformdirs.user_cache_dir('Qtcord')}/servers/{server['id']}.png", "wb"
) as f:
for chunk in server_icon.iter_content():
f.write(chunk)
Expand Down Expand Up @@ -275,7 +274,7 @@ def login(email: str, password: str, totp_code: str = ""):
print(
"Error. You probably entered in your credentials wrong.\n"
+ "Or maybe you have SMS 2FA? SMS 2FA is not supported currently.\n"
+ "Ask for it at https://github.com/mak448a/QTCord/issues"
+ "Ask for it at https://github.com/mak448a/Qtcord/issues"
)
return None

Expand Down
4 changes: 2 additions & 2 deletions src/discord_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ def send_heartbeat():

def keep_online():
# Get Discord token
if os.path.isfile(platformdirs.user_config_dir("QTCord") + "/discordauth.txt"):
with open(platformdirs.user_config_dir("QTCord") + "/discordauth.txt") as f:
if os.path.isfile(platformdirs.user_config_dir("Qtcord") + "/discordauth.txt"):
with open(platformdirs.user_config_dir("Qtcord") + "/discordauth.txt") as f:
bot_token = f.read()

# Stop if bot token isn't defined
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[Desktop Entry]
Name=QTCord
Icon=io.github.mak448a.QTCord
Name=Qtcord
Icon=io.github.mak448a.Qtcord
Comment=Lightweight Discord Client
GenericName=Lightweight Discord Client
Exec=io.github.mak448a.QTCord
Exec=io.github.mak448a.Qtcord
NoDisplay=false
StartupNotify=true
Terminal=false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2024 mak448a -->
<component type="desktop-application">
<id>io.github.mak448a.QTCord</id>
<name>QTCord</name>
<id>io.github.mak448a.Qtcord</id>
<name>Qtcord</name>
<summary>Lightweight Discord Client</summary>
<launchable type="desktop-id">io.github.mak448a.QTCord.desktop</launchable>
<launchable type="desktop-id">io.github.mak448a.Qtcord.desktop</launchable>
<developer_name>mak448a</developer_name>
<description>
<p>QTCord is a Discord client built with QT aiming to bring a lightweight, native experience.</p>
<p>Please report bugs and account bans at https://github.com/mak448a/QTCord/issues.</p>
<p>Qtcord is a Discord client built with QT aiming to bring a lightweight, native experience.</p>
<p>Please report bugs and account bans at https://github.com/mak448a/Qtcord/issues.</p>
<p>DISCLAIMER: I am not responsible if your account gets banned with this app, as it is against the Discord TOS.</p>
</description>
<url type="homepage">https://github.com/mak448a/QTCord</url>
<url type="homepage">https://github.com/mak448a/Qtcord</url>
<metadata_license>MIT</metadata_license>
<project_license>MIT</project_license>
<screenshots>
<screenshot type="default">
<image type="source">https://github.com/mak448a/QTCord/raw/v0.0.17/demo1.png</image>
<image type="source">https://github.com/mak448a/Qtcord/raw/v0.0.17/demo1.png</image>
</screenshot>
<screenshot>
<image type="source">https://github.com/mak448a/QTCord/raw/v0.0.17/demo2.png</image>
<image type="source">https://github.com/mak448a/Qtcord/raw/v0.0.17/demo2.png</image>
</screenshot>
</screenshots>
<content_rating type="oars-1.1">
Expand All @@ -42,7 +42,7 @@
<description>
<p>Use native theme</p>
</description>
<url>https://github.com/mak448a/QTCord/releases/v0.0.15</url>
<url>https://github.com/mak448a/Qtcord/releases/v0.0.15</url>
</release>
<release version="v0.0.15" date="2024-8-8" type="stable">
<description>
Expand All @@ -53,19 +53,19 @@
<p>Add GitHub issues link</p>
<p>Move titlebar entries around</p>
</description>
<url>https://github.com/mak448a/QTCord/releases/v0.0.15</url>
<url>https://github.com/mak448a/Qtcord/releases/v0.0.15</url>
</release>
<release version="v0.0.14" date="2024-7-2" type="stable">
<description>
<p>- Add logout button</p>
</description>
<url>https://github.com/mak448a/QTCord/releases/v0.0.14</url>
<url>https://github.com/mak448a/Qtcord/releases/v0.0.14</url>
</release>
<release version="v0.0.13" date="2024-3-24" type="stable">
<description>
<p>- Code cleanup</p>
</description>
<url>https://github.com/mak448a/QTCord/releases/v0.0.13</url>
<url>https://github.com/mak448a/Qtcord/releases/v0.0.13</url>
</release>
<release version="v0.0.12" date="2024-3-19" type="stable">
<description>
Expand All @@ -74,43 +74,43 @@
<p>- Bold usernames in message display area</p>
<p>- Add no internet dialog</p>
</description>
<url>https://github.com/mak448a/QTCord/releases/v0.0.12</url>
<url>https://github.com/mak448a/Qtcord/releases/v0.0.12</url>
</release>
<release version="v0.0.11" date="2024-3-3" type="stable">
<description>
<p>Update icon scaling and add licenses viewer.</p>
</description>
<url>https://github.com/mak448a/QTCord/releases/v0.0.11</url>
<url>https://github.com/mak448a/Qtcord/releases/v0.0.11</url>
</release>
<release version="v0.0.10" date="2024-2-27" type="stable">
<description>
<p>Fix icon not displaying on Wayland</p>
</description>
<url>https://github.com/mak448a/QTCord/releases/v0.0.10</url>
<url>https://github.com/mak448a/Qtcord/releases/v0.0.10</url>
</release>
<release version="v0.0.9" date="2024-2-20" type="stable">
<description>
<p>Add "no messages" indicator and add a missing license.</p>
</description>
<url>https://github.com/mak448a/QTCord/releases/v0.0.9</url>
<url>https://github.com/mak448a/Qtcord/releases/v0.0.9</url>
</release>
<release version="v0.0.8" date="2024-2-17" type="stable">
<description>
<p>Little fixes and improvements, such as updating the desktop entry.</p>
</description>
<url>https://github.com/mak448a/QTCord/releases/v0.0.8</url>
<url>https://github.com/mak448a/Qtcord/releases/v0.0.8</url>
</release>
<release version="v0.0.4" date="2023-12-24" type="stable">
<description>
<p>Update app description</p>
</description>
<url>https://github.com/mak448a/QTCord/releases/v0.0.4</url>
<url>https://github.com/mak448a/Qtcord/releases/v0.0.4</url>
</release>
<release version="v0.0.2" date="2023-12-14" type="stable">
<description>
<p>Initial release.</p>
</description>
<url>https://github.com/mak448a/QTCord/releases/v0.0.2</url>
<url>https://github.com/mak448a/Qtcord/releases/v0.0.2</url>
</release>
</releases>
</component>
2 changes: 1 addition & 1 deletion src/flatpak_builder/readme.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
This is where the files for flatpak building are located. See https://github.com/flathub/io.github.mak448a.QTCord/.
This is where the files for flatpak building are located. See https://github.com/flathub/io.github.mak448a.Qtcord/.
2 changes: 1 addition & 1 deletion src/licenses.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ def __init__(self, parent=None):

if __name__ == "__main__":
app = QApplication(sys.argv)
app.setDesktopFileName("io.github.mak448a.QTCord")
app.setDesktopFileName("io.github.mak448a.Qtcord")
widget = LicensesUI()
sys.exit(app.exec())
2 changes: 1 addition & 1 deletion src/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def switch(self):
if _token:
# Save the token
with open(
platformdirs.user_config_dir("QTCord") + "/discordauth.txt", "w"
platformdirs.user_config_dir("Qtcord") + "/discordauth.txt", "w"
) as f:
f.write(_token)

Expand Down
Loading

0 comments on commit 8214654

Please sign in to comment.