Apps: - dwg-rooms: extract room numbers from DWG/DXF - dwg-counting: count symbols in PDF drawings (OpenCV template matching) - contract-check: review PDF contracts against a checklist (Claude vision + Tesseract OCR fallback) - email-drafter: bullet notes → polished Czech/English business emails - invoice-extractor: PDF/image invoice → structured data → Excel - translator: Czech-first translator across 19 languages with tone control - vv-check: find inconsistent unit prices across VV sheets in one workbook - vv-compare: diff original vs new VV files (changes / added / removed) - feature-request: portal users submit ideas + sample files Infrastructure: - LiteLLM gateway with per-app virtual keys + budgets - Langfuse observability - Geist font, shared theme, cross-subdomain back link + theme sync via cookie/URL - Caddy reverse proxy on *.klas.chat
206 lines
8.4 KiB
HTML
206 lines
8.4 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="cs">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title>Počítání symbolů z PDF výkresu | Colsys AI</title>
|
||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&display=swap">
|
||
<link rel="stylesheet" href="/static/styles.css">
|
||
<link rel="stylesheet" href="/static/extra.css">
|
||
<script>
|
||
// Theme handling — runs before first paint to prevent flash.
|
||
// Priority: URL ?theme= → localStorage → portal_theme cookie → system.
|
||
(function () {
|
||
var t = null;
|
||
try {
|
||
var url = new URL(window.location.href);
|
||
var p = url.searchParams.get("theme");
|
||
if (p === "dark" || p === "light") t = p;
|
||
} catch (e) {}
|
||
if (!t) {
|
||
try { t = localStorage.getItem("app_theme"); } catch (e) {}
|
||
}
|
||
if (!t) {
|
||
var m = document.cookie.match(/(?:^|;\s*)portal_theme=([^;]+)/);
|
||
if (m) t = decodeURIComponent(m[1]);
|
||
}
|
||
if (t === "dark" || t === "light") {
|
||
document.documentElement.classList.add(t);
|
||
try { localStorage.setItem("app_theme", t); } catch (e) {}
|
||
}
|
||
})();
|
||
</script>
|
||
</head>
|
||
<body>
|
||
|
||
<header class="header">
|
||
<div class="header-inner">
|
||
<a href="https://ai.klas.chat" class="brand">
|
||
<span class="brand-icon">C</span>
|
||
<span class="brand-name">Colsys <span class="brand-ai">AI</span></span>
|
||
</a>
|
||
<span class="header-crumb">Počítání symbolů z PDF výkresu</span>
|
||
<a href="https://ai.klas.chat" class="back-link" title="Zpět na portál">
|
||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
||
<path d="m15 18-6-6 6-6"/>
|
||
</svg>
|
||
<span>Zpět na portál</span>
|
||
</a>
|
||
</div>
|
||
</header>
|
||
|
||
<main class="main">
|
||
|
||
<!-- ── Upload ────────────────────────────── -->
|
||
<section id="s-upload">
|
||
<div class="section-intro">
|
||
<h1 class="section-title">Počítání symbolů z PDF výkresu</h1>
|
||
<p class="section-desc">
|
||
Nahrajte výkres ve formátu <strong>PDF</strong>, vyznačte symboly, které
|
||
chcete spočítat, a aplikace najde jejich výskyty v celém výkresu.
|
||
Výsledek lze stáhnout jako Excel nebo jako PDF s vyznačením.
|
||
</p>
|
||
</div>
|
||
|
||
<div id="drop-zone" class="drop-zone">
|
||
<svg class="drop-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
|
||
<path stroke-linecap="round" stroke-linejoin="round"
|
||
d="M12 16.5V4.5m0 0-3.75 3.75M12 4.5l3.75 3.75M4.5 19.5h15"/>
|
||
</svg>
|
||
<p class="drop-text">Přetáhněte PDF výkres sem</p>
|
||
<p class="drop-or">nebo</p>
|
||
<button class="btn btn-secondary" id="browse-btn" type="button">Vybrat soubor</button>
|
||
<p class="drop-formats">Podporovaný formát: .pdf</p>
|
||
<input type="file" id="file-input" accept=".pdf" style="display:none">
|
||
</div>
|
||
</section>
|
||
|
||
<!-- ── Processing ────────────────────────── -->
|
||
<section id="s-processing" class="hidden">
|
||
<div class="processing-card">
|
||
<div class="spinner"></div>
|
||
<h2 class="processing-title" id="processing-title">Hledám legendu ve výkresu…</h2>
|
||
<p class="processing-sub" id="processing-sub">Toto může trvat 20–60 sekund.</p>
|
||
</div>
|
||
</section>
|
||
|
||
<!-- ── Symbol selection ──────────────────── -->
|
||
<section id="s-symbols" class="hidden">
|
||
<div class="results-header">
|
||
<div>
|
||
<h2 class="results-title">Vyberte symboly k spočítání</h2>
|
||
<p class="results-meta" id="symbols-meta"></p>
|
||
</div>
|
||
<div class="results-actions">
|
||
<button class="btn btn-secondary" id="reset-btn" type="button">Nahrát jiný</button>
|
||
<button class="btn btn-secondary" id="auto-detect-btn" type="button" title="Najít legendu pomocí AI">
|
||
Auto-detekce z legendy
|
||
</button>
|
||
<button class="btn btn-primary" id="add-symbol-btn" type="button">
|
||
+ Vyříznout symbol z výkresu
|
||
</button>
|
||
<button class="btn btn-secondary" id="upload-symbol-btn" type="button">
|
||
+ Nahrát PNG
|
||
</button>
|
||
<input type="file" id="symbol-file-input" accept="image/*" style="display:none">
|
||
<button class="btn btn-primary" id="count-btn" type="button" disabled>
|
||
Spočítat vybrané
|
||
</button>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="threshold-row">
|
||
<label for="threshold-slider">Citlivost (práh shody):</label>
|
||
<input type="range" id="threshold-slider" min="0.40" max="0.95" step="0.01" value="0.70">
|
||
<span id="threshold-value">0.70</span>
|
||
<span class="threshold-hint">nižší = víc nálezů (i falešných), vyšší = jen přesné shody</span>
|
||
</div>
|
||
|
||
<div class="symbols-grid" id="symbols-grid"></div>
|
||
</section>
|
||
|
||
<!-- ── Debug modal ───────────────────────── -->
|
||
<div id="debug-modal" class="modal hidden">
|
||
<div class="modal-content" style="max-width:760px">
|
||
<div class="modal-header">
|
||
<h3 id="debug-title">Debug symbolu</h3>
|
||
<button class="btn-close" id="debug-close" type="button">×</button>
|
||
</div>
|
||
<div id="debug-body" class="debug-body"></div>
|
||
<div class="modal-actions">
|
||
<button class="btn btn-primary" id="debug-ok" type="button">Zavřít</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- ── Crop editor modal ─────────────────── -->
|
||
<div id="crop-modal" class="modal hidden">
|
||
<div class="modal-content">
|
||
<div class="modal-header">
|
||
<h3 id="crop-modal-title">Vyznačte symbol</h3>
|
||
<button class="btn-close" id="crop-close" type="button">×</button>
|
||
</div>
|
||
<p class="modal-hint" id="crop-modal-hint">Kliknutím a tažením vyberte oblast obsahující grafický symbol.</p>
|
||
<div class="crop-name-row hidden" id="crop-name-row">
|
||
<label for="crop-name">Název symbolu:</label>
|
||
<input type="text" id="crop-name" placeholder="např. Zásuvka 230V">
|
||
</div>
|
||
<div class="crop-canvas-wrap" id="crop-canvas-wrap">
|
||
<img id="crop-img" alt="" draggable="false">
|
||
<div id="crop-selection"></div>
|
||
</div>
|
||
<div class="modal-actions">
|
||
<button class="btn btn-secondary" id="crop-cancel" type="button">Zrušit</button>
|
||
<button class="btn btn-primary" id="crop-save" type="button" disabled>Uložit výřez</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- ── Results ───────────────────────────── -->
|
||
<section id="s-results" class="hidden">
|
||
<div class="results-header">
|
||
<div>
|
||
<h2 class="results-title">Výsledky počítání</h2>
|
||
<p class="results-meta" id="results-meta"></p>
|
||
</div>
|
||
<div class="results-actions">
|
||
<button class="btn btn-secondary" id="back-btn" type="button">Zpět na výběr</button>
|
||
<button class="btn btn-secondary" id="pdf-btn" type="button">
|
||
<svg class="btn-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||
<path stroke-linecap="round" stroke-linejoin="round" d="M12 4.5v12m0 0-3.75-3.75M12 16.5l3.75-3.75M4.5 19.5h15"/>
|
||
</svg>
|
||
PDF s vyznačením
|
||
</button>
|
||
<button class="btn btn-primary" id="export-btn" type="button">
|
||
<svg class="btn-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||
<path stroke-linecap="round" stroke-linejoin="round" d="M12 4.5v12m0 0-3.75-3.75M12 16.5l3.75-3.75M4.5 19.5h15"/>
|
||
</svg>
|
||
Exportovat Excel
|
||
</button>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="table-wrap">
|
||
<table>
|
||
<thead>
|
||
<tr>
|
||
<th style="width:80px">Symbol</th>
|
||
<th>Popis</th>
|
||
<th style="width:80px">Počet</th>
|
||
<th style="width:120px">Spolehlivost</th>
|
||
<th>Poznámka</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody id="results-tbody"></tbody>
|
||
</table>
|
||
</div>
|
||
</section>
|
||
|
||
</main>
|
||
|
||
<script src="/static/app.js"></script>
|
||
</body>
|
||
</html>
|