Logo: Pdf Calendar Parsing

Pdf Calendar Parsing

Organisatioun
cxcscmu
pdf-calendar-parsing

Kalenner-Eventer, Zäitbléck an Zäitfënsteren aus PDF-Kalennerdateie mat pdfplumber erauszéien

Iwwersiicht

Editeurcxcscmu
RepositorySkillLearnBench
Skill-Nummpdf-calendar-parsing
Stären
91
Forks
7
Matgeliwwert Dateien
Nëmmen Instruktiounen
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    cxcscmu huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Pdf Calendar Parsing an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/cxcscmu/SkillLearnBench/tree/main/skills/b1-one-shot-claude-haiku-4-5/schedule-planning/pdf-calendar-parsing
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/cxcscmu/SkillLearnBench.git /tmp/SkillLearnBench
mkdir -p .claude/skills
cp -r /tmp/SkillLearnBench/skills/b1-one-shot-claude-haiku-4-5/schedule-planning/pdf-calendar-parsing .claude/skills/pdf-calendar-parsing
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Pdf Calendar Parsing an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Pdf Calendar Parsing automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Pdf Calendar Parsing net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

PDF Calendar Parsing Skill

Overview

This skill covers extracting calendar events and time blocks from PDF calendar documents using pdfplumber, a Python library for extracting text and tables from PDF files.

Installation

bash
pip install pdfplumber

Key Concepts

How pdfplumber Works

  • Opens PDF files and extracts text with position information
  • Can identify text bounding boxes (x0, y0, x1, y1 coordinates)
  • Supports extracting tables and structured data

Calendar Grid Extraction

For a calendar with hourly/time-based layout:

  1. Extract all text from the PDF with position data
  2. Identify time labels (hours on the left axis)
  3. Identify event blocks by text content and bounding boxes
  4. Calculate event duration by comparing Y-coordinates

Code Examples

Basic PDF Opening

python
import pdfplumber

with pdfplumber.open('/root/calendar.pdf') as pdf:
    page = pdf.pages[0]
    text = page.extract_text()
    print(text)

Extracting Text with Positions

python
import pdfplumber

with pdfplumber.open('/root/calendar.pdf') as pdf:
    page = pdf.pages[0]

    # Get all text objects with their positions
    for char in page.chars:
        print(f"Text: {char['text']}, X: {char['x0']}, Y: {char['y0']}")

Identifying Calendar Events

python
import pdfplumber

def extract_calendar_events(pdf_path):
    with pdfplumber.open(pdf_path) as pdf:
        page = pdf.pages[0]

        # Get all text with positions
        text_data = page.extract_text_with_layout()

        # Extract words and their bounding boxes
        words = page.extract_words()

        events = []
        for word in words:
            # word contains: 'text', 'x0', 'y0', 'x1', 'y1', 'size', 'font'
            if word['text'] not in ['12am', '1am', '2am']:  # Skip time labels
                events.append({
                    'text': word['text'],
                    'x0': word['x0'],
                    'y0': word['y0'],
                    'x1': word['x1'],
                    'y1': word['y1']
                })

        return events

Time Extraction from Layout

python
def extract_time_labels(page):
    """Extract hour labels from calendar time axis"""
    words = page.extract_words()
    time_labels = {}

    for word in words:
        text = word['text']
        # Match patterns like "10am", "2pm", "12am"
        if any(text.endswith(suffix) for suffix in ['am', 'pm']):
            y_position = word['y0']  # Vertical position
            time_labels[text] = y_position

    return sorted(time_labels.items(), key=lambda x: x[1])

Calculating Block Duration

python
def get_block_duration(y_start, y_end, time_lines, interval_minutes=15):
    """
    Calculate duration of a calendar block

    time_lines: list of (time_string, y_position) tuples, sorted by y
    interval_minutes: minutes between adjacent horizontal lines
    """
    # Find which time lines bracket this block
    start_time = None
    end_time = None

    for i, (time_str, y_pos) in enumerate(time_lines):
        if y_pos <= y_start and (i+1 >= len(time_lines) or time_lines[i+1][1] > y_start):
            start_time = time_str
        if y_pos <= y_end and (i+1 >= len(time_lines) or time_lines[i+1][1] >= y_end):
            end_time = time_str

    return start_time, end_time

Common Pitfalls

  • Y-coordinates increase downward in PDFs (unlike normal coordinate systems)
  • Text extraction might include artifacts or formatting characters
  • Font sizes and positions can vary; use threshold matching
  • Event blocks may have overlapping text; use grouping strategies

Best Practices

  1. Always verify extracted text against visual inspection
  2. Sort time labels by Y-coordinate to create accurate mapping
  3. Use relative positioning (Y-coordinates) to determine time ranges
  4. Store both start and end times for accuracy
  5. Validate extracted times are within expected calendar hours

Heefeg gestallte Froen

Wat mécht de KI-Skill Pdf Calendar Parsing?

Kalenner-Eventer, Zäitbléck an Zäitfënsteren aus PDF-Kalennerdateie mat pdfplumber erauszéien

Firwat Pdf Calendar Parsing op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Pdf Calendar Parsing besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Pdf Calendar Parsing an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/cxcscmu/SkillLearnBench/tree/main/skills/b1-one-shot-claude-haiku-4-5/schedule-planning/pdf-calendar-parsing an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Pdf Calendar Parsing benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Pdf Calendar Parsing benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Pdf Calendar Parsing domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Pdf Calendar Parsing gratis?

Jo. cxcscmu huet de Skill ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇