-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
14f460f
commit f9d5abd
Showing
4 changed files
with
85 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import os | ||
import random | ||
|
||
from pypresence import Presence | ||
|
||
client_id = os.environ["PYPRESENCE_CLIENT_ID"] | ||
RPC = Presence(client_id) # Initialize the Presence class | ||
RPC.connect() # Start the handshake loop | ||
|
||
|
||
quotes = [ | ||
"If you can dream it, you can achieve it.", | ||
"Either write something worth reading or do something worth writing.", | ||
"You become what you believe.", | ||
"Fall seven times and stand up eight.", | ||
"The best revenge is massive success.", | ||
"Eighty percent of success is showing up.", | ||
"Life is what happens to you while you’re busy making other plans.", | ||
"Strive not to be a success, but rather to be of value.", | ||
"The best time to plant a tree was 20 years ago. The second best time is now.", | ||
"Everything you’ve ever wanted is on the other side of fear." | ||
] # The quotes to choose from | ||
|
||
for i in range(3): | ||
RPC.update(details="Famous Quote:", | ||
state=random.choice(quotes)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
[tox] | ||
envlist = py{35,36,37}-{linux,macos,windows} | ||
skip_missing_interpreters = true | ||
minversion = 3.0 | ||
requires = setuptools | ||
|
||
[testenv] | ||
description = Run CLI tests under {basepython} | ||
setenv = PIP_DISABLE_VERSION_CHECK = 1 | ||
passenv = PYPRESENCE_CLIENT_ID http_proxy https_proxy no_proxy SSL_CERT_FILE TOXENV CI TRAVIS TRAVIS_* APPVEYOR APPVEYOR_* CODECOV_* | ||
|
||
platform = | ||
linux: linux | ||
macos: darwin | ||
windows: win32 | ||
|
||
# TODO: add tests for Client | ||
# TODO: unit tests are probably a good thing to have someday | ||
commands = | ||
python tests/basic_presence_test.py | ||
|
||
[testenv:spellcheck] | ||
description = "Check spelling of code" | ||
skip_install = true | ||
ignore_errors = true | ||
deps = codespell | ||
commands = codespell --skip="*.pyc" pypresence examples tests | ||
|
||
[testenv:flake8] | ||
description = "Code quality inspection" | ||
skip_install = true | ||
ignore_errors = true | ||
deps = flake8 | ||
commands = flake8 pypresence examples tests | ||
|
||
[flake8] | ||
max-line-length = 99 | ||
extend-ignore = E203, W503, E401, F401, E226 |