7177cdb9ab
Adds a /help page served from the dashboard navigation, containing the full
Romanian user manual for operators: dashboard, playlist management, adding
media, removing files from playlists, player management, and the advanced
edited-media view.
Implementation notes
- Manual is pre-rendered to HTML with pandoc and shipped as a static asset
(app/static/help/_manual_body.html) rather than parsed at runtime. This
keeps the container free of a Markdown dependency and makes the page render
identically regardless of what is installed.
- /help is login-protected; the sidebar table of contents is derived from the
level-2 headings at request time.
- Screenshots are served from app/static/help/screenshots/ (32 images).
- Regenerate after editing the manual:
documentatie/convert_help_page.sh
docker compose up -d --build
Also adds
- backup_players_playlists.sh / restore_database.sh for DB backup and restore.
- .gitignore rules so local database backups (real production data), generated
.docx files and duplicate screenshot copies are never committed.
168 lines
6.3 KiB
Bash
Executable File
168 lines
6.3 KiB
Bash
Executable File
#!/bin/bash
|
|
# ============================================================================
|
|
# capture_screenshots.sh - Helper pentru capturile de ecran ale manualului
|
|
# ----------------------------------------------------------------------------
|
|
# Ghideaza pas-cu-pas captura celor 25 de ecrane necesare pentru manual.
|
|
# Foloseste Flameshot (recomandat) sau scrot.
|
|
#
|
|
# Utilizare:
|
|
# ./capture_screenshots.sh # mod ghidat, pas cu pas
|
|
# ./capture_screenshots.sh --list # doar listeaza ce trebuie capturat
|
|
# ./capture_screenshots.sh --check # verifica ce capturi exista deja
|
|
# ============================================================================
|
|
set -u
|
|
|
|
SCREENSHOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/screenshots"
|
|
mkdir -p "$SCREENSHOT_DIR"
|
|
|
|
# Cele 25 de capturi necesare: nume|descriere|secțiune manual
|
|
CAPTURES=(
|
|
"01-login|Ecranul de autentificare (login)|2.2"
|
|
"02-change-password|Formularul de schimbare parola|2.3"
|
|
"03-dashboard|Dashboard-ul complet cu statistici|3"
|
|
"04-media-library|Lista fisierelor din Biblioteca de Media|4"
|
|
"05-delete-file|Confirmarea stergerii unui fisier|4.4"
|
|
"06-upload-media|Formularul de incarcare media|5.1"
|
|
"07-upload-progress|Progresul incarcarii unui fisier|5.3"
|
|
"08-add-weblink|Formularul de adaugare link web|5.4"
|
|
"09-playlists-list|Lista tuturor playlist-urilor|6.1"
|
|
"10-create-playlist|Crearea unui playlist nou|6.2"
|
|
"11-manage-playlist|Pagina de management a continutului|6.3"
|
|
"12-add-content-to-playlist|Selectarea continutului de adaugat|7.1"
|
|
"13-content-options|Optiunile per element (durata, muted)|7.2"
|
|
"14-remove-from-playlist|Stergerea unui element din playlist|8.1"
|
|
"15-bulk-remove|Stergerea in masa a elementelor|8.2"
|
|
"16-reorder-playlist|Reordonarea elementelor (drag & drop)|9.1"
|
|
"17-players-list|Lista playerelor|10.1"
|
|
"18-add-player|Adaugarea unui player nou|10.2"
|
|
"19-assign-playlist|Atribuirea unui playlist unui player|10.4"
|
|
"20-edited-media|Lista fisierelor editate pe player|11.1"
|
|
"21-edited-media-report|Raportul detaliat al fisierelor editate|11.3"
|
|
"22-player-fullscreen|Previzualizarea in mod ecran complet|11.5"
|
|
"23-user-management|Managementul utilizatorilor|12.1"
|
|
"24-https-config|Configurarea HTTPS|12.2"
|
|
"25-dependencies|Instalarea dependentelor|12.4"
|
|
)
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Mod --list
|
|
# ---------------------------------------------------------------------------
|
|
if [ "${1:-}" = "--list" ]; then
|
|
echo "============================================================"
|
|
echo " Capturi de ecran necesare pentru manual (25 total)"
|
|
echo "============================================================"
|
|
echo
|
|
printf "%-6s %-34s %-36s %s\n" "NR" "FISIER" "CE SA CONTINA" "SECTIUNE"
|
|
echo "--------------------------------------------------------------------------"
|
|
i=1
|
|
for entry in "${CAPTURES[@]}"; do
|
|
IFS='|' read -r name desc section <<< "$entry"
|
|
printf "%-6s %-34s %-36s %s\n" "$i." "${name}.png" "$desc" "$section"
|
|
i=$((i+1))
|
|
done
|
|
echo
|
|
echo "Salveaza toate capturile in:"
|
|
echo " $SCREENSHOT_DIR"
|
|
exit 0
|
|
fi
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Mod --check
|
|
# ---------------------------------------------------------------------------
|
|
if [ "${1:-}" = "--check" ]; then
|
|
echo "============================================================"
|
|
echo " Verificare capturi de ecran existente"
|
|
echo "============================================================"
|
|
echo
|
|
found=0; missing=0
|
|
for entry in "${CAPTURES[@]}"; do
|
|
IFS='|' read -r name desc section <<< "$entry"
|
|
if [ -f "$SCREENSHOT_DIR/${name}.png" ]; then
|
|
size=$(du -h "$SCREENSHOT_DIR/${name}.png" | cut -f1)
|
|
printf " \033[0;32m✓\033[0m %-32s %s\n" "${name}.png" "$size"
|
|
found=$((found+1))
|
|
else
|
|
printf " \033[0;31m✗\033[0m %-32s LIPSA\n" "${name}.png"
|
|
missing=$((missing+1))
|
|
fi
|
|
done
|
|
echo
|
|
echo "-------------------------------------------------------------"
|
|
echo " Gasite: $found / 25"
|
|
echo " Lipsa: $missing / 25"
|
|
echo "-------------------------------------------------------------"
|
|
if [ "$missing" -eq 0 ]; then
|
|
echo
|
|
echo " Toate capturile sunt prezente! Puteti rula:"
|
|
echo " ./convert_manual.sh"
|
|
fi
|
|
exit 0
|
|
fi
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Mod ghidat
|
|
# ---------------------------------------------------------------------------
|
|
echo "============================================================"
|
|
echo " Ghid capturi de ecran - Manual DigiServer"
|
|
echo "============================================================"
|
|
echo
|
|
|
|
if ! command -v scrot &> /dev/null && ! command -v flameshot &> /dev/null; then
|
|
echo "✗ Nu exista tool de capturi. Instalati cu:"
|
|
echo " sudo apt-get install -y flameshot scrot"
|
|
exit 1
|
|
fi
|
|
|
|
echo "Deschideti aplicatia in browser: https://10.76.152.164"
|
|
echo "Autentificati-va ca admin, apoi urmati pasii."
|
|
echo
|
|
echo "Pentru fiecare ecran vi se va cere sa apasati Enter,"
|
|
echo "apoi se face captura. Daca ati facut-o deja, scrieti 's' (skip)."
|
|
echo
|
|
|
|
completed=0
|
|
for entry in "${CAPTURES[@]}"; do
|
|
IFS='|' read -r name desc section <<< "$entry"
|
|
target="$SCREENSHOT_DIR/${name}.png"
|
|
|
|
echo "-------------------------------------------------------------"
|
|
echo " ${name}.png"
|
|
echo " Ce: $desc"
|
|
echo " Sectiune manual: $section"
|
|
|
|
if [ -f "$target" ]; then
|
|
echo " (exista deja - scrieti 'r' pentru a reface, Enter pentru skip)"
|
|
fi
|
|
|
|
read -r -p " Enter = captura | s = skip | q = iesire: " action
|
|
case "$action" in
|
|
q|Q) echo; echo "Iesire. Capturi realizate: $completed"; exit 0 ;;
|
|
r|R) : ;;
|
|
s|S) echo " skipped"; continue ;;
|
|
esac
|
|
|
|
echo " Captura in 3 secunde... (treceti la fereastra dorita)"
|
|
sleep 3
|
|
|
|
if command -v scrot &> /dev/null; then
|
|
scrot "$target"
|
|
else
|
|
flameshot full -p "$target"
|
|
fi
|
|
|
|
if [ -f "$target" ]; then
|
|
echo " ✓ Salvat: $target"
|
|
completed=$((completed+1))
|
|
else
|
|
echo " ✗ Captura a esuat"
|
|
fi
|
|
done
|
|
|
|
echo
|
|
echo "============================================================"
|
|
echo " Ghid terminat. Capturi realizate: $completed"
|
|
echo "============================================================"
|
|
echo
|
|
echo "Verificati cu: ./capture_screenshots.sh --check"
|
|
echo "Apoi convertiti: ./convert_manual.sh"
|