From e947dfe883d62a439ece399b55e990c9be6eae30 Mon Sep 17 00:00:00 2001 From: Albert Date: Thu, 17 Aug 2023 23:30:26 +0200 Subject: [PATCH 1/2] dependencies updated - bugs fixed --- CLI/geogramint_cli.py | 14 ++++++++++++++ README.md | 6 +++--- geogramint.py | 4 ++-- mapfiles/map.kv | 6 +++--- requirements.txt | 20 ++++++++++---------- utils/ressources.py | 5 +++-- 6 files changed, 35 insertions(+), 20 deletions(-) diff --git a/CLI/geogramint_cli.py b/CLI/geogramint_cli.py index 2c7886a..2bd0fed 100644 --- a/CLI/geogramint_cli.py +++ b/CLI/geogramint_cli.py @@ -1,3 +1,4 @@ +__version__ = "v1.3" import codecs import json import os @@ -39,6 +40,19 @@ console = Console() +def version_callback(value: bool): + if value: + typer.echo(f"{__version__}") + raise typer.Exit() + +@CLI.callback() +def version( + version: bool = typer.Option( + False, "--version", help="Show the version", callback=version_callback + ) +): + pass + @CLI.command(rich_help_panel='Config Commands') def set_hash(hash: str): api_id, api_hash, phone_number, extended_report = settings_cli.loadConfig() diff --git a/README.md b/README.md index eb36d8f..ff90f10 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@

-

GitHub +

GitHub

## **About** @@ -20,7 +20,7 @@ The tool is fully supported on Windows and partially supported on Mac OS and Lin **Requirements:** [Python 3.8 or 3.9](https://www.python.org/downloads/release/python-3913/)
-### On Windows [![Windows](https://svgshare.com/i/ZhY.svg)](https://svgshare.com/i/ZhY.svg) +### On Windows [![Windows](https://img.shields.io/badge/Windows-03b1fc?style=for-the-badge&logo=windows)](https://svgshare.com/i/ZhY.svg) + #### With the installer: Click [here!](https://github.com/Alb-310/Geogramint/releases) + #### With Github: @@ -42,7 +42,7 @@ python geogramint.py # for GUI mode python geogramint.py --help # for CLI mode ``` -### On Mac OS [![macOS](https://svgshare.com/i/ZjP.svg)](https://svgshare.com/i/ZjP.svg) and Linux [![Linux](https://svgshare.com/i/Zhy.svg)](https://svgshare.com/i/Zhy.svg) +### On Mac OS ![macOS](https://img.shields.io/badge/Mac_OS-abbfc7?style=for-the-badge&logo=apple) and Linux ![Linux](https://img.shields.io/badge/Linux-ffffff?style=for-the-badge&logo=linux) + #### With Github: ```bash diff --git a/geogramint.py b/geogramint.py index 888357f..86e7aa6 100644 --- a/geogramint.py +++ b/geogramint.py @@ -1,4 +1,4 @@ -# v1.2 +# v1.3 import os import sys import codecs @@ -21,7 +21,7 @@ from kivy.config import Config from kivymd.app import MDApp from kivy.core.window import Window - from kivy.logger import Logger + from kivy.logger import Logger, LOG_LEVELS from api.TelegramAPIRequests import geolocate_AllEntities_Nearby from mapfiles.markercenter import MarkerHelper from utils import settings diff --git a/mapfiles/map.kv b/mapfiles/map.kv index 677f612..02b8535 100644 --- a/mapfiles/map.kv +++ b/mapfiles/map.kv @@ -4,9 +4,9 @@ #:include mapfiles/markercenter.kv : - lat: 45.45250329381673 - lon: -86.4436232218779 - zoom: 10 + lat: 45.45443063228795 + lon: -85.89843993424778 + zoom: 11 on_zoom: self.zoom = 3 if self.zoom < 2 else self.zoom MarkerCenter: diff --git a/requirements.txt b/requirements.txt index 7686e8c..d2de421 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,15 +1,15 @@ -xhtml2pdf==0.2.8 +xhtml2pdf==0.2.11 folium==0.14.0 -pandas==1.5.2 -telethon==1.24.0 -trio==0.21.0 -kivy==2.1.0 -kivymd==1.0.2 +pandas==2.0.3 +telethon==1.29.2 +trio==0.22.2 +kivy==2.2.1 +kivymd==1.1.1 kivy-garden==0.1.5 kivy-garden.mapview==1.0.6 mapview==1.0.6 -typer==0.7.0 -rich==12.6.0 -selenium==4.7.2 -webdriver_manager==3.8.5 +typer==0.9.0 +rich==13.5.2 +selenium==4.11.2 +webdriver-manager==4.0.0 plyer==2.1.0 diff --git a/utils/ressources.py b/utils/ressources.py index 0c0f38a..a8c5404 100644 --- a/utils/ressources.py +++ b/utils/ressources.py @@ -12,6 +12,7 @@ from xhtml2pdf import pisa, default from xhtml2pdf.default import DEFAULT_CSS from xhtml2pdf.files import pisaFileObject +from selenium.webdriver.chrome.service import Service as ChromeService ''' @@ -348,7 +349,7 @@ def generate_pdf_report(userlist, grouplist, lat, lon, timestamp, path, extended else: zoom = 15 - service = ChromeDriverManager(path="appfiles").install() + service = ChromeService(ChromeDriverManager().install()) m = folium.Map(location=[lat, lon], zoom_start=zoom) folium.Marker( [lat, lon] @@ -394,7 +395,7 @@ def generate_pdf_report(userlist, grouplist, lat, lon, timestamp, path, extended options.add_experimental_option("excludeSwitches", ["enable-logging"]) options.add_argument('--headless') options.add_argument('window-size=1920x1080') - driver = webdriver.Chrome(executable_path=service, chrome_options=options) + driver = webdriver.Chrome(service=service, options=options) driver.maximize_window() driver.get(temp_name) time.sleep(5) From e41fc7f1a17997c3194856985f2691e29889eaf0 Mon Sep 17 00:00:00 2001 From: Alb-310 <52386954+Alb-310@users.noreply.github.com> Date: Sat, 19 Aug 2023 16:28:15 +0200 Subject: [PATCH 2/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ff90f10..834fa59 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Geogramint only finds Telegram users and groups which have activated the nearby The tool is fully supported on Windows and partially supported on Mac OS and Linux distributions. -

+

## 🛠️ Installation