Refactor code structure for improved readability and maintainability
This commit is contained in:
24
dev/compile_modified.py
Normal file
24
dev/compile_modified.py
Normal file
@@ -0,0 +1,24 @@
|
||||
import py_compile
|
||||
import sys
|
||||
paths = [
|
||||
'src/ui/widgets/new_edition_check.py',
|
||||
'src/utils/icon.py',
|
||||
'src/ui/widgets/graph.py',
|
||||
'src/ui/userInterface.py',
|
||||
'src/ui/dialogs/mailTemplate.py',
|
||||
'src/services/catalogue.py',
|
||||
'src/backend/catalogue.py',
|
||||
'src/parsers/xml_parser.py',
|
||||
'src/parsers/csv_parser.py',
|
||||
'src/parsers/transformers/transformers.py',
|
||||
'src/core/semester.py',
|
||||
]
|
||||
errs = 0
|
||||
for p in paths:
|
||||
try:
|
||||
py_compile.compile(p, doraise=True)
|
||||
print('OK:', p)
|
||||
except Exception as e:
|
||||
print('ERROR:', p, e)
|
||||
errs += 1
|
||||
sys.exit(errs)
|
||||
35
dev/update_translations.ps1
Normal file
35
dev/update_translations.ps1
Normal file
@@ -0,0 +1,35 @@
|
||||
# Requires PowerShell 5+
|
||||
# Scans all .ui files under src/ and runs pyside6-lupdate to generate/update .ts files next to them.
|
||||
# Usage: Run from repository root: `pwsh dev/update_translations.ps1` or `powershell -ExecutionPolicy Bypass -File dev/update_translations.ps1`
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
# Use current working directory (CWD) for relative paths
|
||||
$cwd = Get-Location
|
||||
$lupdate = Join-Path $cwd '.venv\Scripts\pyside6-lupdate.exe'
|
||||
if (-not (Test-Path $lupdate)) {
|
||||
Write-Error "Qt for Python lupdate not found at '$lupdate'. Ensure venv is created and PySide6 tools installed."
|
||||
}
|
||||
|
||||
$uiFiles = Get-ChildItem -Path (Join-Path $cwd 'src') -Filter '*.ui' -Recurse -File
|
||||
if ($uiFiles.Count -eq 0) {
|
||||
Write-Host 'No .ui files found under src/. Nothing to update.'
|
||||
exit 0
|
||||
}
|
||||
|
||||
foreach ($ui in $uiFiles) {
|
||||
# Compute .ts path next to the .ui file
|
||||
$tsPath = [System.IO.Path]::ChangeExtension($ui.FullName, '.ts')
|
||||
# Ensure target directory exists
|
||||
$tsDir = Split-Path -Parent $tsPath
|
||||
if (-not (Test-Path $tsDir)) { New-Item -ItemType Directory -Path $tsDir | Out-Null }
|
||||
|
||||
# Use absolute paths to avoid path resolution issues
|
||||
$uiAbs = $ui.FullName
|
||||
$tsAbs = $tsPath
|
||||
|
||||
Write-Host "Updating translations: $uiAbs -> $tsAbs"
|
||||
& $lupdate $uiAbs '-ts' $tsAbs
|
||||
}
|
||||
|
||||
Write-Host 'Translation update completed.'
|
||||
31
dev/update_translations.sh
Normal file
31
dev/update_translations.sh
Normal file
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env bash
|
||||
# Scans all .ui files under src/ and runs pyside6-lupdate to generate/update .ts files next to them.
|
||||
# Usage: Run from repository root: `bash dev/update_translations.sh`
|
||||
set -euo pipefail
|
||||
|
||||
# Ensure we are in repo root (script's directory is dev/)
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
REPO_ROOT="$(dirname "$SCRIPT_DIR")"
|
||||
cd "$REPO_ROOT"
|
||||
|
||||
LUPDATE=".venv/bin/pyside6-lupdate"
|
||||
if [[ ! -x "$LUPDATE" ]]; then
|
||||
echo "Qt for Python lupdate not found at '$LUPDATE'. Ensure venv is created and PySide6 tools installed." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
shopt -s nullglob
|
||||
mapfile -t UI_FILES < <(find src -type f -name '*.ui')
|
||||
|
||||
if [[ ${#UI_FILES[@]} -eq 0 ]]; then
|
||||
echo "No .ui files found under src/. Nothing to update."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
for ui in "${UI_FILES[@]}"; do
|
||||
ts="${ui%.ui}.ts"
|
||||
echo "Updating translations: $ui -> $ts"
|
||||
"$LUPDATE" "$ui" -ts "$ts"
|
||||
done
|
||||
|
||||
echo "Translation update completed."
|
||||
@@ -3,10 +3,11 @@ name = "semesterapparatsmanager"
|
||||
version = "1.0.2"
|
||||
description = "Add your description here"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.12"
|
||||
requires-python = ">=3.13"
|
||||
dependencies = [
|
||||
"appdirs>=1.4.4",
|
||||
"beautifulsoup4>=4.13.5",
|
||||
"bibapi>=0.0.6",
|
||||
"bump-my-version>=0.29.0",
|
||||
"charset-normalizer>=3.4.3",
|
||||
"comtypes>=1.4.9",
|
||||
@@ -32,7 +33,12 @@ dependencies = [
|
||||
]
|
||||
|
||||
[dependency-groups]
|
||||
dev = ["bump-my-version>=0.29.0", "icecream>=2.1.4", "nuitka>=2.5.9"]
|
||||
dev = [
|
||||
"bump-my-version>=0.29.0",
|
||||
"icecream>=2.1.4",
|
||||
"nuitka>=2.5.9",
|
||||
"pyinstaller>=6.17.0",
|
||||
]
|
||||
swbtest = ["alive-progress>=3.3.0"]
|
||||
|
||||
[tool.bumpversion]
|
||||
@@ -60,3 +66,7 @@ post_commit_hooks = []
|
||||
filename = "src/__init__.py"
|
||||
[[tool.bumpversion.files]]
|
||||
filename = ".version"
|
||||
|
||||
[[tool.uv.index]]
|
||||
name = "gitea"
|
||||
url = "https://git.theprivateserver.de/api/packages/PHB/pypi/simple/"
|
||||
|
||||
@@ -3,21 +3,53 @@ __author__ = "Alexander Kirchner"
|
||||
__all__ = ["__author__", "__version__", "settings"]
|
||||
|
||||
import os
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from typing import Union
|
||||
|
||||
|
||||
def get_app_base_path() -> Path:
|
||||
"""Get the base path for the application, handling PyInstaller frozen apps."""
|
||||
if getattr(sys, "frozen", False):
|
||||
# Running as compiled/frozen
|
||||
return Path(sys.executable).parent
|
||||
return Path(__file__).parent.parent
|
||||
|
||||
|
||||
# Initialize LOG_DIR and CONFIG_DIR with fallbacks for frozen apps
|
||||
try:
|
||||
from appdirs import AppDirs
|
||||
app = AppDirs("SemesterApparatsManager", "SAM")
|
||||
_user_log_dir = app.user_log_dir
|
||||
_user_config_dir = app.user_config_dir
|
||||
except Exception:
|
||||
_user_log_dir = None
|
||||
_user_config_dir = None
|
||||
|
||||
# Ensure we always have valid paths
|
||||
if not _user_log_dir:
|
||||
_user_log_dir = str(get_app_base_path() / "logs")
|
||||
if not _user_config_dir:
|
||||
_user_config_dir = str(get_app_base_path() / "config")
|
||||
|
||||
LOG_DIR: str = _user_log_dir
|
||||
CONFIG_DIR: str = _user_config_dir
|
||||
|
||||
# Create directories if they don't exist
|
||||
try:
|
||||
if not Path(LOG_DIR).exists():
|
||||
os.makedirs(LOG_DIR)
|
||||
if not Path(CONFIG_DIR).exists():
|
||||
os.makedirs(CONFIG_DIR)
|
||||
except Exception:
|
||||
# Fallback to current directory if we can't create the directories
|
||||
LOG_DIR = str(get_app_base_path() / "logs")
|
||||
CONFIG_DIR = str(get_app_base_path() / "config")
|
||||
Path(LOG_DIR).mkdir(parents=True, exist_ok=True)
|
||||
Path(CONFIG_DIR).mkdir(parents=True, exist_ok=True)
|
||||
|
||||
from config import Config
|
||||
|
||||
app = AppDirs("SemesterApparatsManager", "SAM")
|
||||
LOG_DIR: str = app.user_log_dir # type: ignore
|
||||
CONFIG_DIR: str = app.user_config_dir # type: ignore
|
||||
if not Path(LOG_DIR).exists(): # type: ignore
|
||||
os.makedirs(LOG_DIR) # type: ignore
|
||||
if not Path(CONFIG_DIR).exists(): # type: ignore
|
||||
os.makedirs(CONFIG_DIR) # type: ignore
|
||||
|
||||
|
||||
settings = Config(f"{CONFIG_DIR}/config.yaml")
|
||||
DATABASE_DIR: Union[Path, str] = ( # type: ignore
|
||||
|
||||
@@ -48,7 +48,8 @@ class Catalogue:
|
||||
log.info(f"Searching for term: {searchterm}")
|
||||
|
||||
links = self.get_book_links(searchterm)
|
||||
print(links)
|
||||
# debug: links
|
||||
# print(links)
|
||||
for elink in links:
|
||||
result = self.search(elink)
|
||||
# in result search for class col-xs-12 rds-dl RDS_LOCATION
|
||||
@@ -179,7 +180,8 @@ class Catalogue:
|
||||
for link in links:
|
||||
result = self.search(link)
|
||||
soup = BeautifulSoup(result, "html.parser")
|
||||
print(link)
|
||||
# debug: link
|
||||
# print(link)
|
||||
ppn = link.split("/")[-1]
|
||||
if ppn and regex.match(r"^\d{8,10}[X\d]?$", ppn):
|
||||
return ppn
|
||||
@@ -273,14 +275,15 @@ class Catalogue:
|
||||
|
||||
# Find the signature for the entry whose location mentions "Semesterapparat"
|
||||
for g in groups:
|
||||
print(g)
|
||||
# debug: group contents
|
||||
# print(g)
|
||||
loc = g.get("location", "").lower()
|
||||
if "semesterapparat" in loc:
|
||||
signature = g.get("signature")
|
||||
return signature
|
||||
signature = g.get("signature")
|
||||
return signature
|
||||
print("No signature found")
|
||||
# print("No signature found")
|
||||
return signature
|
||||
|
||||
def in_library(self, ppn: str) -> bool:
|
||||
|
||||
@@ -28,7 +28,7 @@ from src.core.models import ELSA, Apparat, ApparatData, BookData, Prof
|
||||
from src.errors import AppPresentError, NoResultError
|
||||
from src.logic.constants import SEMAP_MEDIA_ACCOUNTS
|
||||
from src.logic.semester import Semester
|
||||
from src.shared.logging import log
|
||||
from src.shared.logging import log, get_bloat_logger, preview
|
||||
from src.utils.blob import create_blob
|
||||
|
||||
ascii_lowercase = lower + digits + punctuation
|
||||
@@ -756,7 +756,12 @@ class Database:
|
||||
|
||||
"""
|
||||
blob = self.getBlob(filename, app_id)
|
||||
log.debug(blob)
|
||||
bloat = get_bloat_logger()
|
||||
try:
|
||||
bloat.debug("Recreated file blob size: {} bytes", len(blob))
|
||||
bloat.debug("Recreated file blob (preview): {}", preview(blob, 2000))
|
||||
except Exception:
|
||||
bloat.debug("Recreated file blob (preview): {}", preview(blob, 2000))
|
||||
tempdir = settings.database.temp.expanduser()
|
||||
if not tempdir.exists():
|
||||
tempdir.mkdir(parents=True, exist_ok=True)
|
||||
@@ -1211,22 +1216,22 @@ class Database:
|
||||
Optional[int]: the id of the apparat
|
||||
|
||||
"""
|
||||
log.debug(apparat)
|
||||
log.debug("Creating apparat: {} - {}", app.appnr, app.name)
|
||||
app = apparat.apparat
|
||||
prof = apparat.prof
|
||||
present_prof = self.getProfByName(prof.name())
|
||||
prof_id = present_prof.id
|
||||
log.debug(present_prof)
|
||||
log.debug("Present prof: {}", preview(present_prof, 300))
|
||||
|
||||
app_id = self.getApparatId(app.name)
|
||||
if app_id:
|
||||
return AppPresentError(app_id)
|
||||
if not prof_id:
|
||||
log.debug("prof id not present, creating prof with data", prof)
|
||||
log.debug("prof id not present, creating prof with data: {}", preview(prof, 300))
|
||||
prof_id = self.createProf(prof)
|
||||
log.debug(prof_id)
|
||||
log.debug("prof_id: {}", preview(prof_id, 50))
|
||||
query = f"INSERT OR IGNORE INTO semesterapparat (appnr, name, erstellsemester, dauer, prof_id, fach,deletion_status,konto) VALUES ('{app.appnr}', '{app.name}', '{app.created_semester}', '{app.eternal}', {prof_id}, '{app.subject}', '{0}', '{SEMAP_MEDIA_ACCOUNTS[app.appnr]}')"
|
||||
log.debug(query)
|
||||
log.debug("Apparat insert query: {}", preview(query, 500))
|
||||
self.query_db(query)
|
||||
return None
|
||||
|
||||
@@ -1246,7 +1251,7 @@ class Database:
|
||||
)
|
||||
ret = []
|
||||
for i in data:
|
||||
log.debug(i)
|
||||
log.debug("Apparat row: {}", preview(i, 200))
|
||||
ret.append(Apparat().from_tuple(i))
|
||||
return ret
|
||||
|
||||
@@ -1394,7 +1399,7 @@ class Database:
|
||||
apparat_data.apparat.apparat_id_adis,
|
||||
apparat_data.apparat.appnr,
|
||||
)
|
||||
log.debug(f"Updating apparat with query {query} and params {params}")
|
||||
log.debug("Updating apparat: query: {} params: {}", preview(query, 200), preview(params, 300))
|
||||
self.query_db(query, params)
|
||||
|
||||
def checkApparatExists(self, app_name: str):
|
||||
@@ -1912,7 +1917,7 @@ class Database:
|
||||
###
|
||||
|
||||
def createProf(self, profdata: Prof):
|
||||
log.debug(profdata)
|
||||
log.debug("Creating profdata: {}", preview(profdata, 500))
|
||||
conn = self.connect()
|
||||
cursor = conn.cursor()
|
||||
fname = profdata.firstname
|
||||
@@ -1923,7 +1928,7 @@ class Database:
|
||||
title = profdata.title
|
||||
|
||||
query = "INSERT INTO prof (fname, lname, fullname, mail, telnr, titel) VALUES (?,?,?,?,?,?)"
|
||||
log.debug(query)
|
||||
log.debug("DB query: {}", preview(query, 200))
|
||||
cursor.execute(query, (fname, lname, fullname, mail, telnr, title))
|
||||
|
||||
conn.commit()
|
||||
@@ -1967,7 +1972,7 @@ class Database:
|
||||
else:
|
||||
fullname = profdata.name()
|
||||
query = "SELECT id FROM prof WHERE fullname = ?"
|
||||
log.debug(query)
|
||||
log.debug("DB query: {}", preview(query, 200))
|
||||
|
||||
cursor.execute(query, (fullname,))
|
||||
result = cursor.fetchone()
|
||||
@@ -1985,7 +1990,7 @@ class Database:
|
||||
conn = self.connect()
|
||||
cursor = conn.cursor()
|
||||
query = "SELECT * FROM prof WHERE fullname = ?"
|
||||
log.debug(query)
|
||||
log.debug("DB query: {}", preview(query, 200))
|
||||
|
||||
result = cursor.execute(query, (fullname,)).fetchone()
|
||||
if result:
|
||||
|
||||
@@ -1,346 +0,0 @@
|
||||
import os
|
||||
import re
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
from math import ceil
|
||||
from queue import Empty, Queue
|
||||
from time import monotonic # <-- NEW
|
||||
from typing import List, Optional
|
||||
|
||||
from PySide6.QtCore import QThread, Signal
|
||||
|
||||
# from src.logic.webrequest import BibTextTransformer, WebRequest
|
||||
from src.backend.catalogue import Catalogue
|
||||
from src.core.models import BookData
|
||||
from src.logic.SRU import SWB
|
||||
from src.shared.logging import log
|
||||
|
||||
# use all available cores - 2, but at least 1
|
||||
THREAD_COUNT = max(os.cpu_count() - 2, 1)
|
||||
THREAD_MIN_ITEMS = 5
|
||||
|
||||
# Logger configured centrally in main; use shared `log`
|
||||
|
||||
swb = SWB()
|
||||
dnb = SWB()
|
||||
cat = Catalogue()
|
||||
|
||||
RVK_ALLOWED = r"[A-Z0-9.\-\/]" # conservative RVK character set
|
||||
|
||||
|
||||
def find_newer_edition(
|
||||
swb_result: BookData,
|
||||
dnb_result: List[BookData],
|
||||
) -> Optional[List[BookData]]:
|
||||
"""New edition if:
|
||||
- year > swb.year OR
|
||||
- edition_number > swb.edition_number
|
||||
BUT: discard any candidate with year < swb.year (if both years are known).
|
||||
|
||||
Same-work check:
|
||||
- Compare RVK roots of signatures (after stripping trailing '+N' and '(N)').
|
||||
- If both have signatures and RVKs differ -> skip.
|
||||
|
||||
Preferences (in order):
|
||||
1) RVK matches SWB
|
||||
2) Print over Online-Ressource
|
||||
3) Has signature
|
||||
4) Newer: (year desc, edition_number desc)
|
||||
"""
|
||||
|
||||
def strip_copy_and_edition(s: str) -> str:
|
||||
s = re.sub(r"\(\s*\d+\s*\)", "", s) # remove '(N)'
|
||||
s = re.sub(r"\s*\+\s*\d+\s*$", "", s) # remove trailing '+N'
|
||||
return s
|
||||
|
||||
def extract_rvk_root(sig: Optional[str]) -> str:
|
||||
if not sig:
|
||||
return ""
|
||||
t = strip_copy_and_edition(sig.upper())
|
||||
t = re.sub(r"\s+", " ", t).strip()
|
||||
m = re.match(rf"^([A-Z]{{1,3}}\s*{RVK_ALLOWED}*)", t)
|
||||
if not m:
|
||||
cleaned = re.sub(rf"[^{RVK_ALLOWED} ]+", "", t).strip()
|
||||
return cleaned.split(" ")[0] if cleaned else ""
|
||||
return re.sub(r"\s+", " ", m.group(1)).strip()
|
||||
|
||||
def has_sig(b: BookData) -> bool:
|
||||
return bool(getattr(b, "signature", None))
|
||||
|
||||
def is_online(b: BookData) -> bool:
|
||||
return (getattr(b, "media_type", None) or "").strip() == "Online-Ressource"
|
||||
|
||||
def is_print(b: BookData) -> bool:
|
||||
return not is_online(b)
|
||||
|
||||
def rvk_matches_swb(b: BookData) -> bool:
|
||||
if not has_sig(b) or not has_sig(swb_result):
|
||||
return False
|
||||
return extract_rvk_root(b.signature) == extract_rvk_root(swb_result.signature)
|
||||
|
||||
def strictly_newer(b: BookData) -> bool:
|
||||
# Hard guard: if both years are known and candidate is older, discard
|
||||
if (
|
||||
b.year is not None
|
||||
and swb_result.year is not None
|
||||
and b.year < swb_result.year
|
||||
):
|
||||
return False
|
||||
|
||||
newer_by_year = (
|
||||
b.year is not None
|
||||
and swb_result.year is not None
|
||||
and b.year > swb_result.year
|
||||
)
|
||||
newer_by_edition = (
|
||||
b.edition_number is not None
|
||||
and swb_result.edition_number is not None
|
||||
and b.edition_number > swb_result.edition_number
|
||||
)
|
||||
# Thanks to the guard above, newer_by_edition can't pick something with a smaller year.
|
||||
return newer_by_year or newer_by_edition
|
||||
|
||||
swb_has_sig = has_sig(swb_result)
|
||||
swb_rvk = extract_rvk_root(getattr(swb_result, "signature", None))
|
||||
|
||||
# 1) Filter: same work (by RVK if both have sigs) AND strictly newer
|
||||
candidates: List[BookData] = []
|
||||
for b in dnb_result:
|
||||
if has_sig(b) and swb_has_sig:
|
||||
if extract_rvk_root(b.signature) != swb_rvk:
|
||||
continue # different work
|
||||
if strictly_newer(b):
|
||||
candidates.append(b)
|
||||
|
||||
if not candidates:
|
||||
return None
|
||||
|
||||
# 2) Dedupe by PPN → prefer (rvk-match, is-print, has-signature)
|
||||
def pref_score(x: BookData) -> tuple[int, int, int]:
|
||||
return (
|
||||
1 if rvk_matches_swb(x) else 0,
|
||||
1 if is_print(x) else 0,
|
||||
1 if has_sig(x) else 0,
|
||||
)
|
||||
|
||||
by_ppn: dict[Optional[str], BookData] = {}
|
||||
for b in candidates:
|
||||
key = getattr(b, "ppn", None)
|
||||
prev = by_ppn.get(key)
|
||||
if prev is None or pref_score(b) > pref_score(prev):
|
||||
by_ppn[key] = b
|
||||
|
||||
deduped = list(by_ppn.values())
|
||||
if not deduped:
|
||||
return None
|
||||
|
||||
# 3) Preserve all qualifying newer editions, but order by preference
|
||||
def sort_key(b: BookData):
|
||||
year = b.year if b.year is not None else -1
|
||||
ed = b.edition_number if b.edition_number is not None else -1
|
||||
return (
|
||||
1 if rvk_matches_swb(b) else 0,
|
||||
1 if is_print(b) else 0,
|
||||
1 if has_sig(b) else 0,
|
||||
year,
|
||||
ed,
|
||||
)
|
||||
|
||||
deduped.sort(key=sort_key, reverse=True)
|
||||
return deduped
|
||||
|
||||
|
||||
class NewEditionCheckerThread(QThread):
|
||||
updateSignal = Signal(int, int) # (processed, total)
|
||||
updateProgress = Signal(int, int) # (processed, total)
|
||||
total_entries_signal = Signal(int)
|
||||
resultsSignal = Signal(list) # list[tuple[BookData, list[BookData]]]
|
||||
|
||||
# NEW: metrics signals
|
||||
rateSignal = Signal(float) # items per second ("it/s")
|
||||
etaSignal = Signal(int) # seconds remaining (-1 when unknown)
|
||||
|
||||
def __init__(self, entries: Optional[list["BookData"]] = None, parent=None):
|
||||
super().__init__(parent)
|
||||
self.entries: list[BookData] = entries if entries is not None else []
|
||||
self.results: list[tuple[BookData, list[BookData]]] = []
|
||||
|
||||
def reset(self):
|
||||
self.entries = []
|
||||
self.results = []
|
||||
|
||||
# ---------- internal helpers ----------
|
||||
|
||||
@staticmethod
|
||||
def _split_evenly(items: list, parts: int) -> list[list]:
|
||||
"""Split items as evenly as possible into `parts` chunks (no empty tails)."""
|
||||
if parts <= 1 or len(items) <= 1:
|
||||
return [items]
|
||||
n = len(items)
|
||||
base = n // parts
|
||||
extra = n % parts
|
||||
chunks = []
|
||||
i = 0
|
||||
for k in range(parts):
|
||||
size = base + (1 if k < extra else 0)
|
||||
if size == 0:
|
||||
continue
|
||||
chunks.append(items[i : i + size])
|
||||
i += size
|
||||
return chunks
|
||||
|
||||
@staticmethod
|
||||
def _clean_title(raw: str) -> str:
|
||||
title = raw.rstrip(" .:,;!?")
|
||||
title = re.sub(r"\s*\(.*\)", "", title)
|
||||
return title.strip()
|
||||
|
||||
@classmethod
|
||||
def _process_book(
|
||||
cls,
|
||||
book: "BookData",
|
||||
) -> tuple["BookData", list["BookData"]] | None:
|
||||
"""Process one book; returns (original, [found editions]) or None on failure."""
|
||||
if not book.title:
|
||||
return None
|
||||
response: list[BookData] = []
|
||||
query = [
|
||||
f"pica.tit={book.title}",
|
||||
f"pica.vlg={book.publisher}",
|
||||
]
|
||||
|
||||
swb_result = swb.getBooks(["pica.bib=20735", f"pica.ppn={book.ppn}"])[0]
|
||||
dnb_results = swb.getBooks(query)
|
||||
new_editions = find_newer_edition(swb_result, dnb_results)
|
||||
|
||||
if new_editions is not None:
|
||||
for new_edition in new_editions:
|
||||
new_edition.library_location = cat.get_location(new_edition.ppn)
|
||||
try:
|
||||
isbn = (
|
||||
str(new_edition.isbn[0])
|
||||
if isinstance(new_edition.isbn, list)
|
||||
else str(new_edition.isbn)
|
||||
)
|
||||
new_edition.link = (
|
||||
f"https://www.lehmanns.de/search/quick?mediatype_id=2&q={isbn}"
|
||||
)
|
||||
except (IndexError, TypeError):
|
||||
isbn = None
|
||||
new_edition.in_library = cat.in_library(new_edition.ppn)
|
||||
response = new_editions
|
||||
|
||||
# client = SWB()
|
||||
# response: list["BookData"] = []
|
||||
# # First, search by title only
|
||||
# results = client.getBooks([f"pica.title={title}", f"pica.vlg={book.publisher}"])
|
||||
|
||||
# lehmanns = LehmannsClient()
|
||||
# results = lehmanns.search_by_title(title)
|
||||
# for result in results:
|
||||
# if "(eBook)" in result.title:
|
||||
# result.title = result.title.replace("(eBook)", "").strip()
|
||||
# swb_results = client.getBooks(
|
||||
# [
|
||||
# f"pica.tit={result.title}",
|
||||
# f"pica.vlg={result.publisher.split(',')[0]}",
|
||||
# ]
|
||||
# )
|
||||
# for swb in swb_results:
|
||||
# if swb.isbn == result.isbn:
|
||||
# result.ppn = swb.ppn
|
||||
# result.signature = swb.signature
|
||||
# response.append(result)
|
||||
# if (result.edition_number < swb.edition_number) and (
|
||||
# swb.year > result.year
|
||||
# ):
|
||||
# response.append(result)
|
||||
if response == []:
|
||||
return None
|
||||
# Remove duplicates based on ppn
|
||||
return (book, response)
|
||||
|
||||
@classmethod
|
||||
def _worker(cls, items: list["BookData"], q: Queue) -> None:
|
||||
"""Worker for one chunk; pushes ('result', ...), ('progress', 1), and ('done', None)."""
|
||||
try:
|
||||
for book in items:
|
||||
try:
|
||||
result = cls._process_book(book)
|
||||
except Exception:
|
||||
result = None
|
||||
if result is not None:
|
||||
q.put(("result", result))
|
||||
q.put(("progress", 1))
|
||||
finally:
|
||||
q.put(("done", None))
|
||||
|
||||
# ---------- thread entry point ----------
|
||||
|
||||
def run(self):
|
||||
total = len(self.entries)
|
||||
self.total_entries_signal.emit(total)
|
||||
|
||||
# start timer for metrics
|
||||
t0 = monotonic()
|
||||
|
||||
if total == 0:
|
||||
log.debug("No entries to process.")
|
||||
# emit metrics (zero work)
|
||||
self.rateSignal.emit(0.0)
|
||||
self.etaSignal.emit(0)
|
||||
self.resultsSignal.emit([])
|
||||
return
|
||||
|
||||
# Up to 4 workers; ~20 items per worker
|
||||
num_workers = min(THREAD_COUNT, max(1, ceil(total / THREAD_MIN_ITEMS)))
|
||||
chunks = self._split_evenly(self.entries, num_workers)
|
||||
sizes = [len(ch) for ch in chunks]
|
||||
|
||||
q: Queue = Queue()
|
||||
processed = 0
|
||||
finished_workers = 0
|
||||
|
||||
with ThreadPoolExecutor(max_workers=len(chunks)) as ex:
|
||||
futures = [ex.submit(self._worker, ch, q) for ch in chunks]
|
||||
|
||||
log.info(
|
||||
f"Launched {len(futures)} worker thread(s) for {total} entries: {sizes} entries per thread.",
|
||||
)
|
||||
for idx, sz in enumerate(sizes, 1):
|
||||
log.debug(f"Thread {idx}: {sz} entries")
|
||||
|
||||
# Aggregate progress/results
|
||||
while finished_workers < len(chunks):
|
||||
try:
|
||||
kind, payload = q.get(timeout=0.1)
|
||||
except Empty:
|
||||
continue
|
||||
|
||||
if kind == "progress":
|
||||
processed += int(payload)
|
||||
self.updateSignal.emit(processed, total)
|
||||
self.updateProgress.emit(processed, total)
|
||||
|
||||
# ---- NEW: compute & emit metrics ----
|
||||
elapsed = max(1e-9, monotonic() - t0)
|
||||
rate = processed / elapsed # items per second
|
||||
remaining = max(0, total - processed)
|
||||
eta_sec = int(round(remaining / rate)) if rate > 0 else -1
|
||||
|
||||
self.rateSignal.emit(rate)
|
||||
# clamp negative just in case
|
||||
self.etaSignal.emit(max(0, eta_sec) if eta_sec >= 0 else -1)
|
||||
# -------------------------------------
|
||||
|
||||
elif kind == "result":
|
||||
self.results.append(payload)
|
||||
elif kind == "done":
|
||||
finished_workers += 1
|
||||
|
||||
# Final metrics on completion
|
||||
elapsed_total = max(1e-9, monotonic() - t0)
|
||||
final_rate = total / elapsed_total
|
||||
self.rateSignal.emit(final_rate)
|
||||
self.etaSignal.emit(0)
|
||||
|
||||
self.resultsSignal.emit(self.results)
|
||||
@@ -1,7 +1,7 @@
|
||||
import sys
|
||||
import time
|
||||
|
||||
import loguru
|
||||
from src.shared.logging import log
|
||||
|
||||
# from icecream import ic
|
||||
from PySide6.QtCore import QThread
|
||||
@@ -10,11 +10,7 @@ from PySide6.QtCore import Signal as Signal
|
||||
from src import LOG_DIR
|
||||
from src.database import Database
|
||||
|
||||
log = loguru.logger
|
||||
log.remove()
|
||||
log.add(sys.stdout, level="INFO")
|
||||
log.add(f"{LOG_DIR}/application.log", rotation="1 MB", retention="10 days")
|
||||
|
||||
# use centralized logging from src.shared.logging
|
||||
|
||||
# from src.transformers import RDS_AVAIL_DATA
|
||||
|
||||
|
||||
@@ -28,19 +28,19 @@ class AvailChecker(QThread):
|
||||
+ str(links)
|
||||
+ " with appnumber "
|
||||
+ str(appnumber)
|
||||
+ "..."
|
||||
+ "...",
|
||||
)
|
||||
self.links = links
|
||||
self.appnumber = appnumber
|
||||
self.books = books or []
|
||||
log.info(
|
||||
f"Started worker with appnumber: {self.appnumber} and links: {self.links} and {len(self.books)} books..."
|
||||
f"Started worker with appnumber: {self.appnumber} and links: {self.links} and {len(self.books)} books...",
|
||||
)
|
||||
# Pre-create reusable request and transformer to avoid per-item overhead
|
||||
self._request = WebRequest().set_apparat(self.appnumber)
|
||||
self._rds_transformer = BibTextTransformer(TransformerType.RDS)
|
||||
|
||||
def run(self):
|
||||
def run(self) -> None:
|
||||
self.db = Database()
|
||||
state = 0
|
||||
count = 0
|
||||
|
||||
@@ -2,7 +2,10 @@ from PySide6.QtCore import QThread, Signal
|
||||
|
||||
from src.database import Database
|
||||
from src.services.webrequest import BibTextTransformer, WebRequest
|
||||
from src.shared.logging import log
|
||||
from src.shared.logging import log, get_bloat_logger, preview
|
||||
|
||||
# bloat logger for large/raw payloads
|
||||
bloat = get_bloat_logger()
|
||||
|
||||
# Logger configured centrally in main; this module just uses `log`
|
||||
|
||||
@@ -63,12 +66,12 @@ class BookGrabber(QThread):
|
||||
continue
|
||||
|
||||
bd = BibTextTransformer(self.mode)
|
||||
log.debug(webdata)
|
||||
bloat.debug("Web response (preview): {}", preview(webdata, 2000))
|
||||
if self.mode == "ARRAY":
|
||||
if self.use_exact:
|
||||
bd = bd.use_signature(entry)
|
||||
bd = bd.get_data(webdata).return_data()
|
||||
log.debug(bd)
|
||||
bloat.debug("Transformed bookdata (preview): {}", preview(bd, 1000))
|
||||
if bd is None:
|
||||
# bd = BookData
|
||||
continue
|
||||
|
||||
@@ -414,3 +414,55 @@ class SemapDocument:
|
||||
if self.books is not None:
|
||||
return [book.signature for book in self.books if book.has_signature]
|
||||
return []
|
||||
|
||||
|
||||
@dataclass
|
||||
class ELSA_Mono:
|
||||
authorName: str
|
||||
year: int
|
||||
signature: str
|
||||
page_from: int
|
||||
page_to: int
|
||||
edition: str | None = None
|
||||
|
||||
|
||||
@dataclass
|
||||
class ELSA_Journal:
|
||||
authorName: str
|
||||
year: int
|
||||
issue: str
|
||||
page_from: int
|
||||
page_to: int
|
||||
journal_title: str
|
||||
article_title: str
|
||||
signature: str
|
||||
|
||||
|
||||
@dataclass
|
||||
class Person:
|
||||
firstName: str
|
||||
lastName: str
|
||||
personTitle: str | None = None
|
||||
|
||||
@property
|
||||
def fullName_LNFN(self) -> str:
|
||||
return f"{self.lastName}, {self.firstName}"
|
||||
|
||||
|
||||
@dataclass
|
||||
class ELSA_Editorial:
|
||||
# TODO: add dataclass fields
|
||||
pass
|
||||
|
||||
|
||||
@dataclass
|
||||
class ELSADocument:
|
||||
mail: str = None
|
||||
personTitle: str = None
|
||||
personName: Optional[str] = None
|
||||
|
||||
def __post_init__(self) -> None:
|
||||
"""."""
|
||||
self.mail = self.mail.strip() if self.mail else None
|
||||
self.personTitle = self.personTitle.strip() if self.personTitle else None
|
||||
self.personName = self.personName.strip() if self.personName else None
|
||||
|
||||
@@ -245,4 +245,5 @@ if __name__ == "__main__":
|
||||
]
|
||||
for ex in examples:
|
||||
parsed = Semester.from_string(ex)
|
||||
print(f"'{ex}' → {parsed} ({parsed.year=}, {parsed.semester=})")
|
||||
# debug: demonstration output (disabled)
|
||||
# print(f"'{ex}' → {parsed} ({parsed.year=}, {parsed.semester=})")
|
||||
|
||||
@@ -28,7 +28,7 @@ from src.errors import AppPresentError, NoResultError
|
||||
from src.core.models import ELSA, Apparat, ApparatData, BookData, Prof
|
||||
from src.core.constants import SEMAP_MEDIA_ACCOUNTS
|
||||
from src.core.semester import Semester
|
||||
from src.shared.logging import log
|
||||
from src.shared.logging import log, get_bloat_logger, preview
|
||||
from src.utils.blob import create_blob
|
||||
|
||||
ascii_lowercase = lower + digits + punctuation
|
||||
@@ -732,7 +732,12 @@ class Database:
|
||||
str: The filename of the recreated file
|
||||
"""
|
||||
blob = self.getBlob(filename, app_id)
|
||||
log.debug(blob)
|
||||
bloat = get_bloat_logger()
|
||||
try:
|
||||
bloat.debug("Recreated file blob size: {} bytes", len(blob))
|
||||
bloat.debug("Recreated file blob (preview): {}", preview(blob, 2000))
|
||||
except Exception:
|
||||
bloat.debug("Recreated file blob (preview): {}", preview(blob, 2000))
|
||||
tempdir = settings.database.temp.expanduser()
|
||||
if not tempdir.exists():
|
||||
tempdir.mkdir(parents=True, exist_ok=True)
|
||||
@@ -1145,22 +1150,23 @@ class Database:
|
||||
Returns:
|
||||
Optional[int]: the id of the apparat
|
||||
"""
|
||||
log.debug(apparat)
|
||||
bloat = get_bloat_logger()
|
||||
bloat.debug("Apparat (preview): {}", preview(apparat, 500))
|
||||
app = apparat.apparat
|
||||
prof = apparat.prof
|
||||
present_prof = self.getProfByName(prof.name())
|
||||
prof_id = present_prof.id
|
||||
log.debug(present_prof)
|
||||
bloat.debug("Present prof: {}", preview(present_prof, 300))
|
||||
|
||||
app_id = self.getApparatId(app.name)
|
||||
if app_id:
|
||||
return AppPresentError(app_id)
|
||||
if not prof_id:
|
||||
log.debug("prof id not present, creating prof with data", prof)
|
||||
bloat.debug("prof id not present, creating prof with data: {}", preview(prof, 300))
|
||||
prof_id = self.createProf(prof)
|
||||
log.debug(prof_id)
|
||||
log.debug("prof_id: {}", preview(prof_id, 50))
|
||||
query = f"INSERT OR IGNORE INTO semesterapparat (appnr, name, erstellsemester, dauer, prof_id, fach,deletion_status,konto) VALUES ('{app.appnr}', '{app.name}', '{app.created_semester}', '{app.eternal}', {prof_id}, '{app.subject}', '{0}', '{SEMAP_MEDIA_ACCOUNTS[app.appnr]}')"
|
||||
log.debug(query)
|
||||
log.debug("Apparat insert query: {}", preview(query, 500))
|
||||
self.query_db(query)
|
||||
return None
|
||||
|
||||
@@ -1178,7 +1184,7 @@ class Database:
|
||||
)
|
||||
ret = []
|
||||
for i in data:
|
||||
log.debug(i)
|
||||
log.debug("Apparat row: {}", preview(i, 200))
|
||||
ret.append(Apparat().from_tuple(i))
|
||||
return ret
|
||||
|
||||
@@ -1318,7 +1324,7 @@ class Database:
|
||||
apparat_data.apparat.apparat_id_adis,
|
||||
apparat_data.apparat.appnr,
|
||||
)
|
||||
log.debug(f"Updating apparat with query {query} and params {params}")
|
||||
log.debug("Updating apparat: query: {} params: {}", preview(query, 200), preview(params, 300))
|
||||
self.query_db(query, params)
|
||||
|
||||
def checkApparatExists(self, app_name: str):
|
||||
@@ -1792,7 +1798,8 @@ class Database:
|
||||
###
|
||||
|
||||
def createProf(self, profdata: Prof):
|
||||
log.debug(profdata)
|
||||
bloat = get_bloat_logger()
|
||||
bloat.debug("Creating profdata: {}", preview(profdata, 500))
|
||||
conn = self.connect()
|
||||
cursor = conn.cursor()
|
||||
fname = profdata.firstname
|
||||
@@ -1803,7 +1810,7 @@ class Database:
|
||||
title = profdata.title
|
||||
|
||||
query = "INSERT INTO prof (fname, lname, fullname, mail, telnr, titel) VALUES (?,?,?,?,?,?)"
|
||||
log.debug(query)
|
||||
log.debug("DB query: {}", preview(query, 200))
|
||||
cursor.execute(query, (fname, lname, fullname, mail, telnr, title))
|
||||
|
||||
conn.commit()
|
||||
@@ -1848,7 +1855,7 @@ class Database:
|
||||
else:
|
||||
fullname = profdata.name()
|
||||
query = "SELECT id FROM prof WHERE fullname = ?"
|
||||
log.debug(query)
|
||||
log.debug("DB query: {}", preview(query, 200))
|
||||
|
||||
cursor.execute(query, (fullname,))
|
||||
result = cursor.fetchone()
|
||||
@@ -1866,7 +1873,7 @@ class Database:
|
||||
conn = self.connect()
|
||||
cursor = conn.cursor()
|
||||
query = "SELECT * FROM prof WHERE fullname = ?"
|
||||
log.debug(query)
|
||||
log.debug("DB query: {}", preview(query, 200))
|
||||
|
||||
result = cursor.execute(query, (fullname,)).fetchone()
|
||||
if result:
|
||||
|
||||
@@ -24,4 +24,5 @@ def csv_to_list(path: str) -> SemapDocument:
|
||||
if __name__ == "__main__":
|
||||
text = csv_to_list("C:/Users/aky547/Desktop/semap/sap71.csv")
|
||||
# remove linebreaks
|
||||
print(text)
|
||||
# debug: print result when running as script
|
||||
# print(text)
|
||||
|
||||
@@ -7,15 +7,10 @@ from dataclasses import dataclass
|
||||
from dataclasses import field as dataclass_field
|
||||
from typing import Any, List
|
||||
|
||||
import loguru
|
||||
|
||||
from src import LOG_DIR
|
||||
from src.shared.logging import log, get_bloat_logger, preview
|
||||
from src.core.models import BookData
|
||||
|
||||
log = loguru.logger
|
||||
log.remove()
|
||||
log.add(sys.stdout, level="INFO")
|
||||
log.add(f"{LOG_DIR}/application.log", rotation="1 MB", retention="10 days")
|
||||
# use centralized logging configured in application startup
|
||||
|
||||
|
||||
###Pydatnic models
|
||||
@@ -386,7 +381,9 @@ class RDSData:
|
||||
def transform(self, data: str):
|
||||
# rds_availability = RDS_AVAIL_DATA()
|
||||
# rds_data = RDS_GENERIC_DATA()
|
||||
print(data)
|
||||
# debug: raw RDS data -> send to bloat logger
|
||||
bloat = get_bloat_logger()
|
||||
bloat.debug("RDS raw data (preview): {}", preview(data, 2000))
|
||||
|
||||
def __get_raw_data(data: str) -> list:
|
||||
# create base data to be turned into pydantic classes
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import xml.etree.ElementTree as ET
|
||||
from src.shared.logging import log, get_bloat_logger, preview
|
||||
|
||||
from src.core.models import Apparat, BookData, SemapDocument, XMLMailSubmission
|
||||
from src.core.semester import Semester
|
||||
@@ -51,8 +52,9 @@ def parse_xml_submission(xml_string: str) -> XMLMailSubmission:
|
||||
def eml_parser(path: str) -> XMLMailSubmission:
|
||||
with open(path, "r", encoding="utf-8") as file:
|
||||
xml_content = file.read().split("\n\n", 1)[1] # Skip headers
|
||||
print("EML content loaded, parsing XML...")
|
||||
print(xml_content)
|
||||
log.debug("EML content loaded, parsing XML...")
|
||||
bloat = get_bloat_logger()
|
||||
bloat.debug("EML raw XML (preview): {}", preview(xml_content, 2000))
|
||||
return parse_xml_submission(xml_content)
|
||||
|
||||
|
||||
|
||||
@@ -48,7 +48,8 @@ class Catalogue:
|
||||
log.info(f"Searching for term: {searchterm}")
|
||||
|
||||
links = self.get_book_links(searchterm)
|
||||
print(links)
|
||||
# debug: links
|
||||
# print(links)
|
||||
for elink in links:
|
||||
result = self.search(elink)
|
||||
# in result search for class col-xs-12 rds-dl RDS_LOCATION
|
||||
@@ -174,7 +175,8 @@ class Catalogue:
|
||||
for link in links:
|
||||
result = self.search(link)
|
||||
soup = BeautifulSoup(result, "html.parser")
|
||||
print(link)
|
||||
# debug: link
|
||||
# print(link)
|
||||
ppn = link.split("/")[-1]
|
||||
if ppn and regex.match(r"^\d{8,10}[X\d]?$", ppn):
|
||||
return ppn
|
||||
@@ -266,7 +268,8 @@ class Catalogue:
|
||||
|
||||
# Find the signature for the entry whose location mentions "Semesterapparat"
|
||||
for g in groups:
|
||||
print(g)
|
||||
# debug: group contents
|
||||
# print(g)
|
||||
loc = g.get("location", "").lower()
|
||||
if "semesterapparat" in loc:
|
||||
signature = g.get("signature")
|
||||
|
||||
@@ -8,7 +8,10 @@ from bs4 import BeautifulSoup
|
||||
from ratelimit import limits, sleep_and_retry
|
||||
|
||||
from src.core.models import BookData
|
||||
from src.shared.logging import log
|
||||
from src.shared.logging import log, get_bloat_logger, preview
|
||||
|
||||
# bloat logger for large/raw HTTP responses
|
||||
bloat = get_bloat_logger()
|
||||
from src.transformers import ARRAYData, BibTeXData, COinSData, RDSData, RISData
|
||||
from src.transformers.transformers import RDS_AVAIL_DATA, RDS_GENERIC_DATA
|
||||
|
||||
@@ -18,7 +21,6 @@ from src.transformers.transformers import RDS_AVAIL_DATA, RDS_GENERIC_DATA
|
||||
API_URL = "https://rds.ibs-bw.de/phfreiburg/opac/RDSIndexrecord/{}/"
|
||||
PPN_URL = "https://rds.ibs-bw.de/phfreiburg/opac/RDSIndex/Search?type0%5B%5D=allfields&lookfor0%5B%5D=&join=AND&bool0%5B%5D=AND&type0%5B%5D=au&lookfor0%5B%5D=&join=AND&bool0%5B%5D=AND&type0%5B%5D=ti&lookfor0%5B%5D=&join=AND&bool0%5B%5D=AND&type0%5B%5D=ct&lookfor0%5B%5D=&join=AND&bool0%5B%5D=AND&type0%5B%5D=isn&lookfor0%5B%5D=&join=AND&bool0%5B%5D=AND&type0%5B%5D=ta&lookfor0%5B%5D=&join=AND&bool0%5B%5D=AND&type0%5B%5D=co&lookfor0%5B%5D=&join=AND&bool0%5B%5D=AND&type0%5B%5D=py&lookfor0%5B%5D=&join=AND&bool0%5B%5D=AND&type0%5B%5D=pp&lookfor0%5B%5D=&join=AND&bool0%5B%5D=AND&type0%5B%5D=pu&lookfor0%5B%5D=&join=AND&bool0%5B%5D=AND&type0%5B%5D=si&lookfor0%5B%5D={}&join=AND&bool0%5B%5D=AND&type0%5B%5D=zr&lookfor0%5B%5D=&join=AND&bool0%5B%5D=AND&type0%5B%5D=cc&lookfor0%5B%5D=&join=AND&bool0%5B%5D=AND"
|
||||
BASE = "https://rds.ibs-bw.de"
|
||||
#
|
||||
TITLE = "RDS_TITLE"
|
||||
SIGNATURE = "RDS_SIGNATURE"
|
||||
EDITION = "RDS_EDITION"
|
||||
@@ -55,7 +57,7 @@ class WebRequest:
|
||||
|
||||
@property
|
||||
def use_any_book(self):
|
||||
"""use any book that matches the search term"""
|
||||
"""Use any book that matches the search term"""
|
||||
self.use_any = True
|
||||
log.info("Using any book")
|
||||
return self
|
||||
@@ -68,6 +70,7 @@ class WebRequest:
|
||||
return self
|
||||
|
||||
def get_ppn(self, signature: str) -> "WebRequest":
|
||||
"""Take a book signature as input and set the PPN."""
|
||||
self.signature = signature
|
||||
if "+" in signature:
|
||||
signature = signature.replace("+", "%2B")
|
||||
@@ -109,7 +112,7 @@ class WebRequest:
|
||||
|
||||
def get_data(self) -> Optional[list[str]]:
|
||||
links = self.get_book_links(self.ppn)
|
||||
log.debug(f"Links: {links}")
|
||||
bloat.debug("Links (preview): {}", preview(links, 500))
|
||||
return_data: list[str] = []
|
||||
for link in links:
|
||||
result: str = self.search(link) # type:ignore
|
||||
@@ -128,12 +131,11 @@ class WebRequest:
|
||||
data = tag.text.strip()
|
||||
return_data.append(data)
|
||||
return return_data
|
||||
else:
|
||||
log.error("No <pre> tag found")
|
||||
return return_data
|
||||
else:
|
||||
item_location = location.find(
|
||||
"div", class_="col-xs-12 col-md-7 col-lg-8 rds-dl-panel"
|
||||
"div",
|
||||
class_="col-xs-12 col-md-7 col-lg-8 rds-dl-panel",
|
||||
).text.strip()
|
||||
log.debug(f"Item location: {item_location}")
|
||||
if self.use_any:
|
||||
@@ -143,10 +145,9 @@ class WebRequest:
|
||||
data = tag.text.strip()
|
||||
return_data.append(data)
|
||||
return return_data
|
||||
else:
|
||||
log.error("No <pre> tag found")
|
||||
raise ValueError("No <pre> tag found")
|
||||
elif f"Semesterapparat-{self.apparat}" in item_location:
|
||||
if f"Semesterapparat-{self.apparat}" in item_location:
|
||||
pre_tag = soup.find_all("pre")
|
||||
return_data = []
|
||||
if pre_tag:
|
||||
@@ -154,12 +155,10 @@ class WebRequest:
|
||||
data = tag.text.strip()
|
||||
return_data.append(data)
|
||||
return return_data
|
||||
else:
|
||||
log.error("No <pre> tag found")
|
||||
return return_data
|
||||
else:
|
||||
log.error(
|
||||
f"Signature {self.signature} not found in {item_location}"
|
||||
f"Signature {self.signature} not found in {item_location}",
|
||||
)
|
||||
# return_data = []
|
||||
|
||||
@@ -182,7 +181,6 @@ class WebRequest:
|
||||
data = tag.text.strip()
|
||||
return_data.append(data)
|
||||
return return_data
|
||||
else:
|
||||
log.error("No <pre> tag found")
|
||||
return return_data
|
||||
|
||||
@@ -213,7 +211,7 @@ class BibTextTransformer:
|
||||
# self.bookdata = BookData(**self.data)
|
||||
|
||||
def use_signature(self, signature: str) -> "BibTextTransformer":
|
||||
"""use the exact signature to search for the book"""
|
||||
"""Use the exact signature to search for the book"""
|
||||
self.signature = signature
|
||||
return self
|
||||
|
||||
@@ -251,7 +249,8 @@ class BibTextTransformer:
|
||||
return self
|
||||
|
||||
def return_data(
|
||||
self, option: Any = None
|
||||
self,
|
||||
option: Any = None,
|
||||
) -> Union[
|
||||
Optional[BookData],
|
||||
Optional[RDS_GENERIC_DATA],
|
||||
@@ -266,6 +265,7 @@ class BibTextTransformer:
|
||||
|
||||
Returns:
|
||||
BookData: a dataclass containing data about the book
|
||||
|
||||
"""
|
||||
if self.data is None:
|
||||
return None
|
||||
@@ -311,4 +311,4 @@ if __name__ == "__main__":
|
||||
link = "CU 8500 K64"
|
||||
data = WebRequest(71).get_ppn(link).get_data()
|
||||
bib = BibTextTransformer("ARRAY").get_data().return_data()
|
||||
log.debug(bib)
|
||||
bloat.debug("Bib (preview): {}", preview(bib, 1000))
|
||||
|
||||
@@ -5,7 +5,7 @@ from pyzotero import zotero
|
||||
|
||||
from src import settings
|
||||
from src.services.webrequest import BibTextTransformer, WebRequest
|
||||
from src.shared.logging import log
|
||||
from src.shared.logging import log, get_bloat_logger, preview
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -215,7 +215,8 @@ class ZoteroController:
|
||||
def createItem(self, item) -> Optional[str]:
|
||||
resp = self.zot.create_items([item]) # type: ignore
|
||||
if "successful" in resp.keys():
|
||||
log.debug(resp)
|
||||
bloat = get_bloat_logger()
|
||||
bloat.debug("Zotero create_items response (preview): {}", preview(resp, 1000))
|
||||
return resp["successful"]["0"]["key"]
|
||||
else:
|
||||
return None
|
||||
@@ -229,7 +230,8 @@ class ZoteroController:
|
||||
break
|
||||
|
||||
def createHGSection(self, book: Book, data: dict) -> Optional[str]:
|
||||
log.debug(book)
|
||||
bloat = get_bloat_logger()
|
||||
bloat.debug("Zotero Book payload (preview): {}", preview(book.to_dict(), 1000))
|
||||
chapter = BookSection()
|
||||
chapter.assign(book)
|
||||
chapter.pages = data["pages"]
|
||||
@@ -247,7 +249,7 @@ class ZoteroController:
|
||||
]
|
||||
chapter.creators += authors
|
||||
|
||||
log.debug(chapter.to_dict())
|
||||
bloat.debug("Zotero Chapter payload (preview): {}", preview(chapter.to_dict(), 1000))
|
||||
return self.createItem(chapter.to_dict())
|
||||
pass
|
||||
|
||||
|
||||
@@ -8,18 +8,60 @@ log = loguru.logger
|
||||
_configured = False
|
||||
|
||||
|
||||
def _preview(obj, max_len: int = 200):
|
||||
try:
|
||||
s = repr(obj)
|
||||
except Exception:
|
||||
try:
|
||||
s = str(obj)
|
||||
except Exception:
|
||||
s = "<unrepresentable>"
|
||||
if len(s) > max_len:
|
||||
return s[:max_len] + "..."
|
||||
return s
|
||||
|
||||
|
||||
def configure(level: str = "INFO", to_stdout: bool = True, rotate_bytes: str = "1 MB"):
|
||||
"""Configure the global logger and add application and bloat sinks.
|
||||
|
||||
The bloat sink only captures records that have ``extra['bloat']`` set to True.
|
||||
Use ``get_bloat_logger()`` to obtain a logger bound for large/raw data.
|
||||
"""
|
||||
global _configured
|
||||
if _configured:
|
||||
return log
|
||||
log.remove()
|
||||
if to_stdout:
|
||||
if to_stdout and sys.stdout is not None:
|
||||
log.add(sys.stdout, level=level)
|
||||
# application rolling log
|
||||
if LOG_DIR is not None:
|
||||
log.add(
|
||||
f"{LOG_DIR}/application.log",
|
||||
rotation=rotate_bytes,
|
||||
retention="10 days",
|
||||
)
|
||||
# separate bloat log for large or verbose payloads
|
||||
log.add(
|
||||
f"{LOG_DIR}/bloat.log",
|
||||
rotation="10 MB",
|
||||
retention="14 days",
|
||||
level="DEBUG",
|
||||
filter=lambda record: record["extra"].get("bloat", False),
|
||||
)
|
||||
_configured = True
|
||||
return log
|
||||
|
||||
|
||||
def get_bloat_logger():
|
||||
"""Return a logger bound to mark records as bloat.
|
||||
|
||||
Usage:
|
||||
bloat = get_bloat_logger()
|
||||
bloat.debug(large_payload)
|
||||
"""
|
||||
return log.bind(bloat=True)
|
||||
|
||||
|
||||
def preview(obj, max_len: int = 200):
|
||||
"""Public preview helper to create truncated representations for logs."""
|
||||
return _preview(obj, max_len)
|
||||
|
||||
@@ -7,16 +7,10 @@ from dataclasses import dataclass
|
||||
from dataclasses import field as dataclass_field
|
||||
from typing import Any, List
|
||||
|
||||
import loguru
|
||||
|
||||
from src import LOG_DIR
|
||||
from src.shared.logging import log
|
||||
from src.core.models import BookData
|
||||
|
||||
log = loguru.logger
|
||||
log.remove()
|
||||
log.add(sys.stdout, level="INFO")
|
||||
log.add(f"{LOG_DIR}/application.log", rotation="1 MB", retention="10 days")
|
||||
|
||||
# use centralized logging from src.shared.logging
|
||||
|
||||
###Pydatnic models
|
||||
@dataclass
|
||||
@@ -386,7 +380,6 @@ class RDSData:
|
||||
def transform(self, data: str):
|
||||
# rds_availability = RDS_AVAIL_DATA()
|
||||
# rds_data = RDS_GENERIC_DATA()
|
||||
print(data)
|
||||
|
||||
def __get_raw_data(data: str) -> list:
|
||||
# create base data to be turned into pydantic classes
|
||||
|
||||
17
src/ui/dialogs/dialog_sources/about.ts
Normal file
17
src/ui/dialogs/dialog_sources/about.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1">
|
||||
<context>
|
||||
<name>about</name>
|
||||
<message>
|
||||
<location filename="about.ui" line="14"/>
|
||||
<source>Dialog</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="about.ui" line="26"/>
|
||||
<source>SemesterapparatsManagement</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
12
src/ui/dialogs/dialog_sources/app_status.ts
Normal file
12
src/ui/dialogs/dialog_sources/app_status.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1">
|
||||
<context>
|
||||
<name>Form</name>
|
||||
<message>
|
||||
<location filename="app_status.ui" line="14"/>
|
||||
<source>Form</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
@@ -1,22 +1,34 @@
|
||||
# Form implementation generated from reading ui file 'c:\Users\aky547\GitHub\SemesterapparatsManager\src\ui\dialogs\dialog_sources\app_status.ui'
|
||||
#
|
||||
# Created by: PySide6 UI code generator 6.8.0
|
||||
#
|
||||
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
|
||||
# run again. Do not edit this file unless you know what you are doing.
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
################################################################################
|
||||
## Form generated from reading UI file 'app_status.ui'
|
||||
##
|
||||
## Created by: Qt User Interface Compiler version 6.9.2
|
||||
##
|
||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
################################################################################
|
||||
|
||||
from PySide6 import QtCore
|
||||
|
||||
from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
|
||||
QMetaObject, QObject, QPoint, QRect,
|
||||
QSize, QTime, QUrl, Qt)
|
||||
from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
|
||||
QFont, QFontDatabase, QGradient, QIcon,
|
||||
QImage, QKeySequence, QLinearGradient, QPainter,
|
||||
QPalette, QPixmap, QRadialGradient, QTransform)
|
||||
from PySide6.QtWidgets import (QApplication, QSizePolicy, QWidget)
|
||||
|
||||
class Ui_Form(object):
|
||||
def setupUi(self, Form):
|
||||
Form.setObjectName("Form")
|
||||
if not Form.objectName():
|
||||
Form.setObjectName(u"Form")
|
||||
Form.resize(300, 500)
|
||||
|
||||
self.retranslateUi(Form)
|
||||
QtCore.QMetaObject.connectSlotsByName(Form)
|
||||
|
||||
QMetaObject.connectSlotsByName(Form)
|
||||
# setupUi
|
||||
|
||||
def retranslateUi(self, Form):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
Form.setWindowTitle(_translate("Form", "Form"))
|
||||
Form.setWindowTitle(QCoreApplication.translate("Form", u"Form", None))
|
||||
# retranslateUi
|
||||
|
||||
|
||||
37
src/ui/dialogs/dialog_sources/apparat_extend.ts
Normal file
37
src/ui/dialogs/dialog_sources/apparat_extend.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1">
|
||||
<context>
|
||||
<name>Dialog</name>
|
||||
<message>
|
||||
<location filename="apparat_extend.ui" line="32"/>
|
||||
<source>Dialog</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="apparat_extend.ui" line="71"/>
|
||||
<source>Bis wann soll der Apparat verlängert werden?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="apparat_extend.ui" line="112"/>
|
||||
<source>Sommer</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="apparat_extend.ui" line="125"/>
|
||||
<source>Winter</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="apparat_extend.ui" line="139"/>
|
||||
<source>2023</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="apparat_extend.ui" line="152"/>
|
||||
<source>Dauerapparat</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
12
src/ui/dialogs/dialog_sources/confirm_extend.ts
Normal file
12
src/ui/dialogs/dialog_sources/confirm_extend.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1">
|
||||
<context>
|
||||
<name>extend_confirm</name>
|
||||
<message>
|
||||
<location filename="confirm_extend.ui" line="14"/>
|
||||
<source>Dialog</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
67
src/ui/dialogs/dialog_sources/deletedialog.ts
Normal file
67
src/ui/dialogs/dialog_sources/deletedialog.ts
Normal file
@@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1">
|
||||
<context>
|
||||
<name>Dialog</name>
|
||||
<message>
|
||||
<location filename="deletedialog.ui" line="14"/>
|
||||
<source>Dialog</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="deletedialog.ui" line="22"/>
|
||||
<source>Medium suchen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="deletedialog.ui" line="29"/>
|
||||
<source>Titel/Signatursuche</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="deletedialog.ui" line="50"/>
|
||||
<source>Apparat</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="deletedialog.ui" line="55"/>
|
||||
<source>Signatur</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="deletedialog.ui" line="60"/>
|
||||
<source>Titel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="deletedialog.ui" line="65"/>
|
||||
<source>Auflage</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="deletedialog.ui" line="70"/>
|
||||
<source>ISBN</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="deletedialog.ui" line="75"/>
|
||||
<source>ID</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="deletedialog.ui" line="101"/>
|
||||
<source>Zurücksetzen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="deletedialog.ui" line="121"/>
|
||||
<source>Löschen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="deletedialog.ui" line="128"/>
|
||||
<source>Abbrechen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
78
src/ui/dialogs/dialog_sources/documentprint.ts
Normal file
78
src/ui/dialogs/dialog_sources/documentprint.ts
Normal file
@@ -0,0 +1,78 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1">
|
||||
<context>
|
||||
<name>Dialog</name>
|
||||
<message>
|
||||
<location filename="documentprint.ui" line="14"/>
|
||||
<source>Dialog</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="documentprint.ui" line="37"/>
|
||||
<source>Semesterapparatsübersicht</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="documentprint.ui" line="48"/>
|
||||
<source>Mit dem Klick auf Okay wird eine Übersicht aller aktiven Semesterapparate erstellt und an den FollowME Drucker gesendet. Es kann bis zu 5 Minuten dauern, bis das Dokument im Drucker angezeigt wird.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="documentprint.ui" line="61"/>
|
||||
<location filename="documentprint.ui" line="102"/>
|
||||
<source>Dokument erstellen und drucken</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="documentprint.ui" line="77"/>
|
||||
<source>Semesterapparatsschilder</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="documentprint.ui" line="90"/>
|
||||
<source>Hier kann das Dokument für die Semesterapparatsschilder erstellt werden. Hierfür müssen die entsprechenden Apparate ausgewählt werden. Mithilfe dieser wird das Dokument erstellt.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="documentprint.ui" line="109"/>
|
||||
<source>Aktuelle Apparate laden</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="documentprint.ui" line="116"/>
|
||||
<source>Expertenmodus</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="documentprint.ui" line="162"/>
|
||||
<source><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><meta charset="utf-8" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
hr { height: 1px; border-width: 0; }
|
||||
li.unchecked::marker { content: "\2610"; }
|
||||
li.checked::marker { content: "\2612"; }
|
||||
</style></head><body style=" font-family:'Segoe UI'; font-size:9pt; font-weight:700; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">SELECT</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> prof.lname || ' (' || semesterapparat.name || ')' AS formatted_result</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">from</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> semesterapparat</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> INNER JOIN prof ON semesterapparat.prof_id = prof.id</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">WHERE</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> (erstellsemester = 'SoSe 25'</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> OR erstellsemester = 'WiSe 24/25')</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> and semesterapparat.deletion_status = 0</p></body></html></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="documentprint.ui" line="184"/>
|
||||
<source>Anfragen und anzeigen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="documentprint.ui" line="219"/>
|
||||
<source>Name</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
67
src/ui/dialogs/dialog_sources/edit_bookdata.ts
Normal file
67
src/ui/dialogs/dialog_sources/edit_bookdata.ts
Normal file
@@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1">
|
||||
<context>
|
||||
<name>Dialog</name>
|
||||
<message>
|
||||
<location filename="edit_bookdata.ui" line="14"/>
|
||||
<source>Dialog</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="edit_bookdata.ui" line="48"/>
|
||||
<source>Seiten</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="edit_bookdata.ui" line="55"/>
|
||||
<source>Titel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="edit_bookdata.ui" line="62"/>
|
||||
<source>Jahr</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="edit_bookdata.ui" line="69"/>
|
||||
<source>Sprache</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="edit_bookdata.ui" line="76"/>
|
||||
<source>Link</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="edit_bookdata.ui" line="86"/>
|
||||
<source>Auflage</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="edit_bookdata.ui" line="93"/>
|
||||
<source>Autor</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="edit_bookdata.ui" line="110"/>
|
||||
<source>Herausgeber</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="edit_bookdata.ui" line="117"/>
|
||||
<source>ISBN(s)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="edit_bookdata.ui" line="124"/>
|
||||
<source>PPN</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="edit_bookdata.ui" line="131"/>
|
||||
<source>Signatur</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
193
src/ui/dialogs/dialog_sources/elsa_add_table_entry.ts
Normal file
193
src/ui/dialogs/dialog_sources/elsa_add_table_entry.ts
Normal file
@@ -0,0 +1,193 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1">
|
||||
<context>
|
||||
<name>Dialog</name>
|
||||
<message>
|
||||
<location filename="elsa_add_table_entry.ui" line="14"/>
|
||||
<source>Dialog</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_add_table_entry.ui" line="20"/>
|
||||
<source>Medientyp?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_add_table_entry.ui" line="45"/>
|
||||
<source>Monografie</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_add_table_entry.ui" line="55"/>
|
||||
<source>Zeitschrift</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_add_table_entry.ui" line="62"/>
|
||||
<source>Herausgeberwerk</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_add_table_entry.ui" line="74"/>
|
||||
<source>Identifikator</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_add_table_entry.ui" line="84"/>
|
||||
<source>Suchen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_add_table_entry.ui" line="104"/>
|
||||
<source>Zuerst die Seitenzahl anpassen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_add_table_entry.ui" line="107"/>
|
||||
<source>Zitat erstellen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_add_table_entry.ui" line="123"/>
|
||||
<source>Autor(en)
|
||||
Nachname, Vorname</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_add_table_entry.ui" line="131"/>
|
||||
<location filename="elsa_add_table_entry.ui" line="239"/>
|
||||
<location filename="elsa_add_table_entry.ui" line="343"/>
|
||||
<location filename="elsa_add_table_entry.ui" line="471"/>
|
||||
<source>Bei mehreren Autoren mit ; trennen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_add_table_entry.ui" line="138"/>
|
||||
<location filename="elsa_add_table_entry.ui" line="256"/>
|
||||
<location filename="elsa_add_table_entry.ui" line="397"/>
|
||||
<source>Jahr</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_add_table_entry.ui" line="148"/>
|
||||
<location filename="elsa_add_table_entry.ui" line="291"/>
|
||||
<source>Auflage</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_add_table_entry.ui" line="158"/>
|
||||
<source>Titel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_add_table_entry.ui" line="168"/>
|
||||
<location filename="elsa_add_table_entry.ui" line="319"/>
|
||||
<location filename="elsa_add_table_entry.ui" line="444"/>
|
||||
<source>Ort</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_add_table_entry.ui" line="178"/>
|
||||
<location filename="elsa_add_table_entry.ui" line="246"/>
|
||||
<location filename="elsa_add_table_entry.ui" line="414"/>
|
||||
<source>Verlag</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_add_table_entry.ui" line="188"/>
|
||||
<location filename="elsa_add_table_entry.ui" line="277"/>
|
||||
<location filename="elsa_add_table_entry.ui" line="464"/>
|
||||
<source>Signatur</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_add_table_entry.ui" line="198"/>
|
||||
<location filename="elsa_add_table_entry.ui" line="270"/>
|
||||
<location filename="elsa_add_table_entry.ui" line="407"/>
|
||||
<source>Seiten</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_add_table_entry.ui" line="205"/>
|
||||
<source>Seitenanzahl des Mediums, zum zitieren ändern!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_add_table_entry.ui" line="225"/>
|
||||
<location filename="elsa_add_table_entry.ui" line="312"/>
|
||||
<source>ISBN</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_add_table_entry.ui" line="263"/>
|
||||
<source>Beitragstitel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_add_table_entry.ui" line="284"/>
|
||||
<source>Titel des Werkes</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_add_table_entry.ui" line="301"/>
|
||||
<location filename="elsa_add_table_entry.ui" line="376"/>
|
||||
<source>Autor(en)
|
||||
Nachname, Vorname</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_add_table_entry.ui" line="329"/>
|
||||
<source>Herausgebername(n)
|
||||
Nachname, Vorname</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_add_table_entry.ui" line="390"/>
|
||||
<source>Name der Zeitschrift</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_add_table_entry.ui" line="430"/>
|
||||
<source>Heft</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_add_table_entry.ui" line="437"/>
|
||||
<source>ISSN</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_add_table_entry.ui" line="457"/>
|
||||
<source>Artikeltitel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_add_table_entry.ui" line="501"/>
|
||||
<source>Dateiname</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_add_table_entry.ui" line="531"/>
|
||||
<source>ILIAS Name</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_add_table_entry.ui" line="548"/>
|
||||
<source>ILIAS Dateibeschreibung</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_add_table_entry.ui" line="586"/>
|
||||
<location filename="elsa_add_table_entry.ui" line="630"/>
|
||||
<location filename="elsa_add_table_entry.ui" line="674"/>
|
||||
<source>Kopieren</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_add_table_entry.ui" line="716"/>
|
||||
<source>Wiederholen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
37
src/ui/dialogs/dialog_sources/elsa_generate_citation.ts
Normal file
37
src/ui/dialogs/dialog_sources/elsa_generate_citation.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1">
|
||||
<context>
|
||||
<name>Dialog</name>
|
||||
<message>
|
||||
<location filename="elsa_generate_citation.ui" line="14"/>
|
||||
<source>Dialog</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_generate_citation.ui" line="29"/>
|
||||
<source>Monografie</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_generate_citation.ui" line="36"/>
|
||||
<source>Zeitschriftenaufsatz</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_generate_citation.ui" line="43"/>
|
||||
<source>Herausgeberwerk</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_generate_citation.ui" line="71"/>
|
||||
<source>Daten</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_generate_citation.ui" line="92"/>
|
||||
<source>Bestätigen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
47
src/ui/dialogs/dialog_sources/elsa_generator_confirm.ts
Normal file
47
src/ui/dialogs/dialog_sources/elsa_generator_confirm.ts
Normal file
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1">
|
||||
<context>
|
||||
<name>Dialog</name>
|
||||
<message>
|
||||
<location filename="elsa_generator_confirm.ui" line="26"/>
|
||||
<source>Dialog</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_generator_confirm.ui" line="37"/>
|
||||
<source>Angaben korrekt?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_generator_confirm.ui" line="48"/>
|
||||
<source>Kapiteltitel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_generator_confirm.ui" line="78"/>
|
||||
<source>Herausgebername</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_generator_confirm.ui" line="99"/>
|
||||
<source>Autor(en)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_generator_confirm.ui" line="111"/>
|
||||
<source>Buchtitel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_generator_confirm.ui" line="123"/>
|
||||
<source>Seite(n)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_generator_confirm.ui" line="153"/>
|
||||
<source>Hier können fehlerhafte / fehlende Daten geändert werden</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
28
src/ui/dialogs/dialog_sources/login.ts
Normal file
28
src/ui/dialogs/dialog_sources/login.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1">
|
||||
<context>
|
||||
<name>Dialog</name>
|
||||
<message>
|
||||
<location filename="login.ui" line="14"/>
|
||||
<location filename="login.ui" line="82"/>
|
||||
<source>Login</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="login.ui" line="30"/>
|
||||
<source>Username</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="login.ui" line="53"/>
|
||||
<source>Password</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="login.ui" line="95"/>
|
||||
<source>Cancel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
67
src/ui/dialogs/dialog_sources/mail_preview.ts
Normal file
67
src/ui/dialogs/dialog_sources/mail_preview.ts
Normal file
@@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1">
|
||||
<context>
|
||||
<name>eMailPreview</name>
|
||||
<message>
|
||||
<location filename="mail_preview.ui" line="14"/>
|
||||
<source>eMail Voransicht</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mail_preview.ui" line="56"/>
|
||||
<source>Anrede</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mail_preview.ui" line="66"/>
|
||||
<source>Prof</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mail_preview.ui" line="76"/>
|
||||
<source>Art</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mail_preview.ui" line="83"/>
|
||||
<source>Betreff</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mail_preview.ui" line="92"/>
|
||||
<source>M</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mail_preview.ui" line="99"/>
|
||||
<source>W</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mail_preview.ui" line="106"/>
|
||||
<source>Divers</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mail_preview.ui" line="128"/>
|
||||
<source>Mail</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mail_preview.ui" line="138"/>
|
||||
<source>eMail</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mail_preview.ui" line="163"/>
|
||||
<source>test</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mail_preview.ui" line="166"/>
|
||||
<source>Senden</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
204
src/ui/dialogs/dialog_sources/medianadder.ts
Normal file
204
src/ui/dialogs/dialog_sources/medianadder.ts
Normal file
@@ -0,0 +1,204 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1">
|
||||
<context>
|
||||
<name>Dialog</name>
|
||||
<message>
|
||||
<location filename="medianadder.ui" line="14"/>
|
||||
<source>Medien</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="medianadder.ui" line="30"/>
|
||||
<location filename="medianadder.ui" line="160"/>
|
||||
<source>Signatur</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="medianadder.ui" line="43"/>
|
||||
<source>Modus</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="medianadder.ui" line="57"/>
|
||||
<source>ARRAY</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="medianadder.ui" line="62"/>
|
||||
<location filename="medianadder.ui" line="215"/>
|
||||
<source>BibTeX</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="medianadder.ui" line="67"/>
|
||||
<location filename="medianadder.ui" line="220"/>
|
||||
<source>COinS</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="medianadder.ui" line="72"/>
|
||||
<location filename="medianadder.ui" line="225"/>
|
||||
<source>RIS</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="medianadder.ui" line="86"/>
|
||||
<source>Signatur / ISBN</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="medianadder.ui" line="99"/>
|
||||
<source>Queue</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="medianadder.ui" line="155"/>
|
||||
<source>PPN</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="medianadder.ui" line="165"/>
|
||||
<source>Autor</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="medianadder.ui" line="170"/>
|
||||
<source>ISBN</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="medianadder.ui" line="175"/>
|
||||
<source>Jahr</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="medianadder.ui" line="180"/>
|
||||
<source>Auflage</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="medianadder.ui" line="185"/>
|
||||
<source>Sprache</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="medianadder.ui" line="190"/>
|
||||
<source>Herausgeber</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="medianadder.ui" line="195"/>
|
||||
<source>Seiten</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="medianadder.ui" line="200"/>
|
||||
<source>Titel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="medianadder.ui" line="205"/>
|
||||
<source>Link</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="medianadder.ui" line="210"/>
|
||||
<source>Array</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="medianadder.ui" line="230"/>
|
||||
<location filename="medianadder.ui" line="240"/>
|
||||
<location filename="medianadder.ui" line="245"/>
|
||||
<location filename="medianadder.ui" line="250"/>
|
||||
<location filename="medianadder.ui" line="255"/>
|
||||
<location filename="medianadder.ui" line="265"/>
|
||||
<location filename="medianadder.ui" line="270"/>
|
||||
<location filename="medianadder.ui" line="275"/>
|
||||
<location filename="medianadder.ui" line="280"/>
|
||||
<location filename="medianadder.ui" line="285"/>
|
||||
<location filename="medianadder.ui" line="290"/>
|
||||
<location filename="medianadder.ui" line="295"/>
|
||||
<location filename="medianadder.ui" line="300"/>
|
||||
<location filename="medianadder.ui" line="305"/>
|
||||
<location filename="medianadder.ui" line="310"/>
|
||||
<location filename="medianadder.ui" line="315"/>
|
||||
<location filename="medianadder.ui" line="320"/>
|
||||
<location filename="medianadder.ui" line="325"/>
|
||||
<location filename="medianadder.ui" line="330"/>
|
||||
<location filename="medianadder.ui" line="335"/>
|
||||
<location filename="medianadder.ui" line="340"/>
|
||||
<location filename="medianadder.ui" line="345"/>
|
||||
<location filename="medianadder.ui" line="350"/>
|
||||
<location filename="medianadder.ui" line="355"/>
|
||||
<location filename="medianadder.ui" line="365"/>
|
||||
<location filename="medianadder.ui" line="370"/>
|
||||
<location filename="medianadder.ui" line="375"/>
|
||||
<location filename="medianadder.ui" line="380"/>
|
||||
<location filename="medianadder.ui" line="385"/>
|
||||
<location filename="medianadder.ui" line="390"/>
|
||||
<location filename="medianadder.ui" line="395"/>
|
||||
<location filename="medianadder.ui" line="400"/>
|
||||
<location filename="medianadder.ui" line="405"/>
|
||||
<location filename="medianadder.ui" line="410"/>
|
||||
<location filename="medianadder.ui" line="415"/>
|
||||
<location filename="medianadder.ui" line="420"/>
|
||||
<location filename="medianadder.ui" line="425"/>
|
||||
<location filename="medianadder.ui" line="430"/>
|
||||
<location filename="medianadder.ui" line="440"/>
|
||||
<location filename="medianadder.ui" line="445"/>
|
||||
<source>1</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="medianadder.ui" line="235"/>
|
||||
<location filename="medianadder.ui" line="260"/>
|
||||
<location filename="medianadder.ui" line="360"/>
|
||||
<location filename="medianadder.ui" line="435"/>
|
||||
<location filename="medianadder.ui" line="501"/>
|
||||
<source>0</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="medianadder.ui" line="475"/>
|
||||
<source>Belegbare Felder per Anbieter</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="medianadder.ui" line="488"/>
|
||||
<source>Anzahl:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="medianadder.ui" line="520"/>
|
||||
<source>Ok</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="medianadder.ui" line="530"/>
|
||||
<source>Abbrechen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="medianadder.ui" line="546"/>
|
||||
<source>Verwendet ein zufälliges Buch des Datensatzes, nützlich wenn das Buch noch nicht im Apparat ist</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="medianadder.ui" line="549"/>
|
||||
<source>Jedes Buch verwenden</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="medianadder.ui" line="562"/>
|
||||
<source>Verwendet die eingegebene Signatur für die Suche von Daten</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="medianadder.ui" line="565"/>
|
||||
<source>Exakte Signatur</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
67
src/ui/dialogs/dialog_sources/newMailTemplateDesigner.ts
Normal file
67
src/ui/dialogs/dialog_sources/newMailTemplateDesigner.ts
Normal file
@@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1">
|
||||
<context>
|
||||
<name>Dialog</name>
|
||||
<message>
|
||||
<location filename="newMailTemplateDesigner.ui" line="14"/>
|
||||
<source>Dialog</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="newMailTemplateDesigner.ui" line="24"/>
|
||||
<source>Platzhalter</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="newMailTemplateDesigner.ui" line="38"/>
|
||||
<source>«Anrede»</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="newMailTemplateDesigner.ui" line="43"/>
|
||||
<source>«ApparatsName»</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="newMailTemplateDesigner.ui" line="48"/>
|
||||
<source>«ApparatsFach»</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="newMailTemplateDesigner.ui" line="53"/>
|
||||
<source>«ApparatsNummer»</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="newMailTemplateDesigner.ui" line="58"/>
|
||||
<source>«DozentName»</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="newMailTemplateDesigner.ui" line="63"/>
|
||||
<source>«Signatur»</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="newMailTemplateDesigner.ui" line="71"/>
|
||||
<source>Beschreibung</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="newMailTemplateDesigner.ui" line="97"/>
|
||||
<source>An aktiver Position einfügen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="newMailTemplateDesigner.ui" line="106"/>
|
||||
<source>Betreff</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="newMailTemplateDesigner.ui" line="121"/>
|
||||
<source>Template testen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
53
src/ui/dialogs/dialog_sources/order_neweditions.ts
Normal file
53
src/ui/dialogs/dialog_sources/order_neweditions.ts
Normal file
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1">
|
||||
<context>
|
||||
<name>Dialog</name>
|
||||
<message>
|
||||
<location filename="order_neweditions.ui" line="14"/>
|
||||
<source>Dialog</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="order_neweditions.ui" line="21"/>
|
||||
<location filename="order_neweditions.ui" line="79"/>
|
||||
<source>Bestellen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="order_neweditions.ui" line="26"/>
|
||||
<source>Signatur</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="order_neweditions.ui" line="31"/>
|
||||
<source>Titel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="order_neweditions.ui" line="36"/>
|
||||
<source>ISBN</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="order_neweditions.ui" line="41"/>
|
||||
<source>Autor</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="order_neweditions.ui" line="46"/>
|
||||
<source>Auflage</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="order_neweditions.ui" line="51"/>
|
||||
<source>Standort</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="order_neweditions.ui" line="56"/>
|
||||
<source>Link</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
32
src/ui/dialogs/dialog_sources/parsed_titles.ts
Normal file
32
src/ui/dialogs/dialog_sources/parsed_titles.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1">
|
||||
<context>
|
||||
<name>Form</name>
|
||||
<message>
|
||||
<location filename="parsed_titles.ui" line="14"/>
|
||||
<source>Form</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="parsed_titles.ui" line="44"/>
|
||||
<source>Es wurden</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="parsed_titles.ui" line="57"/>
|
||||
<source>0</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="parsed_titles.ui" line="67"/>
|
||||
<source>Signaturen gefunden.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="parsed_titles.ui" line="157"/>
|
||||
<source>...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
22
src/ui/dialogs/dialog_sources/reminder.ts
Normal file
22
src/ui/dialogs/dialog_sources/reminder.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1">
|
||||
<context>
|
||||
<name>Erinnerung</name>
|
||||
<message>
|
||||
<location filename="reminder.ui" line="14"/>
|
||||
<source>Dialog</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="reminder.ui" line="52"/>
|
||||
<source>Nachricht:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="reminder.ui" line="65"/>
|
||||
<source>Erinnerung am:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
239
src/ui/dialogs/dialog_sources/settings.ts
Normal file
239
src/ui/dialogs/dialog_sources/settings.ts
Normal file
@@ -0,0 +1,239 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1">
|
||||
<context>
|
||||
<name>Dialog</name>
|
||||
<message>
|
||||
<location filename="settings.ui" line="23"/>
|
||||
<source>Dialog</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.ui" line="56"/>
|
||||
<source>Datenbank</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.ui" line="62"/>
|
||||
<source>sap.db</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.ui" line="69"/>
|
||||
<source><html><head/><body><p>Name der Datenbank, welche verwendet werden soll. <span style=" font-weight:600;">Muss</span> auf .db enden</p></body></html></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.ui" line="72"/>
|
||||
<source>Datenbankname</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.ui" line="89"/>
|
||||
<source>Pfad, an dem heruntergeladene Dateien gespeichert werden sollen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.ui" line="92"/>
|
||||
<source>Temporäre Dateien</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.ui" line="102"/>
|
||||
<source>Datenbankpfad</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.ui" line="112"/>
|
||||
<location filename="settings.ui" line="119"/>
|
||||
<source>...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.ui" line="151"/>
|
||||
<source>Zotero</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.ui" line="163"/>
|
||||
<source>Bibliothekstyp</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.ui" line="170"/>
|
||||
<source>Bibliotheks-ID</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.ui" line="184"/>
|
||||
<source>API Key</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.ui" line="220"/>
|
||||
<source>e-Mail</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.ui" line="230"/>
|
||||
<source>Allgemeines</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.ui" line="238"/>
|
||||
<source>Anklicken, wenn Nutzername benötigt wird, um sich beim Server anzumelden</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.ui" line="241"/>
|
||||
<source>Nutzername zum
|
||||
Anmelden verwenden</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.ui" line="252"/>
|
||||
<source>Port</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.ui" line="269"/>
|
||||
<source>Sender-eMail</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.ui" line="286"/>
|
||||
<source>Kürzel, von der Hochschule vergeben, bsp: Aky547</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.ui" line="320"/>
|
||||
<source>SMTP-Server</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.ui" line="327"/>
|
||||
<source>Passwort</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.ui" line="344"/>
|
||||
<source>Nutzername</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.ui" line="351"/>
|
||||
<source>Printmail</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.ui" line="364"/>
|
||||
<source>Signatur</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.ui" line="387"/>
|
||||
<source>Fett</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.ui" line="397"/>
|
||||
<source>Kursiv</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.ui" line="407"/>
|
||||
<source>Unterstrichen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.ui" line="438"/>
|
||||
<source>8</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.ui" line="443"/>
|
||||
<source>9</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.ui" line="448"/>
|
||||
<source>11</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.ui" line="453"/>
|
||||
<source>12</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.ui" line="458"/>
|
||||
<source>14</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.ui" line="463"/>
|
||||
<source>16</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.ui" line="468"/>
|
||||
<source>18</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.ui" line="473"/>
|
||||
<source>20</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.ui" line="478"/>
|
||||
<source>22</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.ui" line="483"/>
|
||||
<source>24</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.ui" line="488"/>
|
||||
<source>26</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.ui" line="493"/>
|
||||
<source>28</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.ui" line="498"/>
|
||||
<source>36</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.ui" line="503"/>
|
||||
<source>48</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.ui" line="508"/>
|
||||
<source>72</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.ui" line="536"/>
|
||||
<source>Debug</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.ui" line="556"/>
|
||||
<source>Icons</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="settings.ui" line="568"/>
|
||||
<source>Farben</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
@@ -1,5 +1,6 @@
|
||||
from PySide6 import QtWidgets
|
||||
|
||||
from src.core.models import BookData
|
||||
from src.services.webrequest import BibTextTransformer, WebRequest
|
||||
from src.services.zotero import ZoteroController
|
||||
from src.shared.logging import log
|
||||
@@ -186,10 +187,10 @@ class ElsaAddEntry(QtWidgets.QDialog, Ui_Dialog):
|
||||
# data = data[0]
|
||||
bib = BibTextTransformer()
|
||||
bib.get_data(data)
|
||||
data = bib.return_data()
|
||||
data:BookData = bib.return_data()
|
||||
self.setdata(data, pages)
|
||||
|
||||
def setdata(self, data, pages=None):
|
||||
def setdata(self, data: BookData, pages=None):
|
||||
# use field to set data in the correct fields
|
||||
fields = self.findChildren(QtWidgets.QLineEdit)
|
||||
self.source_pages = data.pages
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import hashlib
|
||||
import sys
|
||||
|
||||
import loguru
|
||||
from src.shared.logging import log
|
||||
from PySide6 import QtCore, QtWidgets
|
||||
|
||||
from src import LOG_DIR
|
||||
@@ -10,11 +10,7 @@ from src.utils.icon import Icon
|
||||
|
||||
from .dialog_sources.login_ui import Ui_Dialog
|
||||
|
||||
log = loguru.logger
|
||||
log.remove()
|
||||
log.add(sys.stdout, level="INFO")
|
||||
log.add(f"{LOG_DIR}/application.log", rotation="1 MB", retention="10 days")
|
||||
|
||||
# use centralized logging from src.shared.logging
|
||||
|
||||
class LoginDialog(Ui_Dialog):
|
||||
def setupUi(self, Dialog):
|
||||
|
||||
@@ -1,20 +1,15 @@
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
from loguru import logger as log
|
||||
from src.shared.logging import log, get_bloat_logger, preview
|
||||
from PySide6 import QtCore, QtWidgets
|
||||
|
||||
from src.utils.icon import Icon
|
||||
|
||||
from .dialog_sources import NewMailTemplateDesignerDialog
|
||||
|
||||
logger = log
|
||||
logger.remove()
|
||||
logger.add("logs/application.log", rotation="1 week", retention="1 month", enqueue=True)
|
||||
log.add("logs/mail.log", enqueue=True)
|
||||
logger.add(sys.stdout)
|
||||
|
||||
|
||||
class MailTemplateDialog(QtWidgets.QDialog, NewMailTemplateDesignerDialog):
|
||||
updateSignal = QtCore.Signal()
|
||||
@@ -94,7 +89,9 @@ class MailTemplateDialog(QtWidgets.QDialog, NewMailTemplateDesignerDialog):
|
||||
eml = mail_headers + "\n\n" + mail_body
|
||||
eml = re.sub(r" +", " ", eml) # remove multiple spaces
|
||||
eml = re.sub(r"\n +", "\n", eml)
|
||||
print(eml)
|
||||
# route raw eml content to bloat log with truncated preview
|
||||
bloat = get_bloat_logger()
|
||||
bloat.debug("EML template saved (preview): {}", preview(eml, 2000))
|
||||
|
||||
with open(
|
||||
f"mail_vorlagen/{template}",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import sys
|
||||
|
||||
import loguru
|
||||
from src.shared.logging import log
|
||||
from PySide6 import QtWidgets
|
||||
|
||||
from src import LOG_DIR
|
||||
@@ -8,10 +8,7 @@ from src.background import AutoAdder
|
||||
|
||||
from .dialog_sources.parsed_titles_ui import Ui_Form
|
||||
|
||||
log = loguru.logger
|
||||
log.remove()
|
||||
log.add(sys.stdout, level="INFO")
|
||||
log.add(f"{LOG_DIR}/application.log", rotation="1 MB", retention="10 days")
|
||||
# use centralized logging from src.shared.logging
|
||||
|
||||
|
||||
class ParsedTitles(QtWidgets.QWidget, Ui_Form):
|
||||
|
||||
32
src/ui/dialogs/parsed_titles.ts
Normal file
32
src/ui/dialogs/parsed_titles.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1">
|
||||
<context>
|
||||
<name>Form</name>
|
||||
<message>
|
||||
<location filename="parsed_titles.ui" line="14"/>
|
||||
<source>Form</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="parsed_titles.ui" line="44"/>
|
||||
<source>Es wurden</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="parsed_titles.ui" line="57"/>
|
||||
<source>0</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="parsed_titles.ui" line="67"/>
|
||||
<source>Signaturen gefunden.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="parsed_titles.ui" line="157"/>
|
||||
<source>...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
@@ -1,6 +1,6 @@
|
||||
import sys
|
||||
|
||||
import loguru
|
||||
from src.shared.logging import log, get_bloat_logger, preview
|
||||
from PySide6 import QtCore, QtGui, QtWidgets
|
||||
|
||||
from src import LOG_DIR, settings
|
||||
@@ -9,10 +9,7 @@ from src.utils.icon import Icon
|
||||
|
||||
from .dialog_sources.settings_ui import Ui_Dialog as _settings
|
||||
|
||||
log = loguru.logger
|
||||
log.remove()
|
||||
log.add(sys.stdout, level="INFO")
|
||||
log.add(f"{LOG_DIR}/application.log", rotation="1 MB", retention="10 days")
|
||||
# use centralized logging from src.shared.logging
|
||||
|
||||
|
||||
base = """'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
@@ -190,7 +187,8 @@ class Settings(QtWidgets.QDialog, _settings):
|
||||
self.save_path.setText(file_dialog.selectedFiles()[0])
|
||||
|
||||
def debug_mode(self):
|
||||
log.debug(self.editSignature.toHtml())
|
||||
bloat = get_bloat_logger()
|
||||
bloat.debug("Signature HTML (preview): {}", preview(self.editSignature.toHtml(), 2000))
|
||||
|
||||
def return_data(self):
|
||||
port = self.smtp_port.text()
|
||||
|
||||
491
src/ui/semesterapparat_ui.ts
Normal file
491
src/ui/semesterapparat_ui.ts
Normal file
@@ -0,0 +1,491 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="_DE">
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="41"/>
|
||||
<source>Semesterapparatsmanagement</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="93"/>
|
||||
<source>Anlegen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="128"/>
|
||||
<source>Erstellt die Übersicht, welche am Regal ausgehängt werden kann</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="131"/>
|
||||
<source>Übersicht erstellen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="141"/>
|
||||
<source>neu. App anlegen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="154"/>
|
||||
<source>Auswahl abbrechen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="198"/>
|
||||
<source>AppNr</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="203"/>
|
||||
<source>App Name</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="208"/>
|
||||
<source>Professor</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="213"/>
|
||||
<source>gültig bis</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="218"/>
|
||||
<location filename="semesterapparat_ui.ui" line="655"/>
|
||||
<source>Dauerapparat</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="223"/>
|
||||
<source>KontoNr</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="266"/>
|
||||
<source>Medien hinzufügen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="294"/>
|
||||
<source> Medienliste</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="325"/>
|
||||
<source>SemesterApparatsdetails</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="378"/>
|
||||
<source>Dokumentname</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="389"/>
|
||||
<source>Dateityp</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="400"/>
|
||||
<source>Neu?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="411"/>
|
||||
<source>path</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="431"/>
|
||||
<location filename="semesterapparat_ui.ui" line="450"/>
|
||||
<location filename="semesterapparat_ui.ui" line="491"/>
|
||||
<location filename="semesterapparat_ui.ui" line="611"/>
|
||||
<location filename="semesterapparat_ui.ui" line="733"/>
|
||||
<location filename="semesterapparat_ui.ui" line="1029"/>
|
||||
<source>*</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="510"/>
|
||||
<source>Aktualisieren</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="529"/>
|
||||
<source>Tel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="677"/>
|
||||
<source>Sommer</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="699"/>
|
||||
<source>Nachname, Vorname</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="752"/>
|
||||
<source>sdvosdvsdv</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="755"/>
|
||||
<source>Prof. Titel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="777"/>
|
||||
<source>Apparatsnummer</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="799"/>
|
||||
<source>Mail</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="821"/>
|
||||
<source>Fach</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="871"/>
|
||||
<source>Prof-ID-aDIS</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="887"/>
|
||||
<source>Apparat-ID-aDIS</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="947"/>
|
||||
<source>2023</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="966"/>
|
||||
<source>Mail senden</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="988"/>
|
||||
<source>Winter</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1007"/>
|
||||
<source>Prof. Name</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1051"/>
|
||||
<source>Speichern</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1070"/>
|
||||
<source>Apparatsname</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1133"/>
|
||||
<source>Semester</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1152"/>
|
||||
<source>Format: Nachname, Vorname</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1215"/>
|
||||
<source>mail@irgendwas.wasanderes</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1262"/>
|
||||
<source>Speichern und anlegen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1290"/>
|
||||
<source>Dokument hinzufügen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1309"/>
|
||||
<source>Dokument öffnen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1328"/>
|
||||
<source>Abhängig von der Anzahl der Medien kann die Suche sehr lange dauern</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1331"/>
|
||||
<source>Medien aus Dokument
|
||||
hinzufügen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1351"/>
|
||||
<source>Die Apparatsdetails werden aus dem Dokument gelesen und eingetragen
|
||||
Die gewünschten Medien werden automatisch in die Medienliste eingetragen, evtl. unvollständig, da eBooks nicht erfasst werden könnenEinige Angaben müssen ggf angepasst werden</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1355"/>
|
||||
<source>Daten aus Dokument
|
||||
übernehmen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1388"/>
|
||||
<source>WIP - Broken</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1391"/>
|
||||
<source>Nur Titel mit Neuauflagen anzeigen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1414"/>
|
||||
<source>Dieser Knopf prüft alle Werke, die mit einem roten X vermerkt sind. Sollten diese inzwischen im Apparat sein, wird dies aktualisiert</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1417"/>
|
||||
<source>Medien mit ❌ im Apparat?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1426"/>
|
||||
<source>Medien werden hinzugefügt</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1440"/>
|
||||
<source>Medium x/y</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1467"/>
|
||||
<source>Medien werden geprüft</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1497"/>
|
||||
<source>TextLabel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1504"/>
|
||||
<source>Ausgewählte als verfügbar markieren</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1563"/>
|
||||
<source>Buchtitel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1566"/>
|
||||
<source>Es kann sein, dass der Buchtitel leer ist, dies kommt vor, wenn der Titel nicht passend formatiert ist</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1571"/>
|
||||
<source>Signatur</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1576"/>
|
||||
<source>Auflage</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1581"/>
|
||||
<source>Autor</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1586"/>
|
||||
<source>im Apparat?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1589"/>
|
||||
<source>Diese Angabe ist nicht zuverlässig. Ist das ❌ vorhanden, kann das Medium im Apparat sein, aber aufgrund eines Bugs nicht gefunden worden</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1594"/>
|
||||
<source>Vorgemerkt</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1599"/>
|
||||
<source>Link</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1609"/>
|
||||
<source>Suchen / Statistik</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1614"/>
|
||||
<source>ELSA</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1619"/>
|
||||
<source>Admin</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1640"/>
|
||||
<source>Aktion:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1648"/>
|
||||
<source>Nutzer anlegen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1653"/>
|
||||
<source>Nutzer bearbeiten</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1658"/>
|
||||
<source>Lehrperson bearbeiten</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1663"/>
|
||||
<source>Medien bearbeiten</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1676"/>
|
||||
<source>GroupBox</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1758"/>
|
||||
<source>Software</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1773"/>
|
||||
<source>Apparatsdaten eingegeben</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1789"/>
|
||||
<source>Medien hinzugefügt / importiert</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1805"/>
|
||||
<source>Prof-ID und Apparat-ID eingetragen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1827"/>
|
||||
<source>aDIS</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1846"/>
|
||||
<source>Medien geprüft</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1866"/>
|
||||
<source>Medien bearbeitet</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1886"/>
|
||||
<source>Apparat angelegt</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1903"/>
|
||||
<source>Hier klicken, um die aDIS Abfrage in die Zwischenablage zu kopieren</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1918"/>
|
||||
<source> aDIS Abfrage in Zwischenablage kopieren</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1958"/>
|
||||
<source>Datei</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1964"/>
|
||||
<source>Bearbeiten</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1971"/>
|
||||
<source>Help</source>
|
||||
<translation>Hilfe</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1983"/>
|
||||
<source>Beenden</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1986"/>
|
||||
<source>Ctrl+Q</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="1997"/>
|
||||
<source>Einstellungen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="2000"/>
|
||||
<source>Alt+S</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="2008"/>
|
||||
<source>About</source>
|
||||
<translation>Über</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="2016"/>
|
||||
<source>Dokumentation</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="2019"/>
|
||||
<source>F1</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="semesterapparat_ui.ui" line="2024"/>
|
||||
<source>Medien löschen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
@@ -36,7 +36,10 @@ from src.parsers import (
|
||||
pdf_to_semap,
|
||||
word_to_semap,
|
||||
)
|
||||
from src.shared.logging import log
|
||||
from src.shared.logging import log, get_bloat_logger, preview
|
||||
|
||||
# bloat logger for large/raw previews
|
||||
bloat = get_bloat_logger()
|
||||
from src.ui import Ui_Semesterapparat
|
||||
from src.ui.dialogs import (
|
||||
About,
|
||||
@@ -652,13 +655,16 @@ class Ui(QtWidgets.QMainWindow, Ui_Semesterapparat):
|
||||
return valid
|
||||
|
||||
def display_valid_semester(self):
|
||||
print(f"""
|
||||
Semester: {self.sem_year.text()}
|
||||
Sommer: {self.sem_sommer.isChecked()}
|
||||
Winter: {self.sem_winter.isChecked()}
|
||||
Eternal: {self.check_eternal_app.isChecked()}
|
||||
Valid: {self.validate_semester()}
|
||||
""")
|
||||
# debug: show semester validation state (disabled in production)
|
||||
# log.debug(
|
||||
# "Semester: {}\nSommer: {}\nWinter: {}\nEternal: {}\nValid: {}",
|
||||
# self.sem_year.text(),
|
||||
# self.sem_sommer.isChecked(),
|
||||
# self.sem_winter.isChecked(),
|
||||
# self.check_eternal_app.isChecked(),
|
||||
# self.validate_semester(),
|
||||
# )
|
||||
pass
|
||||
|
||||
def change_state(self, index, state):
|
||||
global valid_input
|
||||
@@ -1332,7 +1338,7 @@ class Ui(QtWidgets.QMainWindow, Ui_Semesterapparat):
|
||||
"Bitte warten, bis alle Medien hinzugefügt wurden",
|
||||
)
|
||||
app_id = self.active_apparat
|
||||
log.debug(self.profdata)
|
||||
bloat.debug("Profdata (preview): {}", preview(self.profdata, 500))
|
||||
prof_id = self.db.getProfId(self.profdata)
|
||||
|
||||
log.debug("Prof id: {}", prof_id)
|
||||
@@ -2154,8 +2160,8 @@ WHERE m.id = ?""",
|
||||
self.mail_thread.show()
|
||||
|
||||
def contact_prof(self, apparat="", location="", mail="", pid=""):
|
||||
log.debug(apparat)
|
||||
log.debug(location)
|
||||
bloat.debug("Contact apparat (preview): {}", preview(apparat, 400))
|
||||
bloat.debug("Contact location: {}", preview(location, 300))
|
||||
if self.active_apparat == "":
|
||||
if apparat is False:
|
||||
self.confirm_popup(
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import sys
|
||||
|
||||
import loguru
|
||||
from src.shared.logging import log, get_bloat_logger, preview
|
||||
|
||||
# bloat logger for large object previews
|
||||
bloat = get_bloat_logger()
|
||||
from PySide6 import QtWidgets
|
||||
|
||||
from src import LOG_DIR
|
||||
@@ -9,10 +12,7 @@ from src.core.models import Prof
|
||||
|
||||
from .widget_sources.admin_edit_prof_ui import Ui_Dialog #
|
||||
|
||||
log = loguru.logger
|
||||
log.remove()
|
||||
log.add(sys.stdout, level="INFO")
|
||||
log.add(f"{LOG_DIR}/application.log", rotation="1 MB", retention="10 days")
|
||||
# use centralized logging from src.shared.logging
|
||||
|
||||
|
||||
class EditProf(QtWidgets.QDialog, Ui_Dialog):
|
||||
@@ -70,7 +70,7 @@ class EditProf(QtWidgets.QDialog, Ui_Dialog):
|
||||
else:
|
||||
self.faculty_member_old_telnr.setText(data.telnr)
|
||||
self.faculty_member_oldmail.setText(data.mail)
|
||||
log.debug(data)
|
||||
bloat.debug("Prof data (preview): {}", preview(data, 500))
|
||||
(
|
||||
self.edit_faculty_member_title.setText(data.title)
|
||||
if data.title is not None
|
||||
@@ -94,7 +94,7 @@ class EditProf(QtWidgets.QDialog, Ui_Dialog):
|
||||
olddata = self.db.getProfByName(
|
||||
self.edit_faculty_member_select_member.currentText()
|
||||
)
|
||||
log.debug(olddata)
|
||||
bloat.debug("Old prof data (preview): {}", preview(olddata, 500))
|
||||
data = olddata
|
||||
oldlname = data.lastname
|
||||
oldfname = data.firstname
|
||||
|
||||
@@ -7,7 +7,10 @@ from PySide6.QtGui import QRegularExpressionValidator
|
||||
from src.core.models import Prof, Semester
|
||||
from src.database import Database
|
||||
from src.parsers import elsa_word_to_csv
|
||||
from src.shared.logging import log
|
||||
from src.shared.logging import log, get_bloat_logger, preview
|
||||
|
||||
# bloat logger for large/raw payloads
|
||||
bloat = get_bloat_logger()
|
||||
from src.ui.dialogs import ElsaAddEntry, popus_confirm
|
||||
from src.ui.widgets.filepicker import FilePicker
|
||||
from src.ui.widgets.graph import DataQtGraph
|
||||
@@ -231,7 +234,7 @@ class ElsaDialog(QtWidgets.QDialog, Ui_Dialog):
|
||||
fullname=f"{prof.split(', ')[0]} {prof.split(', ')[1]}",
|
||||
)
|
||||
prof_id = self.db.getProfId(profdata)
|
||||
log.debug(f"ProfData: {profdata}, id:{prof_id}")
|
||||
bloat.debug("ProfData (preview): {} id: {}", preview(profdata, 500), preview(prof_id, 50))
|
||||
|
||||
if prof_id is None:
|
||||
self.db.createProf(profdata)
|
||||
@@ -498,7 +501,7 @@ class ElsaDialog(QtWidgets.QDialog, Ui_Dialog):
|
||||
y_label="Anzahl der Apparate",
|
||||
x_rotation=0,
|
||||
)
|
||||
log.debug(self.graph_data)
|
||||
bloat.debug("Graph data (preview): {}", preview(self.graph_data, 1000))
|
||||
self.elsa_statistics_table.setRowCount(0)
|
||||
for i in range(len(self.graph_data["x"])):
|
||||
self.elsa_statistics_table.insertRow(0)
|
||||
|
||||
@@ -101,7 +101,8 @@ class DataQtGraph(QtWidgets.QWidget):
|
||||
|
||||
self.chart.createDefaultAxes()
|
||||
for entry in lst:
|
||||
print("entry:", entry)
|
||||
# debug: entry contents
|
||||
# print("entry:", entry)
|
||||
entryseries = QLineSeries()
|
||||
for x_val, y_val in zip(entry["x"], entry["y"]):
|
||||
#
|
||||
|
||||
@@ -2,14 +2,17 @@ from .widget_sources.icon_widget_ui import Ui_Dialog
|
||||
from PySide6 import QtWidgets
|
||||
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from loguru import logger as log
|
||||
|
||||
logger = log
|
||||
logger.remove()
|
||||
if Path("logs").exists():
|
||||
logger.add("logs/application.log", rotation="1 week", retention="1 month", enqueue=True)
|
||||
|
||||
|
||||
# logger.add(sys.stderr, format="{time} {level} {message}", level="INFO")
|
||||
if sys.stdout is not None:
|
||||
logger.add(sys.stdout)
|
||||
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ class NewEditionCheckFoundResult(QtWidgets.QDialog, Ui_NewEditionCheckFoundResul
|
||||
self.book.link = LEHMANNS_LINK.format(isbn)
|
||||
|
||||
def update_book(self):
|
||||
print("update book")
|
||||
# debug: update_book called
|
||||
# for each line edit, get the value and assign it to the book on the corresponding attribute
|
||||
for line_edit, attr in [
|
||||
(self.line_ppn, "ppn"),
|
||||
@@ -125,7 +125,8 @@ class NewEditionCheckFoundResult(QtWidgets.QDialog, Ui_NewEditionCheckFoundResul
|
||||
if value == "":
|
||||
value = None
|
||||
setattr(self.book, attr, value)
|
||||
print("set", attr, "to", value)
|
||||
# debug: print assigned values
|
||||
# print("set", attr, "to", value)
|
||||
if attr == "isbn" and value is not None:
|
||||
self.line_source.setText(
|
||||
f"<a href='{LEHMANNS_LINK.format(self.line_isbn.text())}'>Lehmanns</a>",
|
||||
|
||||
@@ -7,7 +7,7 @@ from PySide6.QtCore import Signal
|
||||
from src.core.models import Apparat, BookData, Prof, Semester
|
||||
from src.database import Database
|
||||
from src.logic import custom_sort, sort_semesters_list
|
||||
from src.shared.logging import log
|
||||
from src.shared.logging import log, get_bloat_logger, preview
|
||||
from src.ui.dialogs import ApparatExtendDialog, Mail_Dialog, ReminderDialog
|
||||
from src.ui.widgets import DataQtGraph, StatusWidget
|
||||
from src.ui.widgets.signature_update import UpdaterThread
|
||||
@@ -122,7 +122,7 @@ class SearchStatisticPage(QtWidgets.QDialog, Ui_Dialog):
|
||||
extend.exec()
|
||||
if extend.result() == QtWidgets.QDialog.DialogCode.Accepted:
|
||||
data = extend.get_data()
|
||||
log.debug(data)
|
||||
log.debug("Extend data: {}", preview(data, 500))
|
||||
for i in range(self.tableWidget.rowCount()):
|
||||
if self.tableWidget.cellWidget(i, 0).isChecked():
|
||||
app_name = self.tableWidget.item(i, 1).text()
|
||||
@@ -173,7 +173,7 @@ class SearchStatisticPage(QtWidgets.QDialog, Ui_Dialog):
|
||||
extend.exec()
|
||||
if extend.result() == QtWidgets.QDialog.DialogCode.Accepted:
|
||||
data = extend.get_data()
|
||||
log.debug(data)
|
||||
log.debug("Extend apparat data: {}", preview(data, 500))
|
||||
app_name = self.tableWidget.item(self.tableWidget.currentRow(), 1).text()
|
||||
app_id = self.db.getApparatId(app_name)
|
||||
self.db.setNewSemesterDate(app_id, data["semester"], data["dauerapp"])
|
||||
@@ -221,7 +221,7 @@ class SearchStatisticPage(QtWidgets.QDialog, Ui_Dialog):
|
||||
self.no_result.setText("Keine Ergebnisse gefunden")
|
||||
return
|
||||
for book in retdata:
|
||||
log.debug(book)
|
||||
log.debug("Search result: {} - {}", book[0].signature, book[0].title)
|
||||
self.book_search_result.insertRow(0)
|
||||
self.book_search_result.setItem(
|
||||
0, 0, QtWidgets.QTableWidgetItem(book[0].title)
|
||||
@@ -253,7 +253,8 @@ class SearchStatisticPage(QtWidgets.QDialog, Ui_Dialog):
|
||||
|
||||
selected_apparats.append(data)
|
||||
# delete all selected apparats
|
||||
log.debug(selected_apparats)
|
||||
bloat = get_bloat_logger()
|
||||
bloat.debug("Selected apparats for deletion (preview): {}", preview(selected_apparats, 1000))
|
||||
dialogs = []
|
||||
for i in selected_apparats:
|
||||
app_id = i["app_id"]
|
||||
@@ -374,7 +375,7 @@ class SearchStatisticPage(QtWidgets.QDialog, Ui_Dialog):
|
||||
"x": [i[0] for i in data],
|
||||
"y": {"Erstellt": [i[1] for i in data], "Gelöscht": [i[2] for i in data]},
|
||||
}
|
||||
log.debug(graph_data)
|
||||
log.debug("Graph data sizes: x={}, y_keys={}", len(graph_data.get("x", [])), list(graph_data.get("y", {}).keys()))
|
||||
graph = DataQtGraph(
|
||||
title="Erstellte und gelöschte Apparate",
|
||||
data=graph_data,
|
||||
|
||||
32
src/ui/widgets/widget_sources/admin_create_user.ts
Normal file
32
src/ui/widgets/widget_sources/admin_create_user.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1">
|
||||
<context>
|
||||
<name>Dialog</name>
|
||||
<message>
|
||||
<location filename="admin_create_user.ui" line="14"/>
|
||||
<source>Dialog</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="admin_create_user.ui" line="26"/>
|
||||
<source>Nutzername</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="admin_create_user.ui" line="36"/>
|
||||
<source>Anlegen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="admin_create_user.ui" line="43"/>
|
||||
<source>Rolle</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="admin_create_user.ui" line="60"/>
|
||||
<source>Passwort</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
59
src/ui/widgets/widget_sources/admin_edit_prof.ts
Normal file
59
src/ui/widgets/widget_sources/admin_edit_prof.ts
Normal file
@@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1">
|
||||
<context>
|
||||
<name>Dialog</name>
|
||||
<message>
|
||||
<location filename="admin_edit_prof.ui" line="17"/>
|
||||
<source>Dialog</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="admin_edit_prof.ui" line="23"/>
|
||||
<source>Alte Angaben</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="admin_edit_prof.ui" line="55"/>
|
||||
<location filename="admin_edit_prof.ui" line="140"/>
|
||||
<source>Mail</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="admin_edit_prof.ui" line="62"/>
|
||||
<location filename="admin_edit_prof.ui" line="153"/>
|
||||
<source>Telefonnummer</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="admin_edit_prof.ui" line="86"/>
|
||||
<source>Löschen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="admin_edit_prof.ui" line="112"/>
|
||||
<source>Aktualisieren</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="admin_edit_prof.ui" line="160"/>
|
||||
<source>Nachname</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="admin_edit_prof.ui" line="176"/>
|
||||
<source>Titel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="admin_edit_prof.ui" line="183"/>
|
||||
<source>Vorname</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="admin_edit_prof.ui" line="192"/>
|
||||
<source>Neue Angaben</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
42
src/ui/widgets/widget_sources/admin_edit_user.ts
Normal file
42
src/ui/widgets/widget_sources/admin_edit_user.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1">
|
||||
<context>
|
||||
<name>Dialog</name>
|
||||
<message>
|
||||
<location filename="admin_edit_user.ui" line="14"/>
|
||||
<source>Dialog</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="admin_edit_user.ui" line="20"/>
|
||||
<source>Rolle</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="admin_edit_user.ui" line="30"/>
|
||||
<source>Nutzername</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="admin_edit_user.ui" line="43"/>
|
||||
<source>Passwort</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="admin_edit_user.ui" line="52"/>
|
||||
<source>Löschen?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="admin_edit_user.ui" line="59"/>
|
||||
<source>Löschen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="admin_edit_user.ui" line="68"/>
|
||||
<source> Aktualisieren </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
32
src/ui/widgets/widget_sources/admin_update_signatures.ts
Normal file
32
src/ui/widgets/widget_sources/admin_update_signatures.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1">
|
||||
<context>
|
||||
<name>Dialog</name>
|
||||
<message>
|
||||
<location filename="admin_update_signatures.ui" line="14"/>
|
||||
<source>Dialog</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="admin_update_signatures.ui" line="22"/>
|
||||
<source>Signaturen aktualisieren</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="admin_update_signatures.ui" line="29"/>
|
||||
<source>Fehlende Daten hinzufügen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="admin_update_signatures.ui" line="38"/>
|
||||
<source>Anzahl Parraleler Aktionen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="admin_update_signatures.ui" line="45"/>
|
||||
<source>Mediennummern ergänzen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
27
src/ui/widgets/widget_sources/calendar_entry.ts
Normal file
27
src/ui/widgets/widget_sources/calendar_entry.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1">
|
||||
<context>
|
||||
<name>Dialog</name>
|
||||
<message>
|
||||
<location filename="calendar_entry.ui" line="14"/>
|
||||
<source>Dialog</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="calendar_entry.ui" line="22"/>
|
||||
<source>Apparat</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="calendar_entry.ui" line="50"/>
|
||||
<source>200</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="calendar_entry.ui" line="63"/>
|
||||
<source>Löschen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
200
src/ui/widgets/widget_sources/elsa_maindialog.ts
Normal file
200
src/ui/widgets/widget_sources/elsa_maindialog.ts
Normal file
@@ -0,0 +1,200 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1">
|
||||
<context>
|
||||
<name>Dialog</name>
|
||||
<message>
|
||||
<location filename="elsa_maindialog.ui" line="14"/>
|
||||
<source>Dialog</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_maindialog.ui" line="37"/>
|
||||
<source>Neuer Auftrag</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_maindialog.ui" line="47"/>
|
||||
<source>Abbrechen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_maindialog.ui" line="82"/>
|
||||
<source>Professor</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_maindialog.ui" line="87"/>
|
||||
<source>Datum</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_maindialog.ui" line="92"/>
|
||||
<location filename="elsa_maindialog.ui" line="171"/>
|
||||
<location filename="elsa_maindialog.ui" line="577"/>
|
||||
<source>Semester</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_maindialog.ui" line="102"/>
|
||||
<source>Auftragsdaten</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_maindialog.ui" line="113"/>
|
||||
<source>Prof.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_maindialog.ui" line="178"/>
|
||||
<source>Auftragsdatum</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_maindialog.ui" line="194"/>
|
||||
<source>Speichern</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_maindialog.ui" line="201"/>
|
||||
<source>Aktualisieren</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_maindialog.ui" line="221"/>
|
||||
<source>Titel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_maindialog.ui" line="228"/>
|
||||
<source>Mail</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_maindialog.ui" line="235"/>
|
||||
<source>TelNr</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_maindialog.ui" line="257"/>
|
||||
<source>Kontaktdaten eingeben:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_maindialog.ui" line="333"/>
|
||||
<source>Dokumentname</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_maindialog.ui" line="338"/>
|
||||
<source>Dateityp</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_maindialog.ui" line="343"/>
|
||||
<source>Neu?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_maindialog.ui" line="348"/>
|
||||
<source>File</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_maindialog.ui" line="361"/>
|
||||
<source>Dokument hinzufügen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_maindialog.ui" line="368"/>
|
||||
<source>Dokument öffnen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_maindialog.ui" line="375"/>
|
||||
<source>Medien aus Dokument
|
||||
hinzufügen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_maindialog.ui" line="383"/>
|
||||
<source>Abschnitte trennen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_maindialog.ui" line="428"/>
|
||||
<source> Eintrag zitieren </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_maindialog.ui" line="468"/>
|
||||
<source>Autor(en) des Werks</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_maindialog.ui" line="476"/>
|
||||
<source>Autor(en) des Beitrags</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_maindialog.ui" line="484"/>
|
||||
<source>Jahr</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_maindialog.ui" line="489"/>
|
||||
<source>Heft</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_maindialog.ui" line="494"/>
|
||||
<source>Auflage</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_maindialog.ui" line="499"/>
|
||||
<source>Titel des Werks</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_maindialog.ui" line="504"/>
|
||||
<source>Beitragstitel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_maindialog.ui" line="509"/>
|
||||
<source>Seiten</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_maindialog.ui" line="514"/>
|
||||
<source>Ort</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_maindialog.ui" line="519"/>
|
||||
<source>Verlag</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_maindialog.ui" line="524"/>
|
||||
<source>Signatur</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_maindialog.ui" line="529"/>
|
||||
<source>Art</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_maindialog.ui" line="555"/>
|
||||
<source>Tabelle</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="elsa_maindialog.ui" line="582"/>
|
||||
<source>Zugang</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
17
src/ui/widgets/widget_sources/icon_widget.ts
Normal file
17
src/ui/widgets/widget_sources/icon_widget.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1">
|
||||
<context>
|
||||
<name>Dialog</name>
|
||||
<message>
|
||||
<location filename="icon_widget.ui" line="14"/>
|
||||
<source>Dialog</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="icon_widget.ui" line="43"/>
|
||||
<source>...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
27
src/ui/widgets/widget_sources/new_edition_check.ts
Normal file
27
src/ui/widgets/widget_sources/new_edition_check.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1">
|
||||
<context>
|
||||
<name>Dialog</name>
|
||||
<message>
|
||||
<location filename="new_edition_check.ui" line="14"/>
|
||||
<source>Dialog</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="new_edition_check.ui" line="49"/>
|
||||
<source>Previous</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="new_edition_check.ui" line="56"/>
|
||||
<source>Next</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="new_edition_check.ui" line="63"/>
|
||||
<source>Finish</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
87
src/ui/widgets/widget_sources/new_edition_check_book.ts
Normal file
87
src/ui/widgets/widget_sources/new_edition_check_book.ts
Normal file
@@ -0,0 +1,87 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1">
|
||||
<context>
|
||||
<name>Dialog</name>
|
||||
<message>
|
||||
<location filename="new_edition_check_book.ui" line="14"/>
|
||||
<source>Dialog</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="new_edition_check_book.ui" line="26"/>
|
||||
<source>Ausgewähltes Buch</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="new_edition_check_book.ui" line="41"/>
|
||||
<source>Gefundenes Buch</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="new_edition_check_book.ui" line="54"/>
|
||||
<source>TextLabel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="new_edition_check_book.ui" line="65"/>
|
||||
<source>PPN</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="new_edition_check_book.ui" line="75"/>
|
||||
<source>Titel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="new_edition_check_book.ui" line="85"/>
|
||||
<source>Signatur</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="new_edition_check_book.ui" line="95"/>
|
||||
<source>Auflage</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="new_edition_check_book.ui" line="105"/>
|
||||
<source>Verlag</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="new_edition_check_book.ui" line="115"/>
|
||||
<source>Jahr</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="new_edition_check_book.ui" line="125"/>
|
||||
<source>Seiten</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="new_edition_check_book.ui" line="135"/>
|
||||
<source>Autor</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="new_edition_check_book.ui" line="145"/>
|
||||
<source>ISBN</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="new_edition_check_book.ui" line="179"/>
|
||||
<source>Quelle</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="new_edition_check_book.ui" line="196"/>
|
||||
<source>Previous</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="new_edition_check_book.ui" line="203"/>
|
||||
<source>Next</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
@@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1">
|
||||
<context>
|
||||
<name>Dialog</name>
|
||||
<message>
|
||||
<location filename="new_edition_check_found_result.ui" line="14"/>
|
||||
<source>Dialog</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="new_edition_check_found_result.ui" line="20"/>
|
||||
<source>PPN</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="new_edition_check_found_result.ui" line="30"/>
|
||||
<source>Titel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="new_edition_check_found_result.ui" line="40"/>
|
||||
<source>Signatur</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="new_edition_check_found_result.ui" line="50"/>
|
||||
<source>Auflage</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="new_edition_check_found_result.ui" line="60"/>
|
||||
<source>Verlag</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="new_edition_check_found_result.ui" line="70"/>
|
||||
<source>Jahr</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="new_edition_check_found_result.ui" line="80"/>
|
||||
<source>Seiten</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="new_edition_check_found_result.ui" line="103"/>
|
||||
<source>Bestellen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="new_edition_check_found_result.ui" line="110"/>
|
||||
<source>Quelle</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="new_edition_check_found_result.ui" line="136"/>
|
||||
<source>ISBN</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="new_edition_check_found_result.ui" line="153"/>
|
||||
<source>Autor</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
27
src/ui/widgets/widget_sources/new_edition_check_selector.ts
Normal file
27
src/ui/widgets/widget_sources/new_edition_check_selector.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1">
|
||||
<context>
|
||||
<name>Dialog</name>
|
||||
<message>
|
||||
<location filename="new_edition_check_selector.ui" line="14"/>
|
||||
<source>Dialog</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="new_edition_check_selector.ui" line="20"/>
|
||||
<source>Soll nur der Apparat geprüft werden, oder sollen alle Medien des Profs geprüft werden?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="new_edition_check_selector.ui" line="29"/>
|
||||
<source>Apparat</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="new_edition_check_selector.ui" line="36"/>
|
||||
<source>Prof</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
150
src/ui/widgets/widget_sources/search_statistic_page.ts
Normal file
150
src/ui/widgets/widget_sources/search_statistic_page.ts
Normal file
@@ -0,0 +1,150 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1">
|
||||
<context>
|
||||
<name>Dialog</name>
|
||||
<message>
|
||||
<location filename="search_statistic_page.ui" line="14"/>
|
||||
<source>Dialog</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="search_statistic_page.ui" line="39"/>
|
||||
<source>Statistik</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="search_statistic_page.ui" line="54"/>
|
||||
<source>Dauerapp:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="search_statistic_page.ui" line="71"/>
|
||||
<source>Löschbar</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="search_statistic_page.ui" line="81"/>
|
||||
<source>Person:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="search_statistic_page.ui" line="104"/>
|
||||
<source>Appnr.:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="search_statistic_page.ui" line="114"/>
|
||||
<source>Endsemester:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="search_statistic_page.ui" line="148"/>
|
||||
<source>Erstellsemester:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="search_statistic_page.ui" line="158"/>
|
||||
<source>Fach:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="search_statistic_page.ui" line="178"/>
|
||||
<location filename="search_statistic_page.ui" line="208"/>
|
||||
<source>Suchen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="search_statistic_page.ui" line="219"/>
|
||||
<source>Trunkierung mit * am Ende unterstützt</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="search_statistic_page.ui" line="229"/>
|
||||
<location filename="search_statistic_page.ui" line="575"/>
|
||||
<source>Signatur</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="search_statistic_page.ui" line="262"/>
|
||||
<location filename="search_statistic_page.ui" line="570"/>
|
||||
<source>Titel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="search_statistic_page.ui" line="274"/>
|
||||
<source>Suche mit Enter starten</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="search_statistic_page.ui" line="346"/>
|
||||
<source>Ausgewählte Löschen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="search_statistic_page.ui" line="353"/>
|
||||
<source>Zeigt für jeden ausgewählten Apparat eine eMail-Vorlage an</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="search_statistic_page.ui" line="356"/>
|
||||
<source>Ausgewählte Benachrichtigen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="search_statistic_page.ui" line="363"/>
|
||||
<source>Ausgewählte Verlängern</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="search_statistic_page.ui" line="412"/>
|
||||
<source>Apparatsname</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="search_statistic_page.ui" line="417"/>
|
||||
<source>Apparatsnummer</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="search_statistic_page.ui" line="422"/>
|
||||
<source>Person</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="search_statistic_page.ui" line="427"/>
|
||||
<source>Fach</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="search_statistic_page.ui" line="447"/>
|
||||
<source>Tabelle</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="search_statistic_page.ui" line="496"/>
|
||||
<source>Semester</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="search_statistic_page.ui" line="501"/>
|
||||
<source>Zugang</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="search_statistic_page.ui" line="506"/>
|
||||
<source>Abgang</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="search_statistic_page.ui" line="518"/>
|
||||
<source>Erstellte und gelöschte Semesterapparate</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="search_statistic_page.ui" line="580"/>
|
||||
<source>Apparat</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
245
src/ui/widgets/widget_sources/welcome_wizard.ts
Normal file
245
src/ui/widgets/widget_sources/welcome_wizard.ts
Normal file
@@ -0,0 +1,245 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1">
|
||||
<context>
|
||||
<name>Wizard</name>
|
||||
<message>
|
||||
<location filename="welcome_wizard.ui" line="14"/>
|
||||
<source>Wizard</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="welcome_wizard.ui" line="30"/>
|
||||
<source>Willkommen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="welcome_wizard.ui" line="57"/>
|
||||
<source><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><meta charset="utf-8" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
hr { height: 1px; border-width: 0; }
|
||||
li.unchecked::marker { content: "\2610"; }
|
||||
li.checked::marker { content: "\2612"; }
|
||||
</style></head><body style=" font-family:'Segoe UI'; font-size:9pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Es wurde erkannt, dass der SemesterApparatsManager (SAM) zum ersten Mal gestartet wurde. In den Folgenden Seiten werden die grundlegenden Einstellungen festgelegt, anschließend wird SAM geöffnet. Folgende Einstellungen werden über diesen Wizard festgelegt:</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- Datenbank</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- eMail</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- Zotero Integration</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- KI Integration</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Anschließend kann ein Nutzeraccount für SAM erstellt werden</p></body></html></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="welcome_wizard.ui" line="78"/>
|
||||
<source>Datenbank</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="welcome_wizard.ui" line="81"/>
|
||||
<source>Hier werden die Einstellungen für die Datenbank und temporären Dateien festgelegt. Über den [...] Knopf können die Speicherordner ausgewählt werden.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="welcome_wizard.ui" line="96"/>
|
||||
<source>C:\Users\[Nutzer]\AppData\Local\SAM\SemesterApparatsManager\Cache</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="welcome_wizard.ui" line="103"/>
|
||||
<source>Datenbankpfad</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="welcome_wizard.ui" line="123"/>
|
||||
<source>Temporäre Daten</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="welcome_wizard.ui" line="130"/>
|
||||
<location filename="welcome_wizard.ui" line="137"/>
|
||||
<source>...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="welcome_wizard.ui" line="144"/>
|
||||
<source>Datenbankname</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="welcome_wizard.ui" line="151"/>
|
||||
<source>semesterapparate.db</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="welcome_wizard.ui" line="159"/>
|
||||
<source>Mail</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="welcome_wizard.ui" line="162"/>
|
||||
<source>Hier werden die Einstellungen für die Mailverbindung eingegeben</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="welcome_wizard.ui" line="171"/>
|
||||
<source>SMTP Server</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="welcome_wizard.ui" line="202"/>
|
||||
<source>Rechtsklick, um passwort anzuzeigen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="welcome_wizard.ui" line="215"/>
|
||||
<location filename="welcome_wizard.ui" line="418"/>
|
||||
<source>Nutzername</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="welcome_wizard.ui" line="222"/>
|
||||
<source>SMTP Port</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="welcome_wizard.ui" line="229"/>
|
||||
<location filename="welcome_wizard.ui" line="428"/>
|
||||
<source>Passwort</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="welcome_wizard.ui" line="236"/>
|
||||
<source>CheckBox</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="welcome_wizard.ui" line="250"/>
|
||||
<source>Druckermail</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="welcome_wizard.ui" line="257"/>
|
||||
<source>Nutzername
|
||||
für SMTP</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="welcome_wizard.ui" line="268"/>
|
||||
<source>Signatur</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="welcome_wizard.ui" line="275"/>
|
||||
<source>Mail Adresse</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="welcome_wizard.ui" line="290"/>
|
||||
<source>Zotero</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="welcome_wizard.ui" line="293"/>
|
||||
<source>Hier werden die Einstellungen für Zotero verwaltet</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="welcome_wizard.ui" line="302"/>
|
||||
<source>API-Key</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="welcome_wizard.ui" line="315"/>
|
||||
<source>ID</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="welcome_wizard.ui" line="322"/>
|
||||
<source>Anwendungstyp</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="welcome_wizard.ui" line="329"/>
|
||||
<source>user</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="welcome_wizard.ui" line="337"/>
|
||||
<source>KI-Integration</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="welcome_wizard.ui" line="340"/>
|
||||
<source>Hier werden die Einstellungen für die KI Integration eingestellt.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="welcome_wizard.ui" line="352"/>
|
||||
<source>API Key</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="welcome_wizard.ui" line="359"/>
|
||||
<source>ChatGPT Modell</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="welcome_wizard.ui" line="366"/>
|
||||
<location filename="welcome_wizard.ui" line="370"/>
|
||||
<source>gpt3.5-turbo</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="welcome_wizard.ui" line="375"/>
|
||||
<source>gpt-4</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="welcome_wizard.ui" line="380"/>
|
||||
<source>gpt-4o</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="welcome_wizard.ui" line="385"/>
|
||||
<source>gpt-4o-mini</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="welcome_wizard.ui" line="390"/>
|
||||
<source>gpt-4.1</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="welcome_wizard.ui" line="395"/>
|
||||
<source>gpt-4.1-mini</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="welcome_wizard.ui" line="400"/>
|
||||
<source>gpt-4.1-nano</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="welcome_wizard.ui" line="409"/>
|
||||
<source>SAM Nutzer</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="welcome_wizard.ui" line="412"/>
|
||||
<source>Hier kann ein Nutzer für SAM erstellt werden</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="welcome_wizard.ui" line="440"/>
|
||||
<source>Prüfen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="welcome_wizard.ui" line="447"/>
|
||||
<source>Anlegen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
12
src/utils/docs.ts
Normal file
12
src/utils/docs.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1">
|
||||
<context>
|
||||
<name>Dialog</name>
|
||||
<message>
|
||||
<location filename="docs.ui" line="14"/>
|
||||
<source>Dialog</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
@@ -1,30 +1,47 @@
|
||||
# Form implementation generated from reading ui file 'c:\Users\aky547\GitHub\SemesterapparatsManager\src\utils\docs.ui'
|
||||
#
|
||||
# Created by: PySide6 UI code generator 6.8.0
|
||||
#
|
||||
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
|
||||
# run again. Do not edit this file unless you know what you are doing.
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
################################################################################
|
||||
## Form generated from reading UI file 'docs.ui'
|
||||
##
|
||||
## Created by: Qt User Interface Compiler version 6.9.2
|
||||
##
|
||||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
################################################################################
|
||||
|
||||
from PySide6 import QtCore, QtWidgets
|
||||
|
||||
from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
|
||||
QMetaObject, QObject, QPoint, QRect,
|
||||
QSize, QTime, QUrl, Qt)
|
||||
from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
|
||||
QFont, QFontDatabase, QGradient, QIcon,
|
||||
QImage, QKeySequence, QLinearGradient, QPainter,
|
||||
QPalette, QPixmap, QRadialGradient, QTransform)
|
||||
from PySide6.QtWidgets import (QApplication, QDialog, QGridLayout, QSizePolicy,
|
||||
QTabWidget, QWidget)
|
||||
|
||||
class Ui_Dialog(object):
|
||||
def setupUi(self, Dialog):
|
||||
Dialog.setObjectName("Dialog")
|
||||
if not Dialog.objectName():
|
||||
Dialog.setObjectName(u"Dialog")
|
||||
Dialog.resize(800, 600)
|
||||
self.gridLayout_2 = QtWidgets.QGridLayout(Dialog)
|
||||
self.gridLayout_2.setObjectName("gridLayout_2")
|
||||
self.gridLayout = QtWidgets.QGridLayout()
|
||||
self.gridLayout.setObjectName("gridLayout")
|
||||
self.tabs = QtWidgets.QTabWidget(parent=Dialog)
|
||||
self.tabs.setObjectName("tabs")
|
||||
self.gridLayout_2 = QGridLayout(Dialog)
|
||||
self.gridLayout_2.setObjectName(u"gridLayout_2")
|
||||
self.gridLayout = QGridLayout()
|
||||
self.gridLayout.setObjectName(u"gridLayout")
|
||||
self.tabs = QTabWidget(Dialog)
|
||||
self.tabs.setObjectName(u"tabs")
|
||||
|
||||
self.gridLayout.addWidget(self.tabs, 0, 0, 1, 1)
|
||||
|
||||
|
||||
self.gridLayout_2.addLayout(self.gridLayout, 0, 0, 1, 1)
|
||||
|
||||
|
||||
self.retranslateUi(Dialog)
|
||||
QtCore.QMetaObject.connectSlotsByName(Dialog)
|
||||
|
||||
QMetaObject.connectSlotsByName(Dialog)
|
||||
# setupUi
|
||||
|
||||
def retranslateUi(self, Dialog):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
Dialog.setWindowTitle(_translate("Dialog", "Dialog"))
|
||||
Dialog.setWindowTitle(QCoreApplication.translate("Dialog", u"Dialog", None))
|
||||
# retranslateUi
|
||||
|
||||
|
||||
@@ -111,4 +111,6 @@ class Icon:
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
print("This is a module and can not be executed directly.")
|
||||
# When executed directly this was printing a short message; not needed in production.
|
||||
# print("This is a module and can not be executed directly.")
|
||||
pass
|
||||
|
||||
21
test.py
21
test.py
@@ -1,15 +1,10 @@
|
||||
from src.backend.catalogue import Catalogue
|
||||
from src.logic.webrequest import BibTextTransformer, WebRequest
|
||||
from src.services.webrequest import BibTextTransformer, TransformerType, WebRequest
|
||||
|
||||
cat = Catalogue()
|
||||
result = cat.get_book("3825872475")
|
||||
print(result)
|
||||
web = WebRequest()
|
||||
web.get_ppn("3825872475")
|
||||
data = web.get_data_elsa()
|
||||
print(data)
|
||||
bib = BibTextTransformer()
|
||||
bib.get_data(result)
|
||||
book = bib.return_data()
|
||||
transformer = BibTextTransformer(TransformerType.RDS)
|
||||
|
||||
print(book)
|
||||
data = WebRequest().set_apparat(71)
|
||||
data = data.get_ppn("CU 3700 R244 (2)").get_data()
|
||||
|
||||
rds = transformer.get_data(data).return_data("rds_availability")
|
||||
|
||||
print(rds)
|
||||
|
||||
Reference in New Issue
Block a user