Make point wise notes from the given sources

Asking for Preferences
It looks like no files were attached to your message. Could you please upload the file(s) you'd like notes from? Supported formats include PDF, DOCX, TXT, and others.

From this

Reading File
Running Command

python3 -c " import pdfplumber with pdfplumber.open('/home/daytona/workspace/attachments/3e5ae69d-ffe4-4fdc-ab02-a7a2e1ec2327/split_3706508907379180178.pdf') as pdf: print(f'Total pages: {len(pdf.pages)}') for i, page in enumerate(pdf.pages): text = page.extract_text() print(f'--- PAGE {i+1} ---') print(text) print() "

Running Command

python3 -c " import subprocess result = subprocess.run(['which', 'tesseract'], capture_output=True, text=True) print('tesseract:', result.stdout.strip()) result2 = subprocess.run(['which', 'pdftoppm'], capture_output=True, text=True) print('pdftoppm:', result2.stdout.strip()) result3 = subprocess.run(['python3', '-c', 'import pytesseract; print(pytesseract.__version__)'], capture_output=True, text=True) print('pytesseract:', result3.stdout.strip(), result3.stderr.strip()) "

Running Command

mkdir -p /home/daytona/workspace/ocr_pages && pdftoppm -r 200 /home/daytona/workspace/attachments/3e5ae69d-ffe4-4fdc-ab02-a7a2e1ec2327/split_3706508907379180178.pdf /home/daytona/workspace/ocr_pages/page && ls /home/daytona/workspace/ocr_pages/ | head -20

Running Command

python3 -c " import pytesseract from PIL import Image import os, glob pages_dir = '/home/daytona/workspace/ocr_pages' files = sorted(glob.glob(f'{pages_dir}/page-*.ppm')) all_text = [] for f in files: img = Image.open(f) text = pytesseract.image_to_string(img) page_num = os.path.basename(f).replace('page-','').replace('.ppm','') all_text.append(f'=== PAGE {page_num} ===\n{text}\n') full_text = '\n'.join(all_text) with open('/home/daytona/workspace/ocr_output.txt', 'w') as out: out.write(full_text) print('Done. Total chars:', len(full_text)) " 2>&1

Running Command

python3 -c " import pytesseract from PIL import Image # Test just first page img = Image.open('/home/daytona/workspace/ocr_pages/page-01.ppm') text = pytesseract.image_to_string(img) print(repr(text[:500])) " 2>&1

Running Command

python3 << 'EOF' import pytesseract from PIL import Image import glob, os pages_dir = '/home/daytona/workspace/ocr_pages' files = sorted(glob.glob(f'{pages_dir}/page-*.ppm')) all_text = [] # Process pages 1-10 for f in files[:10]: img = Image.open(f) text = pytesseract.image_to_string(img) page_num = os.path.basename(f).replace('page-','').replace('.ppm','') all_text.append(f'=== PAGE {page_num} ===\n{text}\n') with open('/home/daytona/workspace/ocr_batch1.txt', 'w') as out: out.write('\n'.join(all_text)) print('Batch 1 done') EOF

Running Command

python3 << 'EOF' import pytesseract from PIL import Image import glob, os pages_dir = '/home/daytona/workspace/ocr_pages' files = sorted(glob.glob(f'{pages_dir}/page-*.ppm')) all_text = [] for f in files[10:21]: img = Image.open(f) text = pytesseract.image_to_string(img) page_num = os.path.basename(f).replace('page-','').replace('.ppm','') all_text.append(f'=== PAGE {page_num} ===\n{text}\n') with open('/home/daytona/workspace/ocr_batch2.txt', 'w') as out: out.write('\n'.join(all_text)) print('Batch 2 done') EOF

This is a shared conversation. Sign in to Orris to start your own chat.