Skip to content

Commit

Permalink
Merge pull request #793 from rix1337/dev
Browse files Browse the repository at this point in the history
v.20.0.4
  • Loading branch information
rix1337 authored Jul 6, 2024
2 parents ffc7e78 + 18df90e commit 8547825
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 22 deletions.
8 changes: 1 addition & 7 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Vorschläge für neue Funktionen / allgemeine Ideen
url: https://github.com/rix1337/FeedCrawler/discussions/new?category=ideas
about: Bitte ein neues Diskussionsthema erstellen, das unter "Ideas" zusammengefasst wird.
- name: Öffentliche Rückfragen
url: https://github.com/rix1337/FeedCrawler/discussions/categories/q-a
about: Bitte ein neues Diskussionsthema erstellen, das unter "Q&A" zusammengefasst wird.
- name: Chat mit der Community
- name: Chat mit der Community / Platz für Umsetzungsideen
url: https://discord.gg/enn4AG3VnM
about: Gedacht für den allgemeinen Erfahrungsaustausch. Der falsche Ort für Fehlermeldungen.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,11 @@ Welche das sind, entscheiden Anwender selbständig bei der Einrichtung. Es gilt

## Startparameter

| Parameter | Erläuterung |
|------------------------------|-----------------------------------------------------------------------------------------------|
| ```--log-level=<LOGLEVEL>``` | Legt fest, wie genau geloggt wird (`CRITICAL`, `ERROR`, `WARNING`, `INFO`, `DEBUG`, `NOTSET`) |
| ```--port=<PORT>``` | Legt den Port des Webservers fest |
| ```--delay=<SEKUNDEN>``` | Verzögere Suchlauf nach Start um ganze Zahl in Sekunden (optional) |
| Parameter | Erläuterung |
|------------------------------|--------------------------------------------------------------------|
| ```--log-level=<LOGLEVEL>``` | Legt fest, wie genau geloggt wird (`INFO` oder `DEBUG`) |
| ```--port=<PORT>``` | Legt den Port des Webservers fest |
| ```--delay=<SEKUNDEN>``` | Verzögere Suchlauf nach Start um ganze Zahl in Sekunden (optional) |

## Sicherheitshinweis

Expand Down
12 changes: 12 additions & 0 deletions feedcrawler/providers/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import os
import platform
import re
import signal
import sys
import tkinter as tk
Expand Down Expand Up @@ -32,6 +33,17 @@ def get_icon_path():
return icon_path


def message_box_open_browser(url):
trimmed_url = re.sub(r"\?cache_bust=[^ ]*", "", url)
message = (f'''FeedCrawler muss im Browser eingerichtet werden!
Klicke auf 'OK', um den Standard-Browser zu öffnen.
Sollte der Browser nicht automatisch öffnen, gehe manuell auf:
"{trimmed_url}"''')
messagebox.showinfo("FeedCrawler", message)
webbrowser.open(url)


def get_tray_icon(show_function, quit_function):
import pystray # imported here to avoid crash on headless systems
from PIL import Image # transitive dependency of pystray not in requirements.txt
Expand Down
5 changes: 3 additions & 2 deletions feedcrawler/providers/shared_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
import platform
import sys
import time
import webbrowser
from logging import handlers

from feedcrawler.external_tools.myjd_api import Jddevice, Myjdapi
from feedcrawler.external_tools.myjd_api import TokenExpiredException, RequestTimeoutException, MYJDException
from feedcrawler.providers.config import CrawlerConfig
from feedcrawler.providers.gui import message_box_open_browser

values = {}
lock = None
Expand Down Expand Up @@ -82,6 +82,7 @@ def set_logger():
logger.addHandler(console)

if log_level == 10:
print("DEBUG Modus aktiviert. DEBUG-Log wird in 'FeedCrawler_DEBUG.log' gespeichert.")
logfile_debug = logging.handlers.RotatingFileHandler(values["log_file_debug"])
logfile_debug.setFormatter(formatter)
logfile_debug.setLevel(10)
Expand All @@ -94,7 +95,7 @@ def set_sites():

def gui_active_in_tray_and_browser_opened_for_config_once():
if values["gui"] and not values["gui_active_in_tray_and_browser_opened_for_config_once"]:
webbrowser.open(f"http://localhost:9090?cache_bust={int(time.time())}")
message_box_open_browser(f"http://localhost:9090?cache_bust={int(time.time())}")
update("gui_active_in_tray_and_browser_opened_for_config_once", True)
return True

Expand Down
2 changes: 1 addition & 1 deletion feedcrawler/providers/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


def get_version():
return "20.0.3"
return "20.0.4"


def create_version_file():
Expand Down
3 changes: 1 addition & 2 deletions feedcrawler/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ def main():

print(f'Nutze das Verzeichnis "{config_path}" für Einstellungen/Logs')

log_level = logging.__dict__[
arguments.log_level] if arguments.log_level in logging.__dict__ else logging.INFO
log_level = logging.DEBUG if arguments.log_level == "DEBUG" else logging.INFO

shared_state.update("log_level", log_level)
shared_state.set_logger()
Expand Down
6 changes: 3 additions & 3 deletions feedcrawler/web_interface/vuejs_frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions feedcrawler/web_interface/vuejs_frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "feedcrawler-web",
"version": "20.0.3",
"version": "20.0.4",
"type": "module",
"scripts": {
"dev": "vite",
Expand All @@ -22,6 +22,6 @@
},
"devDependencies": {
"@vitejs/plugin-vue": "^5.0.5",
"vite": "^5.3.2"
"vite": "^5.3.3"
}
}

0 comments on commit 8547825

Please sign in to comment.