Skip to content

Commit

Permalink
Feat: march_v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
purpleblueslime committed May 1, 2023
0 parents commit 7830c0e
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 0 deletions.
Binary file added honkai.ico
Binary file not shown.
21 changes: 21 additions & 0 deletions license
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 SLIME

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
37 changes: 37 additions & 0 deletions march_cord.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import win32ui
from pypresence import Presence
from time import sleep, time

def wrap(id): # JIC discord isnt open
app = None
while not app: # loop if no app
try: app = Presence(id)
except: sleep(15) # zZ
return app


def is_honkai():
try: win32ui.FindWindow('Qt5QWindowIcon', 'Star Rail') # Qt5QWindowIcon = honkai star rail window
except win32ui.error: return False # if not found ;-;
return True # if found ;)

def _(mod):
honkai = is_honkai()
if (not honkai) and (mod):
app.close() # close app
return False # mod = False
if (honkai) and (not mod):
app.connect() # connect app
app.update(large_image='honkai', start=time()) # update uwO
return True # mod = True

return mod # return mod

app = wrap('1040182356092395550') # app id
mod = False

while 'mod': # inf loop
try: mod = _(mod)
except: mod = False # if discord closes ;-;
sleep(15) # zZ

20 changes: 20 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# march_cord
Pretty [**honkai star rail**](https://hsr.hoyoverse.com/) discord presence~

Uh...sometimes windows thinks **`march_cord.exe`** is a malware cause of **`pyinstaller`** being used by a lot of attackers.
If you still don't trust it. welp, use python script to build an executable yourself [**`march_cord.py`**](./march_cord.py).

## Build yourself
download [**`honkai.ico`**](./march_cord.py) and [**`march_cord.py`**](./march_cord.py)~
```sh
> pyinstaller -i'honkai.ico' -w -F march_cord.py
```

## Download
**>** [**`march_cord.zip`**](https://github.com/purpleblueslime/march_cord/releases/tag/v1.0.0/march_cord.zip).\
**>** *unzip* [**`march_cord.zip`**](https://github.com/purpleblueslime/march_cord/releases/tag/v1.0.0/march_cord.zip).\
**>** *paste* **`march_cord.exe`** to **`users/./appdata/roam/microsoft/wins/start/programs/startup`**, and it'll run on startup! ;)

![march_img](https://user-images.githubusercontent.com/84064124/235434352-5e5abcc4-b7dc-420c-8fc2-72faa0d4c010.png)

*byee~*
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pywin32
pypresence

0 comments on commit 7830c0e

Please sign in to comment.