Merge pull request #218 from curly60e/sourcery/curly60e-patch-137

Remote Clock of Blocks settings (Sourcery refactored)
This commit is contained in:
curly60e 2020-10-17 23:22:36 -03:00 committed by GitHub
commit e97fb8e6cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -91,39 +91,24 @@ def remotegetblock():
if os.path.isfile('pyblocksettingsClock.conf') or os.path.isfile('pyblocksettingsClock.conf'): # Check if the file 'bclock.conf' is in the same folder
settingsv = pickle.load(open("pyblocksettingsClock.conf", "rb")) # Load the file 'bclock.conf'
settingsClock = settingsv # Copy the variable pathv to 'path'
b = rpc('getblockcount')
c = str(b)
if c > a:
output = render(str(c), colors=[settingsClock['colorA'], settingsClock['colorB']], align='center')
print("\a" + output)
t.sleep(10)
break
elif c == a:
output = render(str(c), colors=[settingsClock['colorA'], settingsClock['colorB']], align='center')
print(output)
t.sleep(10)
clear()
closed()
else:
break
else:
settingsClock = {"gradient":"", "design":"block", "colorA":"green", "colorB":"yellow"}
pickle.dump(settingsClock, open("pyblocksettingsClock.conf", "wb"))
b = rpc('getblockcount')
c = str(b)
if c > a:
output = render(str(c), colors=[settingsClock['colorA'], settingsClock['colorB']], align='center')
print("\a" + output)
t.sleep(10)
break
elif c == a:
output = render(str(c), colors=[settingsClock['colorA'], settingsClock['colorB']], align='center')
print(output)
t.sleep(10)
clear()
closed()
else:
break
b = rpc('getblockcount')
c = str(b)
if c > a:
output = render(str(c), colors=[settingsClock['colorA'], settingsClock['colorB']], align='center')
print("\a" + output)
t.sleep(10)
break
elif c == a:
output = render(str(c), colors=[settingsClock['colorA'], settingsClock['colorB']], align='center')
print(output)
t.sleep(10)
clear()
closed()
else:
break
def countdownblockConn():
b = rpc('getblockcount')