Run3 pdf calendar parser
Parses /root/calendar.pdf to extract appointment timings, color-coded blocks, and time-axis mappings using pdfplumber.From its SKILL.md
npx -y skills add cxcscmu/SkillLearnBench --skill run3_pdf_calendar_parserAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
SKILL.md
1.4 KB, 294 tokens by cl100k_base, as published. Nobody here has run it
- Initialize PDF Analysis: Use
pdfplumberto open/root/calendar.pdf. Iterate through pages to extract both text objects (to locate time labels) and graphical shapes (to identify rectangles). - Calculate Scaling: Identify horizontal lines in the PDF. Calculate
pixels_per_15minby measuring the vertical distance between two consecutive horizontal time-marker lines. - Map Coordinates to Time:
- Extract the text timestamps (e.g., "09:00 AM", "09:15 AM") and their corresponding Y-coordinates.
- Create a reference dictionary mapping Y-offsets to absolute time.
- Calculate the start time of the calendar grid based on the top-most time label.
- Identify Appointments and Colors:
- Extract rectangles from
page.rects. Accessrect['non_stroking_color']orrect['stroking_color']to identify color properties. - Classify rectangles: if color is blue (check for specific RGB/CMYK values representing the "low-priority" color), tag as
flexible. Otherwise, tag asbusy. - Convert rectangle Y-coordinates into
start_timeandend_timeusing thepixels_per_15minratio.
- Extract rectangles from
- Output: Return a list of objects containing
start,end, andis_flexible(boolean) for each block.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.