Sync all skills: Crop detection in doc-converter, n8n- prefix fix
- doc-converter: Pipeline-Architektur, Seitenbild-Cropping Sektion - n8n-skills: n8n- Prefix in allen SKILL.md name-Feldern Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
77d8f6c68c
commit
1b878585f0
@@ -75,6 +75,18 @@ FALSCH: Logo mehrfach im HTML anzeigen
|
|||||||
- Der Content beginnt DIREKT mit dem Dokumenttitel (`<h1>`) und dann Sektion 1
|
- Der Content beginnt DIREKT mit dem Dokumenttitel (`<h1>`) und dann Sektion 1
|
||||||
- **VERBOTEN:** Klickbare Links wie "1. Zweck", "2. Geltungsbereich" im Content!
|
- **VERBOTEN:** Klickbare Links wie "1. Zweck", "2. Geltungsbereich" im Content!
|
||||||
|
|
||||||
|
### Pipeline-Architektur (3-Phasen-Hybrid)
|
||||||
|
|
||||||
|
```
|
||||||
|
PDF → pdftoppm → Seitenbilder
|
||||||
|
Phase 1: recognize_document_structure() (Gemini, 3 Content-Seiten)
|
||||||
|
→ header_bottom_pct, footer_top_pct (Crop-Koordinaten)
|
||||||
|
crop_page_images() → gecroppte Seitenbilder (Header/Footer entfernt)
|
||||||
|
Phase 2a: TOC + Footer generieren
|
||||||
|
Phase 2b: Content pro Seite (gecroppte Bilder, KEINE Header/Footer-Referenz)
|
||||||
|
Post-Processing: normalize_content_structure() → normalize_font_sizes()
|
||||||
|
```
|
||||||
|
|
||||||
### TOC-Sektion-1-Fix
|
### TOC-Sektion-1-Fix
|
||||||
Wenn "1. Inhaltsverzeichnis" die erste Sektion im TOC ist:
|
Wenn "1. Inhaltsverzeichnis" die erste Sektion im TOC ist:
|
||||||
- Die Funktion `fix_toc_section_one()` korrigiert automatisch
|
- Die Funktion `fix_toc_section_one()` korrigiert automatisch
|
||||||
@@ -621,6 +633,35 @@ Automatische Normalisierung nach der Gemini-Konvertierung:
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## Seitenbild-Cropping (Header/Footer-Entfernung)
|
||||||
|
|
||||||
|
### Gemini-basierte Crop-Erkennung (Phase 1)
|
||||||
|
Phase 1 sendet Pre-Content + **3 Content-Seiten** an Gemini. Der RECOGNITION_PROMPT instruiert:
|
||||||
|
- "Vergleiche die Seiten. Alles was sich auf mind. 2 Seiten am oberen/unteren Rand wiederholt = Header/Footer"
|
||||||
|
- Seitenzahlen zählen auch dazu (Position gleich, nur Zahl ändert sich)
|
||||||
|
- `header_bottom_percent` und `footer_top_percent` sind **physische Crop-Grenzen**
|
||||||
|
- Beispiel: Footer-Trennlinie bei 88%, Text 89-91%, Balken 91-92% → `footer_top_percent = 87.5`
|
||||||
|
|
||||||
|
### crop_page_images() — Physisches Cropping
|
||||||
|
Nach Phase 1 werden ALLE Seitenbilder physisch gecroppt:
|
||||||
|
```python
|
||||||
|
crop_page_images(page_images, header_bottom_pct, footer_top_pct, margin_px=5)
|
||||||
|
```
|
||||||
|
- Header/Footer werden abgeschnitten bevor Gemini die Bilder in Phase 2b sieht
|
||||||
|
- Gemini kann NICHT durch Header/Footer verwirrt werden
|
||||||
|
- Prompts enthalten KEINE "IGNORIEREN!"-Sektionen mehr
|
||||||
|
- Stattdessen: "Die Seitenbilder zeigen NUR den Content-Bereich. Konvertiere ALLES."
|
||||||
|
- Original-Bilder bleiben für visuelle Verifikation erhalten
|
||||||
|
|
||||||
|
### Vorteile des Croppings
|
||||||
|
1. **Keine Header/Footer-Artefakte möglich** (Gemini sieht sie nie)
|
||||||
|
2. **Kürzere Prompts** (keine "KOPFZEILE IGNORIEREN" Sektionen)
|
||||||
|
3. **Keine Header/Footer-Referenzbilder** → weniger Tokens → günstiger
|
||||||
|
4. **Tabellenfortsetzung einfacher** (Content reicht bis unterer Rand = Tabelle geht weiter)
|
||||||
|
5. **Weniger Post-Processing** nötig
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Bild-Verarbeitung
|
## Bild-Verarbeitung
|
||||||
|
|
||||||
### Waifu2x Upscaling
|
### Waifu2x Upscaling
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
name: code-javascript
|
name: n8n-code-javascript
|
||||||
description: Write JavaScript code in n8n Code nodes. Use when writing JavaScript in n8n, using $input/$json/$node syntax, making HTTP requests with $helpers, working with dates using DateTime, troubleshooting Code node errors, or choosing between Code node modes.
|
description: Write JavaScript code in n8n Code nodes. Use when writing JavaScript in n8n, using $input/$json/$node syntax, making HTTP requests with $helpers, working with dates using DateTime, troubleshooting Code node errors, or choosing between Code node modes.
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
name: code-python
|
name: n8n-code-python
|
||||||
description: Write Python code in n8n Code nodes. Use when writing Python in n8n, using _input/_json/_node syntax, working with standard library, or need to understand Python limitations in n8n Code nodes.
|
description: Write Python code in n8n Code nodes. Use when writing Python in n8n, using _input/_json/_node syntax, working with standard library, or need to understand Python limitations in n8n Code nodes.
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
name: expression-syntax
|
name: n8n-expression-syntax
|
||||||
description: Validate n8n expression syntax and fix common errors. Use when writing n8n expressions, using {{}} syntax, accessing $json/$node variables, troubleshooting expression errors, or working with webhook data in workflows.
|
description: Validate n8n expression syntax and fix common errors. Use when writing n8n expressions, using {{}} syntax, accessing $json/$node variables, troubleshooting expression errors, or working with webhook data in workflows.
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
name: mcp-tools-expert
|
name: n8n-mcp-tools-expert
|
||||||
description: Expert guide for using n8n-mcp MCP tools effectively. Use when searching for nodes, validating configurations, accessing templates, managing workflows, or using any n8n-mcp tool. Provides tool selection guidance, parameter formats, and common patterns.
|
description: Expert guide for using n8n-mcp MCP tools effectively. Use when searching for nodes, validating configurations, accessing templates, managing workflows, or using any n8n-mcp tool. Provides tool selection guidance, parameter formats, and common patterns.
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
name: node-configuration
|
name: n8n-node-configuration
|
||||||
description: Operation-aware node configuration guidance. Use when configuring nodes, understanding property dependencies, determining required fields, choosing between get_node detail levels, or learning common configuration patterns by node type.
|
description: Operation-aware node configuration guidance. Use when configuring nodes, understanding property dependencies, determining required fields, choosing between get_node detail levels, or learning common configuration patterns by node type.
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
name: validation-expert
|
name: n8n-validation-expert
|
||||||
description: Interpret validation errors and guide fixing them. Use when encountering validation errors, validation warnings, false positives, operator structure issues, or need help understanding validation results. Also use when asking about validation profiles, error types, or the validation loop process.
|
description: Interpret validation errors and guide fixing them. Use when encountering validation errors, validation warnings, false positives, operator structure issues, or need help understanding validation results. Also use when asking about validation profiles, error types, or the validation loop process.
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
name: workflow-patterns
|
name: n8n-workflow-patterns
|
||||||
description: Proven workflow architectural patterns from real n8n workflows. Use when building new workflows, designing workflow structure, choosing workflow patterns, planning workflow architecture, or asking about webhook processing, HTTP API integration, database operations, AI agent workflows, or scheduled tasks.
|
description: Proven workflow architectural patterns from real n8n workflows. Use when building new workflows, designing workflow structure, choosing workflow patterns, planning workflow architecture, or asking about webhook processing, HTTP API integration, database operations, AI agent workflows, or scheduled tasks.
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user