diff --git a/.gitignore b/.gitignore index 9e6b947..43a8c90 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *.pyc userpw.py cachedCMC.txt +pyticker.log diff --git a/img/coins/bitcoin-cash.png b/img/coins/bitcoin-cash.png new file mode 100644 index 0000000..0603b7a Binary files /dev/null and b/img/coins/bitcoin-cash.png differ diff --git a/img/coins/bitconnect.png b/img/coins/bitconnect.png new file mode 100644 index 0000000..5829c65 Binary files /dev/null and b/img/coins/bitconnect.png differ diff --git a/img/coins/bitshares.png b/img/coins/bitshares.png new file mode 100644 index 0000000..4a38234 Binary files /dev/null and b/img/coins/bitshares.png differ diff --git a/img/coins/bytecoin-bcn.png b/img/coins/bytecoin-bcn.png new file mode 100644 index 0000000..255b9eb Binary files /dev/null and b/img/coins/bytecoin-bcn.png differ diff --git a/img/coins/eos.png b/img/coins/eos.png new file mode 100644 index 0000000..0acf4e3 Binary files /dev/null and b/img/coins/eos.png differ diff --git a/img/coins/iota.png b/img/coins/iota.png new file mode 100644 index 0000000..5fc141b Binary files /dev/null and b/img/coins/iota.png differ diff --git a/img/coins/neo.png b/img/coins/neo.png new file mode 100644 index 0000000..1b33ab5 Binary files /dev/null and b/img/coins/neo.png differ diff --git a/img/coins/steem.png b/img/coins/steem.png new file mode 100644 index 0000000..6f1afb2 Binary files /dev/null and b/img/coins/steem.png differ diff --git a/img/coins/stellar.png b/img/coins/stellar.png new file mode 100644 index 0000000..f25b051 Binary files /dev/null and b/img/coins/stellar.png differ diff --git a/img/coins/stratis.png b/img/coins/stratis.png new file mode 100644 index 0000000..a4e891a Binary files /dev/null and b/img/coins/stratis.png differ diff --git a/img/temp/augur.png b/img/temp/augur.png index e8a3daa..aa6fc21 100644 Binary files a/img/temp/augur.png and b/img/temp/augur.png differ diff --git a/img/temp/bitcoin-cash.png b/img/temp/bitcoin-cash.png new file mode 100644 index 0000000..ea38667 Binary files /dev/null and b/img/temp/bitcoin-cash.png differ diff --git a/img/temp/bitcoin.png b/img/temp/bitcoin.png index 8a36f70..5023a15 100644 Binary files a/img/temp/bitcoin.png and b/img/temp/bitcoin.png differ diff --git a/img/temp/bitconnect.png b/img/temp/bitconnect.png new file mode 100644 index 0000000..630c513 Binary files /dev/null and b/img/temp/bitconnect.png differ diff --git a/img/temp/bitshares.png b/img/temp/bitshares.png new file mode 100644 index 0000000..b287d7f Binary files /dev/null and b/img/temp/bitshares.png differ diff --git a/img/temp/bytecoin-bcn.png b/img/temp/bytecoin-bcn.png new file mode 100644 index 0000000..f948a9d Binary files /dev/null and b/img/temp/bytecoin-bcn.png differ diff --git a/img/temp/dash.png b/img/temp/dash.png index f5908c1..149126f 100644 Binary files a/img/temp/dash.png and b/img/temp/dash.png differ diff --git a/img/temp/eos.png b/img/temp/eos.png new file mode 100644 index 0000000..5454742 Binary files /dev/null and b/img/temp/eos.png differ diff --git a/img/temp/ethereum-classic.png b/img/temp/ethereum-classic.png index 01e1faa..5f47a9d 100644 Binary files a/img/temp/ethereum-classic.png and b/img/temp/ethereum-classic.png differ diff --git a/img/temp/ethereum.png b/img/temp/ethereum.png index da364e0..456658c 100644 Binary files a/img/temp/ethereum.png and b/img/temp/ethereum.png differ diff --git a/img/temp/etheroll.png b/img/temp/etheroll.png new file mode 100644 index 0000000..e63344b Binary files /dev/null and b/img/temp/etheroll.png differ diff --git a/img/temp/funfair.png b/img/temp/funfair.png new file mode 100644 index 0000000..4c0e1d5 Binary files /dev/null and b/img/temp/funfair.png differ diff --git a/img/temp/golem-network-tokens.png b/img/temp/golem-network-tokens.png index 212a27a..271fa19 100644 Binary files a/img/temp/golem-network-tokens.png and b/img/temp/golem-network-tokens.png differ diff --git a/img/temp/iota.png b/img/temp/iota.png new file mode 100644 index 0000000..11c4a17 Binary files /dev/null and b/img/temp/iota.png differ diff --git a/img/temp/litecoin.png b/img/temp/litecoin.png index 4f24b74..9452ca6 100644 Binary files a/img/temp/litecoin.png and b/img/temp/litecoin.png differ diff --git a/img/temp/monero.png b/img/temp/monero.png index c768edf..683481d 100644 Binary files a/img/temp/monero.png and b/img/temp/monero.png differ diff --git a/img/temp/nem.png b/img/temp/nem.png index ce49d4f..7241bff 100644 Binary files a/img/temp/nem.png and b/img/temp/nem.png differ diff --git a/img/temp/neo.png b/img/temp/neo.png new file mode 100644 index 0000000..7dd5b8f Binary files /dev/null and b/img/temp/neo.png differ diff --git a/img/temp/nimiq.png b/img/temp/nimiq.png new file mode 100644 index 0000000..cf6b245 Binary files /dev/null and b/img/temp/nimiq.png differ diff --git a/img/temp/omisego.png b/img/temp/omisego.png new file mode 100644 index 0000000..66db9e3 Binary files /dev/null and b/img/temp/omisego.png differ diff --git a/img/temp/ripple.png b/img/temp/ripple.png index 276c641..f406573 100644 Binary files a/img/temp/ripple.png and b/img/temp/ripple.png differ diff --git a/img/temp/round.png b/img/temp/round.png new file mode 100644 index 0000000..97ab882 Binary files /dev/null and b/img/temp/round.png differ diff --git a/img/temp/steem.png b/img/temp/steem.png new file mode 100644 index 0000000..03e8e16 Binary files /dev/null and b/img/temp/steem.png differ diff --git a/img/temp/stellar.png b/img/temp/stellar.png new file mode 100644 index 0000000..65d8f73 Binary files /dev/null and b/img/temp/stellar.png differ diff --git a/img/temp/stratis.png b/img/temp/stratis.png new file mode 100644 index 0000000..87ddb57 Binary files /dev/null and b/img/temp/stratis.png differ diff --git a/img/temp/terranova.png b/img/temp/terranova.png new file mode 100644 index 0000000..30260cd Binary files /dev/null and b/img/temp/terranova.png differ diff --git a/img/temp/tether.png b/img/temp/tether.png new file mode 100644 index 0000000..e94a10a Binary files /dev/null and b/img/temp/tether.png differ diff --git a/img/temp/ticker.png b/img/temp/ticker.png index 09586e9..8e0b42b 100644 Binary files a/img/temp/ticker.png and b/img/temp/ticker.png differ diff --git a/img/temp/veritaseum.png b/img/temp/veritaseum.png new file mode 100644 index 0000000..4b85f55 Binary files /dev/null and b/img/temp/veritaseum.png differ diff --git a/img/temp/waves.png b/img/temp/waves.png new file mode 100644 index 0000000..0daf924 Binary files /dev/null and b/img/temp/waves.png differ diff --git a/main.py b/main.py index d2104fd..3806bf1 100644 --- a/main.py +++ b/main.py @@ -1,17 +1,31 @@ import imggen import praw +from datetime import datetime from userpw import * -tickerimg = imggen.imggen() +try: + tickerimg = imggen.imggen() + with open('pyticker.log', 'a') as f: + f.write("{} - successfully created ticker image\n".format(str(datetime.now()))) +except: + with open('pyticker.log', 'a') as f: + f.write("{} - failed to created ticker image\n".format(str(datetime.now()))) -reddit = praw.Reddit(client_id=client_id, client_secret=client_secret, - username=username, password=password, - user_agent=user_agent) -print(reddit.user.me()) -sub = reddit.subreddit('cryptocurrency') -# print(sub.title) -ss = sub.stylesheet() -sstext = ss.stylesheet -sub.stylesheet.upload("ticker", "img/temp/ticker.png") -sub.stylesheet.update(sstext) +try: + reddit = praw.Reddit(client_id=client_id, client_secret=client_secret, + username=username, password=password, + user_agent=user_agent) + + print(reddit.user.me()) + sub = reddit.subreddit('cryptocurrency') + # print(sub.title) + ss = sub.stylesheet() + sstext = ss.stylesheet + sub.stylesheet.upload("ticker", "img/temp/ticker.png") + sub.stylesheet.update(sstext) + with open('pyticker.log', 'a') as f: + f.write("{} - successfully updated reddit\n".format(str(datetime.now()))) +except: + with open('pyticker.log', 'a') as f: + f.write("{} - failed to update reddit\n".format(str(datetime.now())))