pyblock/pybitblock/clone.py

32 lines
977 B
Python
Raw Permalink Normal View History

2020-06-04 14:28:45 -03:00
#Developer: Curly60e
#PyBLOCK its a clock of the Bitcoin blockchain.
2020-06-04 14:28:45 -03:00
import logging
import os
import os.path
import subprocess
import time as t
def gitclone():
url = "https://github.com/curly60e/satellite"
subprocess.run(["git", "clone", url])
subprocess.run(["mkdir", "satellite/api/examples/.gnupg"])
subprocess.run(["gpg", "--full-generate-key", "--homedir", "satellite/api/examples/.gnupg"])
def satnode():
try:
subprocess.run(["python3", "satellite/api/examples/demo-rx.py"])
t.sleep(5)
subprocess.run(["python3", "satellite/api/examples/api_data_reader.py", "--demo", "--plaintext"])
except (OSError, subprocess.SubprocessError) as e:
logging.getLogger(__name__).debug("satnode error: %s", e)
2020-05-29 11:52:29 -03:00
def matrixsc():
if os.path.isdir('$HOME/pyblock/terminal_matrix'):
print("OK Pass")
else:
url = "https://github.com/curly60e/terminal_matrix.git"
subprocess.run(["git", "clone", url])