init: scripts diversos (crawlers, conversores, scrapers)

This commit is contained in:
2026-03-05 20:38:36 +00:00
commit 6ac6f4be2a
925 changed files with 850330 additions and 0 deletions

54
scraper/monitor_batch3.sh Executable file
View File

@@ -0,0 +1,54 @@
#!/bin/bash
# Monitor de Scraping Batch 3 - CTF Knowledge Base
# Author: Descomplicar® Crescimento Digital
# Link: https://descomplicar.pt
# Copyright: 2025 Descomplicar®
LOG_FILE="execution_batch3.log"
OUTPUT_DIR="/media/ealmeida/Dados/GDrive/Cloud/Clientes_360/CTF_Carstuff/KB/Scrapper/sites/output_md"
echo "═══════════════════════════════════════════════════════════"
echo " MONITOR SCRAPING BATCH 3 - 5 FÓRUNS INTERNACIONAIS"
echo "═══════════════════════════════════════════════════════════"
echo ""
while true; do
# Contar ficheiros MD novos (batch 3)
COUNT_PORTAL=$(ls -1 "$OUTPUT_DIR"/forum.portaldosclassicos.com_*.md 2>/dev/null | wc -l)
COUNT_TRIUMPH=$(ls -1 "$OUTPUT_DIR"/triumphexp.com_*.md 2>/dev/null | wc -l)
COUNT_AUTOSATTLER=$(ls -1 "$OUTPUT_DIR"/autosattler.de_*.md 2>/dev/null | wc -l)
COUNT_LEDERZENTRUM=$(ls -1 "$OUTPUT_DIR"/lederzentrum.de_*.md 2>/dev/null | wc -l)
COUNT_FORO=$(ls -1 "$OUTPUT_DIR"/foro.pieldetoro.net_*.md 2>/dev/null | wc -l)
TOTAL=$((COUNT_PORTAL + COUNT_TRIUMPH + COUNT_AUTOSATTLER + COUNT_LEDERZENTRUM + COUNT_FORO))
# Última linha do log
LAST_LINE=$(tail -3 "$LOG_FILE" 2>/dev/null | head -1)
# Timestamp
TIMESTAMP=$(date '+%H:%M:%S')
clear
echo "═══════════════════════════════════════════════════════════"
echo " MONITOR SCRAPING BATCH 3 - 5 FÓRUNS INTERNACIONAIS"
echo " [$TIMESTAMP] - Atualizado a cada 30 segundos"
echo "═══════════════════════════════════════════════════════════"
echo ""
echo "📊 Ficheiros MD Scrapeados por Site:"
echo " 🇵🇹 Portal dos Clássicos: $COUNT_PORTAL ficheiros"
echo " 🏎️ Triumph Experience: $COUNT_TRIUMPH ficheiros"
echo " 🇩🇪 Autosattler.de: $COUNT_AUTOSATTLER ficheiros"
echo " 🇩🇪 Lederzentrum: $COUNT_LEDERZENTRUM ficheiros"
echo " 🇪🇸 Foro Piel de Toro: $COUNT_FORO ficheiros"
echo ""
echo " 📦 TOTAL: $TOTAL ficheiros MD"
echo ""
echo "📈 Última Atividade:"
echo "$LAST_LINE"
echo ""
echo "═══════════════════════════════════════════════════════════"
echo "Pressiona Ctrl+C para parar o monitor"
echo "═══════════════════════════════════════════════════════════"
sleep 30
done