Skip to content
This repository has been archived by the owner on Sep 7, 2024. It is now read-only.

Commit

Permalink
Merge pull request #15 from Alb-310/dev
Browse files Browse the repository at this point in the history
Merge Dev -> Master
  • Loading branch information
Alb-310 authored Aug 19, 2023
2 parents 40464ba + e41fc7f commit 38e93a8
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 21 deletions.
14 changes: 14 additions & 0 deletions CLI/geogramint_cli.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
__version__ = "v1.3"
import codecs
import json
import os
Expand Down Expand Up @@ -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()
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<img src="https://github.com/Alb-310/Geogramint/blob/master/appfiles/Geogramint.png" width="300"/>
</p>

<p align="center"> <img src="https://img.shields.io/badge/version-1.2-orange" /> <img src="http://ForTheBadge.com/images/badges/made-with-python.svg"/> <a href="https://github.com/Alb-310"> <img alt="GitHub" src="https://img.shields.io/badge/GitHub-100000?style=for-the-badge&logo=github&logoColor=white"/><a/> <a href="https://twitter.com/Alb_310"> <img src="https://github.com/Alb-310/Geogramint/blob/master/.github/by-alb310.svg"/><a/> <img src="https://img.shields.io/badge/License-GPLv3-blue.svg"/>
<p align="center"> <img src="https://img.shields.io/badge/version-1.3-orange" /> <img src="https://img.shields.io/badge/PYTHON-03b1fc?style=for-the-badge&logo=python"/> <a href="https://github.com/Alb-310"> <img alt="GitHub" src="https://img.shields.io/badge/GitHub-100000?style=for-the-badge&logo=github&logoColor=white"/><a/> <a href="https://twitter.com/Alb_310"> <img src="https://github.com/Alb-310/Geogramint/blob/master/.github/by-alb310.svg"/><a/> <img src="https://img.shields.io/badge/License-GPLv3-blue.svg"/>
<p align="center"> <a href="https://projetfox.com/"> <img src="https://github.com/Alb-310/Geogramint/blob/master/.github/fox%20badge.png" width="200"/> <a/>

## **About**
Expand All @@ -14,13 +14,13 @@ 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.

<p align="center"> <img src="https://user-images.githubusercontent.com/52386954/212496909-69aeaded-5d45-4cc5-9676-d5a6df2412d5.png" />
<p align="center"> <img src="https://github.com/Alb-310/Geogramint/assets/52386954/08acece0-49d1-433e-b4de-b3397360e113" />

## 🛠️ Installation

**Requirements:** [Python 3.8 or 3.9](https://www.python.org/downloads/release/python-3913/)<br>

### 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:
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions geogramint.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# v1.2
# v1.3
import os
import sys
import codecs
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions mapfiles/map.kv
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
#:include mapfiles/markercenter.kv

<Map>:
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:
Expand Down
20 changes: 10 additions & 10 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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
5 changes: 3 additions & 2 deletions utils/ressources.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


'''
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 38e93a8

Please sign in to comment.