Acts as Othopedics and sports medicine spl , and advice me in detail management including drug management and conservative management of Supraspinatus tendinitis. History of 56 yrs old women , pain while doing overhead exercises and lifting weights , little pain radiation towards bicep area.
"Rotator Cuff Injuries"[MeSH Terms] AND "Exercise Therapy"[MeSH Terms]
AAOS rotator cuff tendinitis guideline nonoperative management NSAID physical therapy
https://www.guidelinecentral.com/guideline/9802
PMID: 42135016
Create a 6-week home exercise plan for supraspinatus tendinopathy
"Rotator Cuff Injuries"[MeSH Terms] AND "Exercise Therapy"[MeSH Terms]
rotator cuff related shoulder pain home exercise programme physiotherapy guideline
| Exercise | Instructions | Dose |
|---|---|---|
| Pendulum | Lean forward with the unaffected hand supported on a table. Let the affected arm hang relaxed. Shift body weight to make gentle forward-back, side-to-side, and small circular movements. | 30-60 seconds each direction, 1-2 rounds |
| Assisted forward raise | Lie on your back. Use the unaffected hand to support and lift the painful arm toward overhead, only as far as comfortable. | 2 sets of 10 |
| Cross-body stretch | Bring the painful arm across the chest at shoulder level. Use the other arm to assist gently. Feel a stretch behind the shoulder, not pinching at the front. | 3 holds of 20-30 seconds |
| Chest stretch | Stand in a doorway with the elbow below shoulder height. Step forward gently. | 3 holds of 20-30 seconds |
| Exercise | Instructions | Dose |
|---|---|---|
| External-rotation isometric | Stand side-on to a wall. Keep elbow bent at 90 degrees and tucked to the side with a small towel between elbow and ribs. Press the back of the hand gently outward into the wall without moving the arm. | 8-10 holds of 5-10 seconds |
| Abduction isometric | Stand with the outer upper arm lightly against a wall, elbow at side. Press gently outward into wall without moving. | 8-10 holds of 5-10 seconds |
| Scapular setting | Sit or stand tall. Gently draw shoulder blades back and slightly down, without forcefully squeezing or shrugging. | 2 sets of 10, hold 5 seconds |
| Wall slides, short range | Forearms on wall, elbows below shoulder level. Slide arms upward only to a comfortable range, keeping shoulders relaxed. | 2 sets of 8 |
| Exercise | Instructions | Dose |
|---|---|---|
| Band external rotation | Attach band at elbow height. Keep elbow at side with towel roll. Rotate forearm outward, then return slowly. | 3 sets of 10-15 |
| Band internal rotation | Same setup, but pull forearm inward toward abdomen. Keep elbow at side. | 2-3 sets of 10-15 |
| Band row | Attach band at chest level. Pull elbows back close to body. Pause while drawing shoulder blades gently back and down. Do not shrug. | 3 sets of 10-15 |
| Wall push-up plus | Hands on wall slightly wider than shoulders. Do a shallow wall push-up. At the top, gently push the chest away to let shoulder blades move forward. | 2-3 sets of 8-12 |
| Scaption without weight | Stand with thumb pointing up. Lift arm about 30-45 degrees forward from the side, not directly out to the side. Raise only to shoulder height or less. | 2 sets of 8-12 |
| Side-lying external rotation | Lie on the unaffected side. Keep affected elbow bent at 90 degrees and tucked against ribs. Rotate forearm upward. Start with no weight, then use 0.5-1 kg if easy. | 2-3 sets of 8-12 |
| Exercise | Instructions | Dose |
|---|---|---|
| Weighted scaption | Same movement as above, thumb up. Use 0.5-2 kg. Stop at shoulder height. | 3 sets of 8-12 |
| Bent-over row | Support the unaffected arm on a bench/chair. Keep the painful-side elbow near the body and pull a light weight toward the hip. | 3 sets of 8-12 |
| Incline push-up | Progress from wall to a kitchen counter or sturdy table. Keep elbows below shoulder level and body straight. | 2-3 sets of 6-10 |
| Wall slide progression | Use a light band around wrists or a light weight only if pain-free. Slide upward with controlled shoulder blades. | 2 sets of 8-10 |
| Band external rotation at 45 degrees | Raise upper arm slightly away from body, about 30-45 degrees, elbow bent. Externally rotate gently against band. Do not progress to 90 degrees yet if it pinches. | 2 sets of 8-12 |
| Carry | Hold a light dumbbell/kettlebell at the side with good posture. Walk slowly, keeping shoulder relaxed. | 3 carries of 30-45 seconds |
| Day | Plan |
|---|---|
| Monday | Strength program + mobility |
| Tuesday | Mobility only, walking/lower body exercise |
| Wednesday | Strength program + mobility |
| Thursday | Mobility only |
| Friday | Strength program + mobility |
| Saturday | Mobility only or easy cardio |
| Sunday | Rest or gentle mobility |
Create a 6-week home exercise plan for supraspinatus tendinopathy
"Rotator Cuff Injuries"[MeSH Terms] AND "Exercise Therapy"[MeSH Terms]
rotator cuff related shoulder pain home exercise programme physiotherapy guideline
| Exercise | How to do it | Dose |
|---|---|---|
| Pendulum | Lean forward, support yourself with the good arm on a table, and let the painful arm hang relaxed. Shift body weight to make small circles. | 30-60 sec each direction, 1-2 rounds |
| Assisted arm raise | Lie on your back. Use the unaffected hand to help lift the painful arm toward overhead. Stay below sharp pain. | 2 sets of 10 |
| Cross-body stretch | Bring the painful arm gently across the chest. Use the other arm to assist. Stretch should be felt at the back of shoulder. | 3 x 20-30 sec |
| Doorway chest stretch | Elbow stays below shoulder height. Step forward gently until a chest stretch is felt. | 3 x 20-30 sec |
| Exercise | How to do it | Dose |
|---|---|---|
| External rotation isometric | Elbow bent 90 degrees and tucked to your side with a towel between elbow and ribs. Press the back of the hand outward into a wall without moving the arm. | 8-10 holds x 5-10 sec |
| Abduction isometric | Stand with outer upper arm against wall, elbow at your side. Press lightly outward into wall. | 8-10 holds x 5-10 sec |
| Scapular setting | Sit or stand tall. Gently bring shoulder blades back and slightly down. Do not forcefully squeeze or shrug. | 2 sets of 10, hold 5 sec |
| Short wall slides | Forearms on wall with elbows below shoulder height. Slide upward only in a comfortable range. | 2 sets of 8 |
| Exercise | How to do it | Dose |
|---|---|---|
| Band external rotation | Band at elbow height. Keep elbow tucked to side. Rotate forearm outward slowly. | 3 sets of 10-15 |
| Band internal rotation | Same position, but pull forearm inward toward abdomen. | 2-3 sets of 10-15 |
| Band row | Pull band toward the ribs with elbows close to body. Finish with shoulder blades gently back and down. | 3 sets of 10-15 |
| Wall push-up plus | Do a shallow wall push-up. At the top, gently push the chest away from wall to move shoulder blades forward. | 2-3 sets of 8-12 |
| Scaption | Thumb points upward. Lift the arm 30-45 degrees forward from the side, not directly out sideways. Stay at or below shoulder height. Begin without weight. | 2 sets of 8-12 |
| Side-lying external rotation | Lie on the unaffected side. Affected elbow is bent and against ribs. Rotate forearm upward. Begin without weight, then add 0.5-1 kg if comfortable. | 2-3 sets of 8-12 |
| Exercise | How to do it | Dose |
|---|---|---|
| Weighted scaption | Same as before, holding 0.5-2 kg. Thumb up. Raise no higher than shoulder level. | 3 sets of 8-12 |
| Bent-over row | Support the good arm on a chair or table. Pull a light dumbbell toward the painful-side hip, keeping elbow near body. | 3 sets of 8-12 |
| Incline push-up | Progress from wall to a counter or stable table. Keep elbows below shoulder level. | 2-3 sets of 6-10 |
| External rotation at 30-45 degrees | Lift the elbow slightly away from the body, not above shoulder level. Use a light band and externally rotate. | 2 sets of 8-12 |
| Farmer carry | Hold a light weight at the affected side, stand tall, shoulder relaxed, and walk slowly. | 3 x 30-45 sec |
| Wall-slide progression | Slide arms up wall with light band around wrists only if the basic wall slide is pain-free. | 2 sets of 8-10 |
Add illustrations for each shoulder exercise
illustrated shoulder rehabilitation exercises pendulum assisted shoulder flexion cross body stretch doorway stretch
illustrated rotator cuff exercises external rotation resistance band rows wall slide wall push up scapular setting
illustrated shoulder exercises scaption side lying external rotation incline push up farmer carry
shoulder exercise illustrations pendulum external rotation wall slide scaption physiotherapy
A clear medical rehabilitation instruction sheet with four separate labeled exercise panels for supraspinatus tendinopathy: pendulum exercise, assisted shoulder forward raise lying on back, cross-body shoulder stretch, and doorway chest stretch. Show an adult woman in simple athletic clothes, correct posture, movement arrows, and no decorative content.
A clear medical rehabilitation instruction sheet with four separate labeled exercise panels for supraspinatus tendinopathy: external rotation isometric against a wall with elbow at side and towel under elbow, shoulder abduction isometric against wall, scapular setting, and short-range forearm wall slides. Show an adult woman in simple athletic clothes, correct posture, movement arrows, and no decorative content.
A clear medical rehabilitation instruction sheet with four separate labeled exercise panels for supraspinatus tendinopathy: resistance band external rotation with elbow at side, resistance band internal rotation with elbow at side, resistance band rows, wall push-up plus, and thumb-up scaption below shoulder height. Show an adult woman in simple athletic clothes, correct posture, movement arrows, and no decorative content.
A clear medical rehabilitation instruction sheet with five separate labeled exercise panels for supraspinatus tendinopathy: side-lying external rotation holding a light weight, weighted thumb-up scaption below shoulder height, bent-over dumbbell row, incline push-up at a counter, external rotation with elbow 30 to 45 degrees away from body, and farmer carry. Show an adult woman in simple athletic clothes, correct posture, movement arrows, and no decorative content.




Create a printable PDF of this exercise plan
~/
mkdir -p "/tmp/workspace/supraspinatus-exercise-plan/assets" "/tmp/workspace/supraspinatus-exercise-plan/src" "/tmp/workspace/supraspinatus-exercise-plan/output" && curl -L --fail --silent --show-error "https://cdn.orris.care/image-gen/bcc21237eeda44ab8b9e752494e3e253.png" -o "/tmp/workspace/supraspinatus-exercise-plan/assets/weeks1_2_mobility.png" && curl -L --fail --silent --show-error "https://cdn.orris.care/image-gen/9beb325d03fd49f4865925d63a6949ca.png" -o "/tmp/workspace/supraspinatus-exercise-plan/assets/weeks1_2_activation.png" && curl -L --fail --silent --show-error "https://cdn.orris.care/image-gen/dc04a6a819ce44a58168295d29e24282.png" -o "/tmp/workspace/supraspinatus-exercise-plan/assets/weeks3_4_bands.png" && curl -L --fail --silent --show-error "https://cdn.orris.care/image-gen/452af0cb76f3486291d505c898e01fcc.png" -o "/tmp/workspace/supraspinatus-exercise-plan/assets/weeks5_6_functional.png" && file "/tmp/workspace/supraspinatus-exercise-plan/assets/"*.png
python - <<'PY' from pathlib import Path p=Path('/tmp/workspace/supraspinatus-exercise-plan/src/create_pdf.py') p.write_text(r'''from reportlab.lib import colors from reportlab.lib.pagesizes import A4 from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle from reportlab.lib.enums import TA_CENTER from reportlab.lib.units import mm from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Image, Table, TableStyle, PageBreak, KeepTogether from reportlab.pdfbase.ttfonts import TTFont from reportlab.pdfbase import pdfmetrics from reportlab.lib.colors import HexColor from reportlab.pdfbase.pdfmetrics import stringWidth from pathlib import Path BASE=Path('/tmp/workspace/supraspinatus-exercise-plan') OUT=BASE/'output'/'Supraspinatus_Tendinopathy_6_Week_Home_Exercise_Plan.pdf' ASSETS=BASE/'assets' NAVY=HexColor('#17324D'); BLUE=HexColor('#1E6A8A'); TEAL=HexColor('#008C8C'); PALE=HexColor('#EAF5F7'); LIGHT=HexColor('#F5F8FA'); ORANGE=HexColor('#E07A27'); RED=HexColor('#A32F2F'); GREY=HexColor('#50606D') styles=getSampleStyleSheet() styles.add(ParagraphStyle(name='TitleX', parent=styles['Title'], fontName='Helvetica-Bold', fontSize=22, leading=26, textColor=NAVY, alignment=TA_CENTER, spaceAfter=8)) styles.add(ParagraphStyle(name='SubX', parent=styles['Normal'], fontName='Helvetica', fontSize=10.2, leading=14, textColor=GREY, alignment=TA_CENTER, spaceAfter=10)) styles.add(ParagraphStyle(name='H1X', parent=styles['Heading1'], fontName='Helvetica-Bold', fontSize=15, leading=18, textColor=NAVY, spaceBefore=8, spaceAfter=7)) styles.add(ParagraphStyle(name='H2X', parent=styles['Heading2'], fontName='Helvetica-Bold', fontSize=12, leading=15, textColor=BLUE, spaceBefore=6, spaceAfter=4)) styles.add(ParagraphStyle(name='BodyX', parent=styles['BodyText'], fontName='Helvetica', fontSize=9.1, leading=12.5, spaceAfter=4)) styles.add(ParagraphStyle(name='SmallX', parent=styles['BodyText'], fontName='Helvetica', fontSize=8.2, leading=10.5, textColor=GREY)) styles.add(ParagraphStyle(name='CellX', parent=styles['BodyText'], fontName='Helvetica', fontSize=8.2, leading=10.1)) styles.add(ParagraphStyle(name='CellBoldX', parent=styles['BodyText'], fontName='Helvetica-Bold', fontSize=8.2, leading=10.1, textColor=NAVY)) def P(text, style='BodyX'): return Paragraph(text, styles[style]) def footer(canvas, doc): canvas.saveState() canvas.setStrokeColor(HexColor('#C9D6DD')); canvas.line(18*mm, 13*mm, 192*mm, 13*mm) canvas.setFont('Helvetica', 7.7); canvas.setFillColor(GREY) canvas.drawString(18*mm, 8.5*mm, 'Supraspinatus tendinopathy: 6-week home exercise plan') canvas.drawRightString(192*mm, 8.5*mm, f'Page {doc.page}') canvas.restoreState() def banner(text, col=PALE): t=Table([[P(text,'BodyX')]], colWidths=[174*mm]) t.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,-1),col),('BOX',(0,0),(-1,-1),0.5,HexColor('#9CBCC5')),('LEFTPADDING',(0,0),(-1,-1),8),('RIGHTPADDING',(0,0),(-1,-1),8),('TOPPADDING',(0,0),(-1,-1),6),('BOTTOMPADDING',(0,0),(-1,-1),6)])) return t def ex_table(rows): data=[[P('<b>Exercise</b>','CellBoldX'),P('<b>How to do it</b>','CellBoldX'),P('<b>Dose</b>','CellBoldX')]] for a,b,c in rows: data.append([P(a,'CellBoldX'),P(b,'CellX'),P(c,'CellX')]) t=Table(data,colWidths=[38*mm,99*mm,37*mm],repeatRows=1) ts=[('BACKGROUND',(0,0),(-1,0),BLUE),('TEXTCOLOR',(0,0),(-1,0),colors.white),('VALIGN',(0,0),(-1,-1),'TOP'),('GRID',(0,0),(-1,-1),0.3,HexColor('#B7C8D0')),('LEFTPADDING',(0,0),(-1,-1),5),('RIGHTPADDING',(0,0),(-1,-1),5),('TOPPADDING',(0,0),(-1,-1),5),('BOTTOMPADDING',(0,0),(-1,-1),5)] for i in range(1,len(data)): if i%2==0: ts.append(('BACKGROUND',(0,i),(-1,i),LIGHT)) t.setStyle(TableStyle(ts)); return t def add_img(name, cap): im=Image(str(ASSETS/name), width=169*mm, height=92.2*mm) return KeepTogether([im, Spacer(1,2*mm), P(cap,'SmallX'), Spacer(1,3*mm)]) story=[] story += [Spacer(1,6*mm), P('6-Week Home Exercise Plan','TitleX'), P('For supraspinatus tendinopathy / rotator cuff-related shoulder pain','SubX')] story.append(banner('<b>Purpose:</b> gradually restore comfortable shoulder movement, rotator cuff strength, and shoulder-blade control. This guide is for a stable, non-traumatic presentation. It does not replace an individual examination by a physiotherapist or clinician.')) story += [Spacer(1,5*mm), P('Before you begin','H1X')] story.append(ex_table([ ('Equipment','A light resistance band, 0.5-2 kg dumbbell or water bottle, a wall, a towel, and a stable chair/table.',''), ('Frequency','Mobility: 5-6 days/week. Strength: 3 nonconsecutive days/week, such as Monday, Wednesday, Friday.',''), ('Pain rule','Keep pain mild, about 0-3/10. A mild ache is acceptable if it settles within 30 minutes and is not worse the next morning.',''), ('Flare-up rule','If pain is sharp, exceeds 4/10, catches, or is worse the next day, reduce range, repetitions, or resistance by 30-50%.',''), ('Avoid initially','Avoid painful overhead presses, upright rows, dips, heavy lateral raises, and painful push-ups during the first 4 weeks.','') ])) story += [Spacer(1,5*mm), P('Seek in-person assessment promptly if','H2X'), P('You develop sudden inability to lift the arm, a pop with bruising or deformity, increasing weakness, fever/redness/warmth, numbness or tingling, pain below the elbow, or severe unremitting night pain. If there is no clear improvement after six weeks, arrange review.','BodyX'), Spacer(1,4*mm), P('Weekly schedule','H2X')] story.append(ex_table([('Monday','Strength program + mobility',''),('Tuesday','Mobility only, walking or lower-body exercise',''),('Wednesday','Strength program + mobility',''),('Thursday','Mobility only',''),('Friday','Strength program + mobility',''),('Saturday','Mobility only or easy cardio',''),('Sunday','Rest or gentle mobility','')])) story.append(PageBreak()) story += [P('Weeks 1-2: reduce irritation and restore motion','H1X'), P('<b>Goal:</b> keep the shoulder moving comfortably and begin low-load activation. Avoid painful loaded overhead activity.','BodyX'), P('Daily mobility routine','H2X')] story.append(ex_table([ ('Pendulum','Lean forward with the unaffected hand supported on a table. Let the painful arm hang relaxed. Shift body weight to make small circles and gentle swings.','30-60 sec each direction, 1-2 rounds'), ('Assisted arm raise','Lie on your back. Use the unaffected hand to guide the painful arm upward. Stop before sharp pain.','2 sets of 10'), ('Cross-body stretch','Gently bring the painful arm across the chest. You should feel stretch at the back of the shoulder, not a front pinch.','3 holds of 20-30 sec'), ('Doorway chest stretch','Place forearm on a doorway with elbow below shoulder height. Step forward gently.','3 holds of 20-30 sec')])) story += [Spacer(1,4*mm), add_img('weeks1_2_mobility.png','Illustrations: pendulum, assisted forward raise, cross-body stretch, and doorway chest stretch.'), P('Strength and control: 3 days/week','H2X')] story.append(ex_table([ ('External rotation isometric','Elbow bent to 90 degrees at the side with a small towel between elbow and ribs. Press the back of the hand gently out into a wall without arm movement.','8-10 holds of 5-10 sec'), ('Abduction isometric','Stand with the outer upper arm against a wall, elbow at side. Press outward gently without moving.','8-10 holds of 5-10 sec'), ('Scapular setting','Stand tall. Gently guide shoulder blades back and slightly down. Do not forcefully squeeze or shrug.','2 sets of 10; hold 5 sec'), ('Short wall slides','Forearms on wall, elbows below shoulder height. Slide upward only in a comfortable range.','2 sets of 8')])) story += [Spacer(1,4*mm), add_img('weeks1_2_activation.png','Illustrations: external rotation isometric, abduction isometric, scapular setting, and short wall slides.')] story.append(PageBreak()) story += [P('Weeks 3-4: build rotator cuff and shoulder-blade strength','H1X'), P('<b>Progress when:</b> symptoms settle quickly after activity and the Week 1-2 exercises are tolerated. Continue the mobility routine daily. Complete this strengthening plan 3 days/week.','BodyX')] story.append(ex_table([ ('Band external rotation','Band at elbow height. Keep elbow against the side with towel support. Rotate forearm outward slowly, then return with control.','3 sets of 10-15'), ('Band internal rotation','Same position. Pull forearm inward toward abdomen, keeping elbow close to body.','2-3 sets of 10-15'), ('Band row','Pull elbows toward ribs. Finish with shoulder blades gently back and down. Keep neck relaxed.','3 sets of 10-15'), ('Wall push-up plus','Perform a shallow wall push-up. At the top, gently push chest away from the wall to allow the shoulder blades to move forward.','2-3 sets of 8-12'), ('Scaption','Thumb points upward. Raise the arm 30-45 degrees forward from the side, initially without weight. Stay at or below shoulder height.','2 sets of 8-12'), ('Side-lying external rotation','Lie on unaffected side, affected elbow bent and against ribs. Rotate forearm upward. Begin without weight, then add 0.5-1 kg if easy.','2-3 sets of 8-12')])) story += [Spacer(1,4*mm), add_img('weeks3_4_bands.png','Illustrations: band external/internal rotation, band rows, wall push-up plus, and thumb-up scaption.'), banner('<b>Progression:</b> if the final repetitions are comfortable and there is no next-day flare, progress to a slightly stronger band or add 0.25-0.5 kg.',HexColor('#FDF1E6'))] story.append(PageBreak()) story += [P('Weeks 5-6: functional strength and graded return to lifting','H1X'), P('<b>Progress when:</b> motion is nearly full and comfortable, resting pain is low, and the Week 3-4 plan does not cause next-day worsening. Keep band rotations, rows, and wall push-up plus twice weekly. Add the following 3 days/week.','BodyX')] story.append(ex_table([ ('Weighted scaption','Hold 0.5-2 kg with thumb upward. Raise 30-45 degrees forward from the side. Stop at shoulder height.','3 sets of 8-12'), ('Bent-over row','Support unaffected hand on chair/table. Pull light weight toward the painful-side hip with elbow close to body.','3 sets of 8-12'), ('Incline push-up','Progress from wall to counter or stable table. Keep elbows below shoulder level and maintain a straight body line.','2-3 sets of 6-10'), ('External rotation at 30-45 degrees','Lift elbow slightly away from body, but well below shoulder height. Use a light band and rotate outward without shrugging.','2 sets of 8-12'), ('Farmer carry','Hold a light weight at the painful side, stand tall, keep shoulder relaxed, and walk slowly.','3 carries of 30-45 sec'), ('Wall slide progression','If basic wall slides are pain-free, add a light band around wrists during the slide.','2 sets of 8-10')])) story += [Spacer(1,4*mm), add_img('weeks5_6_functional.png','Illustrations: side-lying external rotation, weighted scaption, bent-over row, incline push-up, external rotation progression, and farmer carry.'), P('Return to gym overhead lifting','H2X'), P('Start only when daily overhead reach is nearly pain-free and the above exercises do not cause a next-day flare. Begin with a neutral-grip dumbbell press or landmine press at about 30-50% of the previous load, for 2 sets of 8-12 once or twice weekly. Increase only one variable at a time, preferably no more than 10% per week. Delay upright rows, deep dips, heavy barbell overhead press, and heavy lateral raises until later.','BodyX')] story += [Spacer(1,4*mm), banner('<b>Technique reminder:</b> move slowly, about 2 seconds lifting and 3 seconds lowering. Good form and steady progression matter more than heavy resistance.',HexColor('#EAF5F7'))] story += [Spacer(1,5*mm), P('Clinical note','H2X'), P('This exercise plan is educational and is not a diagnosis or prescription. A clinician should individualize the plan if there is diabetes, inflammatory arthritis, prior shoulder surgery, a suspected rotator cuff tear, neck-related symptoms, or substantial loss of movement.','SmallX')] doc=SimpleDocTemplate(str(OUT),pagesize=A4,rightMargin=18*mm,leftMargin=18*mm,topMargin=15*mm,bottomMargin=18*mm,title='Supraspinatus Tendinopathy - 6 Week Home Exercise Plan',author='Orris') doc.build(story,onFirstPage=footer,onLaterPages=footer) print(OUT) ''') PY python "/tmp/workspace/supraspinatus-exercise-plan/src/create_pdf.py" ls -lh "/tmp/workspace/supraspinatus-exercise-plan/output/Supraspinatus_Tendinopathy_6_Week_Home_Exercise_Plan.pdf"
python - <<'PY' from pypdf import PdfReader from pathlib import Path p=Path('/tmp/workspace/supraspinatus-exercise-plan/output/Supraspinatus_Tendinopathy_6_Week_Home_Exercise_Plan.pdf') r=PdfReader(str(p)) print('exists:',p.exists(),'bytes:',p.stat().st_size,'pages:',len(r.pages)) for i,page in enumerate(r.pages,1): text=page.extract_text() or '' print(f'PAGE {i}: chars={len(text)} | '+text[:140].replace('\n',' | ')) assert len(r.pages)==4 assert all(len((page.extract_text() or ''))>400 for page in r.pages) assert 'Weeks 1-2' in (r.pages[1].extract_text() or '') assert 'Weeks 3-4' in (r.pages[2].extract_text() or '') assert 'Weeks 5-6' in (r.pages[3].extract_text() or '') PY
~/supraspinatus-exercise-plan/src/create_pdf.py
Successfully replaced 1 instance(s) of the string in '/tmp/workspace/supraspinatus-exercise-plan/src/create_pdf.py'
python "/tmp/workspace/supraspinatus-exercise-plan/src/create_pdf.py" && python - <<'PY' from pypdf import PdfReader from pathlib import Path p=Path('/tmp/workspace/supraspinatus-exercise-plan/output/Supraspinatus_Tendinopathy_6_Week_Home_Exercise_Plan.pdf') r=PdfReader(str(p)) print('exists:',p.exists(),'bytes:',p.stat().st_size,'pages:',len(r.pages)) for i,page in enumerate(r.pages,1): text=page.extract_text() or '' print(f'PAGE {i}: chars={len(text)} | '+text[:120].replace('\n',' | ')) assert 4 <= len(r.pages) <= 5 alltext='\n'.join((p.extract_text() or '') for p in r.pages) for term in ['Weeks 1-2','Weeks 3-4','Weeks 5-6','Pendulum','Band external rotation','Weighted scaption']: assert term in alltext, term assert p.stat().st_size > 100000 PY
~/supraspinatus-exercise-plan/src/create_pdf.py
Successfully replaced 1 instance(s) of the string in '/tmp/workspace/supraspinatus-exercise-plan/src/create_pdf.py'
python "/tmp/workspace/supraspinatus-exercise-plan/src/create_pdf.py" && python - <<'PY' from pypdf import PdfReader from pathlib import Path p=Path('/tmp/workspace/supraspinatus-exercise-plan/output/Supraspinatus_Tendinopathy_6_Week_Home_Exercise_Plan.pdf') r=PdfReader(str(p)) print('exists:',p.exists(),'bytes:',p.stat().st_size,'pages:',len(r.pages)) for i,page in enumerate(r.pages,1): text=page.extract_text() or '' print(f'PAGE {i}: chars={len(text)} | '+text[:120].replace('\n',' | ')) alltext='\n'.join((page.extract_text() or '') for page in r.pages) for term in ['Weeks 1-2','Weeks 3-4','Weeks 5-6','Pendulum','Band external rotation','Weighted scaption']: assert term in alltext, term assert p.exists() and p.stat().st_size > 100000 assert 4 <= len(r.pages) <= 5 PY
~/supraspinatus-exercise-plan/src/create_pdf.py
Successfully replaced 1 instance(s) of the string in '/tmp/workspace/supraspinatus-exercise-plan/src/create_pdf.py'
python "/tmp/workspace/supraspinatus-exercise-plan/src/create_pdf.py" && python - <<'PY' from pypdf import PdfReader from pathlib import Path p=Path('/tmp/workspace/supraspinatus-exercise-plan/output/Supraspinatus_Tendinopathy_6_Week_Home_Exercise_Plan.pdf') r=PdfReader(str(p)) print('exists:',p.exists(),'bytes:',p.stat().st_size,'pages:',len(r.pages)) for i,page in enumerate(r.pages,1): text=page.extract_text() or '' print(f'PAGE {i}: chars={len(text)} | '+text[:110].replace('\n',' | ')) alltext='\n'.join((page.extract_text() or '') for page in r.pages) for term in ['Weeks 1-2','Weeks 3-4','Weeks 5-6','Pendulum','Band external rotation','Weighted scaption']: assert term in alltext, term assert p.exists() and p.stat().st_size > 100000 assert len(r.pages) == 5 PY
Supraspinatus Tendinopathy 6 Week Home Exercise Plan
PDF Document · PDF