From 7ca5d7d94ee30b249376e0962d95695ab96859f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Raduli=C4=87?= Date: Tue, 5 May 2026 18:39:01 +0200 Subject: [PATCH] =?UTF-8?q?Sporta=C5=A1=20kartica=20fix=20+=20hns=5Frun.sh?= =?UTF-8?q?=20wrapper?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CSS sport2.html: - .player-card .ph img object-position: top → center 25% (face-aware crop) - .ph aspect-ratio: 4/5 (portrait container, više prostora za sliku) scripts/hns_run.sh: - Wrapper koristi /usr/bin/python3 (ima psycopg2) - Komande: master, deep, avatar, season, watchdog, objekti - Damir-friendly (radi i u venv) --- scripts/hns_run.sh | 24 ++++++++++++++++++++++++ static/sport2.html | 4 ++-- 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100755 scripts/hns_run.sh diff --git a/scripts/hns_run.sh b/scripts/hns_run.sh new file mode 100755 index 0000000..d984ced --- /dev/null +++ b/scripts/hns_run.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# Wrapper za HNS harvester koji uvijek koristi sistemski python3 (ima psycopg2) +# Damir-friendly - ignorira venv aktivaciju +SCRIPT_DIR="$(dirname "$(readlink -f "$0")")" + +case "$1" in + master) /usr/bin/python3 "$SCRIPT_DIR/hns_master_harvester.py" "${@:2}" ;; + deep) /usr/bin/python3 "$SCRIPT_DIR/hns_player_deep.py" "${@:2}" ;; + avatar) /usr/bin/python3 "$SCRIPT_DIR/hns_avatar_harvester.py" "${@:2}" ;; + season) /usr/bin/python3 "$SCRIPT_DIR/hns_season_retry.py" "${@:2}" ;; + watchdog) /usr/bin/python3 "$SCRIPT_DIR/hns_watchdog.py" "${@:2}" ;; + objekti) /usr/bin/python3 "$SCRIPT_DIR/objekti_enrich_address.py" "${@:2}" ;; + "") echo "Usage: $0 {master|deep|avatar|season|watchdog|objekti} [args]" + echo + echo "Primjeri:" + echo " $0 master --limit 100 # Sve PGŽ klubove (~59)" + echo " $0 master --klub-id 2613 # Jedan klub" + echo " $0 master --single-player 436387 # Jedan igrač" + echo " $0 deep # DEEP scrape svih (sezone+utakmice)" + echo " $0 avatar # Avatar slike" + echo " $0 watchdog # Auto-recovery" + ;; + *) echo "Unknown command: $1"; exit 1 ;; +esac diff --git a/static/sport2.html b/static/sport2.html index e43a791..e845f5e 100644 --- a/static/sport2.html +++ b/static/sport2.html @@ -102,8 +102,8 @@ button,input,select{font-family:inherit;font-size:inherit;outline:none} .player-card{background:var(--bg2);border:1px solid var(--rim);border-radius:8px;overflow:hidden;cursor:pointer;transition:all .2s} .player-card:hover{border-color:var(--pgz-gold);transform:translateY(-1px)} -.player-card .ph{height:120px;background:linear-gradient(135deg,var(--bg3),var(--bg2));position:relative;overflow:hidden;display:flex;align-items:center;justify-content:center} -.player-card .ph img{width:100%;height:100%;object-fit:cover;object-position:top} +.player-card .ph{width:100%;aspect-ratio:4/5;overflow:hidden;background:var(--bg3);position:relative;display:flex;align-items:center;justify-content:center} +.player-card .ph img{width:100%;height:100%;object-fit:cover;object-position:center 25%} .player-card .ph .no{font-size:36px;color:var(--t4);font-weight:800} .player-card .pb{padding:10px} .player-card .pn{font-weight:700;color:var(--t0);font-size:13px;line-height:1.2}