Skip to content

Commit

Permalink
ordbok_uib_no: commet unused imports and code
Browse files Browse the repository at this point in the history
  • Loading branch information
balta2ar committed Jan 3, 2025
1 parent 4299941 commit 64cdd3b
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions yatetradki/uitools/ordbok/ordbok.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def observe(self, on_show):
import time
from functools import wraps
import socket
from telnetlib import Telnet
# from telnetlib import Telnet

from requests.exceptions import HTTPError, ReadTimeout, ConnectionError
from bs4 import BeautifulSoup
Expand Down Expand Up @@ -1916,22 +1916,22 @@ def load_env(filename):
key, value = line.strip().split('=', 1)
environ[key] = value

def track_history(source_signal):
load_env('~/.telegram')
channel_id = int(must_env('TELEGRAM_ORDBOK_ID'))
logging.info('Starting Telegram logger')
channel_id = int(channel_id)
tg = TdlibClient(TDLIB)
wl = WordLogger(tg, channel_id)
@pyqtSlot(str)
def on_translate(word):
logging.info('Telegram: add word to history: %s', word)
wl.add(word)
def start():
pass
#tg.idle()
source_signal.connect(on_translate)
Thread(target=start, daemon=True).start()
# def track_history(source_signal):
# load_env('~/.telegram')
# channel_id = int(must_env('TELEGRAM_ORDBOK_ID'))
# logging.info('Starting Telegram logger')
# channel_id = int(channel_id)
# tg = TdlibClient(TDLIB)
# wl = WordLogger(tg, channel_id)
# @pyqtSlot(str)
# def on_translate(word):
# logging.info('Telegram: add word to history: %s', word)
# wl.add(word)
# def start():
# pass
# #tg.idle()
# source_signal.connect(on_translate)
# Thread(target=start, daemon=True).start()

def main():
logging.info('cache location: "%s"', CACHE_DIR)
Expand Down

0 comments on commit 64cdd3b

Please sign in to comment.