diff --git a/.gitignore b/.gitignore index b130f80..953cd5b 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,7 @@ venv sto.dat p2p/kademlia0 cache.sqlite -dbm.* \ No newline at end of file +dbm.* +.DS_Store +.vscode/ +.vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json index 5b80df3..7a73a41 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,2 @@ { - "python.pythonPath": "venv/bin/python" } \ No newline at end of file diff --git a/app/avatar.jpg b/app/avatar.jpg deleted file mode 100644 index 1eed2f5..0000000 Binary files a/app/avatar.jpg and /dev/null differ diff --git a/app/config.py b/app/config.py index 7db7ae5..0d4727d 100644 --- a/app/config.py +++ b/app/config.py @@ -5,7 +5,7 @@ HORIZONTAL = False #random.choice([True,True,True,False]) FACTOR=1 WINDOW_SIZE = (1136*FACTOR,640*FACTOR) if HORIZONTAL else (640*FACTOR,1136*FACTOR) -WINDOW_SIZE=1111,1111 +WINDOW_SIZE=800,800 BG_IMG='assets/bg-brown.png' @@ -55,7 +55,7 @@ bone=217, 202, 179 bronze=188, 128, 52 shadow=140, 122, 107 orangered=194, 3, 3 - + dutchwhite=229,219,181 # black=(0,0,0) black=15, 15, 15 #5, 8, 13 @@ -130,4 +130,5 @@ else: COLOR_CARD = bone COLOR_CARD_BORDER = COLOR_CARD COLOR_ICON=COLOR_LOGO + COLOR_ACCENT = huntergreen diff --git a/app/main.py b/app/main.py index ebc3b05..ebbb4c8 100644 --- a/app/main.py +++ b/app/main.py @@ -4,12 +4,6 @@ from config import * - - - - - - # monkeypatching the things that asyncio needs import subprocess subprocess.PIPE = -1 # noqa diff --git a/app/run.sh b/app/run.sh index 13f8834..c5c536d 100755 --- a/app/run.sh +++ b/app/run.sh @@ -1 +1,2 @@ -python3 watcher.py +python watcher.py +#python main.py \ No newline at end of file diff --git a/app/screens/login/login.kv b/app/screens/login/login.kv index 8910a64..cf073c2 100644 --- a/app/screens/login/login.kv +++ b/app/screens/login/login.kv @@ -10,7 +10,7 @@ #:import COLOR_TEXT main.COLOR_TEXT #:import COLOR_CARD main.COLOR_CARD #:import COLOR_CARD_BORDER main.COLOR_CARD_BORDER - +#:import COLOR_ACCENT main.COLOR_ACCENT : id: loginbox @@ -42,16 +42,29 @@ # spacing:'100sp' # md_bg_color:1,1,0,1 +: + text: 'Enter, Komrade' + halign: 'center' + size_hint_x: 1 + theme_text_color: 'Custom' + color: rgb(*COLOR_ACCENT) + adaptive_width: True + # size_hint:0.333,None + # md_bg_color:rgb(*COLOR_TEXT) + # pos_hint: {'y':1} + halign:'center' + : theme_text_color: 'Custom' text_color: rgb(*COLOR_TEXT) # width:'100sp' adaptive_width: True - size_hint:None,None + size_hint:0.333,None # md_bg_color:rgb(*COLOR_TEXT) # pos_hint: {'y':1} halign:'center' + @@ -69,8 +82,8 @@ current_hint_text_color: rgb(*COLOR_TEXT) error_color:rgb(*COLOR_TEXT) pos_hint: {'center_x':0.5,'y':0.2} - size_hint:0.8,None - font_size:'24sp' + size_hint:0.666,None + font_size:'2dp' @@ -89,7 +102,7 @@ current_hint_text_color: rgb(*COLOR_TEXT) text_color: rgb(*COLOR_TEXT) pos_hint: {'center_x':0.5,'y':0.2} - size_hint:0.8,None + size_hint:0.666,None : id: buttonbox diff --git a/app/screens/login/login.py b/app/screens/login/login.py index 9d26761..6833181 100644 --- a/app/screens/login/login.py +++ b/app/screens/login/login.py @@ -3,7 +3,8 @@ from kivymd.uix.boxlayout import MDBoxLayout from kivymd.uix.textfield import MDTextField from kivymd.uix.button import MDRectangleFlatButton from kivymd.uix.label import MDLabel -from main import MyLabel,rgb,COLOR_TEXT +from kivy.uix.label import Label +from main import MyLabel,rgb,COLOR_TEXT,COLOR_ICON,COLOR_ACCENT class LoginBoxLayout(MDBoxLayout): pass class LoginButtonLayout(MDBoxLayout): pass @@ -15,6 +16,7 @@ class LoginStatus(MDLabel): pass class UsernameLayout(MDBoxLayout): pass class UsernameLabel(MDLabel): pass +class WelcomeLabel(MDLabel): pass class LoginScreen(BaseScreen): #def on_pre_enter(self): @@ -25,13 +27,16 @@ class LoginScreen(BaseScreen): #log(self.ids) #log('hello?') self.layout = LoginBoxLayout() - self.label_title = MDLabel(text='Enter, Komrade',halign='center',size_hint_x=1) + self.label_title = WelcomeLabel() self.label_title.font_name='assets/font.otf' - self.label_title.font_size='20sp' + # self.label_title.font_size='20sp' self.label_title.bold=True + self.label_title.markup=True + self.label_title.color=rgb(*COLOR_TEXT) + self.label_title.font_size*=1.5 self.layout.add_widget(self.label_title) - self.label_username = UsernameLabel(text="username:") + self.layout_username = UsernameLayout() self.label_username = UsernameLabel(text="username:") @@ -80,8 +85,11 @@ class LoginScreen(BaseScreen): self.layout.add_widget(self.login_status) - self.label_password.font_size='18sp' - self.label_username.font_size='18sp' + self.label_password.font_size=32 + self.label_username.font_size=32 + self.login_button.font_size=22 + self.register_button.font_size=22 + ## add all diff --git a/app/spiral2.svg b/app/spiral2.svg deleted file mode 100644 index 5ac386d..0000000 --- a/app/spiral2.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - Svg Vector Icons : http://www.onlinewebfonts.com/icon - - \ No newline at end of file diff --git a/app/torconn.py b/app/torconn.py deleted file mode 100644 index fa8e425..0000000 --- a/app/torconn.py +++ /dev/null @@ -1,48 +0,0 @@ -from torpy import TorClient -import json,requests -import struct - - -#hostname = 'ifconfig.me' # It's possible use onion hostname here as well -#port = 80 - -#hostname = 'komrades.net' -hostname = '128.232.229.63' -port = 5555 - - -def try_torpy(): - from torpy.http.requests import TorRequests - with TorRequests() as tor_requests: - with tor_requests.get_session() as s: - #with requests.Session() as s: - #res = s.get('http://'+hostname+':'+str(port) + '/api/followers/MrY') - #print(json.loads(res.text)) - res = s.get('http://'+hostname+':'+str(port)) - print(res,res.text) - - - -def try_proxy(): - import requests - - def get_tor_session(): - session = requests.session() - # Tor uses the 9050 port as the default socks port - session.proxies = {'http': 'socks5://127.0.0.1:9050', - 'https': 'socks5://127.0.0.1:9050'} - return session - - # Make a request through the Tor connection - # IP visible through Tor - session = get_tor_session() - print(session.get("http://"+hostname+':'+str(port)).text) - # Above should print an IP different than your public IP - - # Following prints your normal public IP - print(session.get("http://ifconfig.me").text) - - - -try_proxy() -#try_torpy() \ No newline at end of file diff --git a/app/watcher.py b/app/watcher.py index be13bd8..c59b5fc 100644 --- a/app/watcher.py +++ b/app/watcher.py @@ -13,7 +13,7 @@ def run_command(): p = subprocess.Popen(cmd.split(), stdout=subprocess.PIPE) class Watcher: - DIRECTORY_TO_WATCH = os.path.join(os.path.expanduser('~'),"/github/Komrade/") + DIRECTORY_TO_WATCH = '.' #os.path.join(os.path.expanduser('~'),"/github/Komrade/") def __init__(self): self.observer = Observer() @@ -39,6 +39,7 @@ class Handler(FileSystemEventHandler): if '/cache/' in str(event.src_path): return None if '__pycache__' in str(event.src_path): return None if 'sto.dat' in str(event.src_path): return None + if '/dbm.' in str(event.src_path): return None if event.is_directory: return None diff --git a/requirements.txt b/requirements.txt index d5f52e1..32764e1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,21 +1,30 @@ +astroid==2.4.2 certifi==2020.6.20 cffi==1.14.2 chardet==3.0.4 cryptography==3.0 docutils==0.16 idna==2.10 -kademlia==2.2.1 -Kivy==1.11.1 +isort==5.4.2 +Kivy @ git+http://github.com/kivy/kivy@f34c43f235f35767ed04765a90d68b23807436ba Kivy-Garden==0.1.4 kivymd==0.104.1 +lazy-object-proxy==1.4.3 +mccabe==0.6.1 +numpy==1.19.1 pathtools==0.1.2 Pillow==7.2.0 plyer==1.4.3 pycparser==2.20 Pygments==2.6.1 +pylint==2.6.0 requests==2.24.0 rpcudp==4.0.1 six==1.15.0 +sqlitedict==1.6.0 +toml==0.10.1 +typed-ast==1.4.1 u-msgpack-python==2.7.0 urllib3==1.25.10 watchdog==0.10.3 +wrapt==1.12.1