make sadvritta poster for ayurgrama 3.0 and add hygienes point in simple language for villagers and children
A vibrant, colorful Ayurvedic health poster titled "SADVRITTA" for "Ayurgrama 3.0" — a village and children's health awareness campaign. The poster features a traditional Indian village background with a banyan tree, clean huts, and nature. In the center, a cheerful Indian family (grandparent, parents, children) practicing healthy daily routines. Include illustrated hygiene tips in simple pictorial format with Hindi/English labels: 1. Wake up early at sunrise (brahmamuhurta) 2. Brush teeth with neem twig / clean teeth 3. Wash hands before eating 4. Drink clean water (copper vessel) 5. Eat fresh, simple food — fruits and vegetables 6. Daily exercise / yoga stretching 7. Keep surroundings clean — no littering 8. Sleep early at night 9. Trim nails, keep hair clean 10. Use toilet, not open ground Use warm earthy colors — saffron, green, turmeric yellow, sky blue. Traditional Indian folk art / warli-inspired border decorations. Ayurveda leaf and lotus symbols. Text at top: "SADVRITTA - सद्वृत्त" and bottom: "AYURGRAMA 3.0 — स्वस्थ गाँव, सुखी जीवन". Friendly, educational, suitable for children and villagers.

make sadvritta poster for ayurgrama 3.0 and add hygiene points in simple language for villagers and children explain all points in Poster and add menstrual hygiene and personal hygiene point also for std 9th and 10th students
A detailed, colorful, educational Ayurvedic health awareness poster titled "SADVRITTA - सद्वृत्त" for "AYURGRAMA 3.0" targeted at villagers, children, and 9th-10th standard students. Layout: Tall portrait poster with multiple illustrated sections. TOP BANNER: Saffron-green gradient header with lotus and neem leaf border. Title: "SADVRITTA - सद्वृत्त" (big bold text), subtitle: "AYURGRAMA 3.0 | स्वस्थ जीवन की ओर" SECTION 1 - DAILY ROUTINE (सुबह की दिनचर्या): Small cartoon Indian child waking up at sunrise, brushing teeth with neem twig, washing face with clean water, doing yoga/surya namaskar SECTION 2 - FOOD HYGIENE (आहार स्वच्छता): Washing hands before eating, drinking clean water from copper pot, eating fresh fruits and vegetables, avoiding junk food SECTION 3 - PERSONAL HYGIENE (व्यक्तिगत स्वच्छता): Bathing daily, trimming nails short, keeping hair clean, wearing clean clothes, using toilet not open fields SECTION 4 - MENSTRUAL HYGIENE (मासिक धर्म स्वच्छता) — for teenage girls, 9th-10th students: Illustrated with respectful, modest cartoon of teenage girl. Points shown as icons: Use clean sanitary pad or clean cloth, change pad every 4-6 hours, wash hands before and after, bathe daily during periods, dispose pad properly wrapped in paper, eat nutritious iron-rich food (green vegetables, jaggery, dates), rest when needed, no shame — it is natural and healthy, consult female teacher or doctor if pain is severe SECTION 5 - ENVIRONMENT HYGIENE: Throw garbage in dustbin, no open urination/defecation, no waterlogging (mosquitoes breed), plant trees BOTTOM FOOTER: Green banner — "स्वस्थ गाँव, सुखी जीवन | AYURGRAMA 3.0" with Ayurveda leaf symbol and Indian flag colors Overall style: Bright, cheerful Indian folk art with warli-style border, saffron-turmeric-green-sky blue color palette, bilingual Hindi and English labels, friendly illustrations suitable for school students and villagers. Clean, readable, educational.

| आदत | सरल भाषा में |
|---|---|
| जल्दी उठो | सूरज निकलने से पहले उठें - शरीर ताजा रहता है |
| दाँत साफ करो | नीम दातुन या ब्रश से सुबह-शाम दाँत साफ करें |
| जीभ साफ करो | जीभ खुरचनी से जीभ की सफाई करें - मुँह की बदबू नहीं आती |
| ठंडे पानी से आँखें धोओ | आँखों की रोशनी अच्छी रहती है |
| व्यायाम / योग करो | रोज 30 मिनट चलना, योग या सूर्य नमस्कार करें |
| आदत | सरल भाषा में |
|---|---|
| खाने से पहले हाथ धोओ | साबुन से 20 सेकंड हाथ धोएं - बीमारी दूर रहती है |
| ताजा खाना खाओ | बासी, पैकेट बंद, तला हुआ खाना मत खाओ |
| साफ पानी पीओ | उबला हुआ या छना हुआ पानी ही पीएं |
| धीरे-धीरे खाओ | खाना चबा-चबाकर खाएं - पाचन अच्छा होता है |
| हरी सब्जी और फल खाओ | शरीर को ताकत मिलती है |
| आदत | सरल भाषा में |
|---|---|
| रोज नहाओ | शरीर के कीटाणु दूर होते हैं, त्वचा स्वस्थ रहती है |
| नाखून काटो | नाखून लंबे रखने से उनमें गंदगी जमती है - बीमारी होती है |
| बाल साफ रखो | हफ्ते में 2 बार बाल धोएं, कंघी करें |
| साफ कपड़े पहनो | रोज धुले कपड़े पहनें |
| शौचालय का उपयोग करो | खुले में शौच मत करो - बीमारियाँ फैलती हैं |
| शौच के बाद हाथ धोओ | साबुन से अच्छी तरह हाथ धोएं |
| नियम | सरल भाषा में |
|---|---|
| साफ पैड या कपड़े का उपयोग करो | गंदे कपड़े से इन्फेक्शन होता है |
| हर 4-6 घंटे में पैड बदलो | ज्यादा देर तक एक ही पैड मत रखो |
| पैड बदलने से पहले-बाद हाथ धोओ | हाथों की सफाई जरूरी है |
| पीरियड्स में रोज नहाओ | नहाना जरूरी है - इससे इन्फेक्शन नहीं होता |
| इस्तेमाल किया पैड सही तरह फेंको | कागज में लपेटकर कूड़ेदान में डालो, खुले में मत फेंको |
| आयरन वाला खाना खाओ | पालक, गुड़, खजूर, चना खाओ - खून की कमी नहीं होगी |
| आराम करो | अगर दर्द हो तो आराम करो, गरम पानी की थैली रखो |
| किसी को बताने से मत डरो | अपनी महिला टीचर, माँ या आशा दीदी से बात करो |
| डॉक्टर से मिलो | बहुत ज्यादा दर्द या अनियमित पीरियड्स हो तो डॉक्टर को दिखाओ |
| आदत | सरल भाषा में |
|---|---|
| कूड़ा डस्टबिन में डालो | गाँव और घर साफ रखो |
| पानी जमा मत होने दो | रुके हुए पानी में मच्छर पैदा होते हैं - मलेरिया होता है |
| घर के आसपास सफाई रखो | हफ्ते में एक बार घर के आगे-पीछे साफ करो |
| पेड़ लगाओ | हरियाली से हवा साफ रहती है |
🌱 "स्वस्थ गाँव, सुखी जीवन" AYURGRAMA 3.0 | Sadvritta अपनाओ, निरोगी जीवन पाओ
it's for villagers so make it in hindi and firstly explain what is sadvritta in hindi then explain all points in 1 or 2 lines now make it and add this logos also and college name also maharana pratap ayurvedic medical college and hospital
mkdir -p /tmp/workspace/ayurgrama-poster && ls /tmp/workspace/ayurgrama-poster/
cd /tmp/workspace/ayurgrama-poster && curl -s -o logo_ncism.jpg "https://d361swluvexzqs.cloudfront.net/chats-attachments/1000095257-1785739975859-22p8qm.jpg" && curl -s -o logo_ayurgrama.jpg "https://d361swluvexzqs.cloudfront.net/chats-attachments/1000095254-1785739976620-jskria.jpg" && curl -s -o logo_mpgi.jpg "https://d361swluvexzqs.cloudfront.net/chats-attachments/1000090892-1785739976963-818jzd.jpg" && echo "Downloaded all logos" && ls -lh
~/ayurgrama-poster/sadvritta_poster.html
<!DOCTYPE html>
<html lang="hi">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>सद्वृत्त पोस्टर - Ayurgrama 3.0</title>
<style>
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Devanagari:wght@400;600;700;900&display=swap');
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: 'Noto Sans Devanagari', 'Mangal', Arial, sans-serif;
background: #f5f0e8;
display: flex;
justify-content: center;
padding: 10px;
}
.poster {
width: 794px;
background: linear-gradient(180deg, #fff8e7 0%, #fff3d0 30%, #f0fff0 70%, #e8f5e9 100%);
border: 8px solid #e07b00;
border-radius: 18px;
overflow: hidden;
box-shadow: 0 8px 32px rgba(0,0,0,0.18);
position: relative;
}
/* Decorative border pattern */
.poster::before {
content: '';
position: absolute;
top: 8px; left: 8px; right: 8px; bottom: 8px;
border: 2px dashed #f4a020;
border-radius: 12px;
pointer-events: none;
z-index: 0;
}
/* ===== HEADER ===== */
.header {
background: linear-gradient(135deg, #ff6b00 0%, #e07b00 40%, #c8a800 100%);
padding: 14px 20px 10px;
text-align: center;
position: relative;
z-index: 1;
}
.logo-row {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
padding: 0 10px;
}
.logo-box {
background: white;
border-radius: 50%;
width: 90px; height: 90px;
display: flex; align-items: center; justify-content: center;
overflow: hidden;
border: 3px solid #fff;
box-shadow: 0 3px 10px rgba(0,0,0,0.2);
flex-shrink: 0;
}
.logo-box img {
width: 86px; height: 86px;
object-fit: contain;
border-radius: 50%;
}
.college-name {
flex: 1;
text-align: center;
padding: 0 12px;
}
.college-name h2 {
color: #fff;
font-size: 14px;
font-weight: 700;
line-height: 1.4;
text-shadow: 1px 1px 3px rgba(0,0,0,0.4);
letter-spacing: 0.3px;
}
.college-name p {
color: #ffe082;
font-size: 11px;
margin-top: 2px;
font-weight: 600;
}
.main-title {
color: #fff;
font-size: 42px;
font-weight: 900;
text-shadow: 2px 3px 6px rgba(0,0,0,0.35);
letter-spacing: 2px;
line-height: 1.1;
}
.main-subtitle {
color: #fff8dc;
font-size: 16px;
font-weight: 700;
margin-top: 2px;
letter-spacing: 1px;
}
.event-badge {
display: inline-block;
background: #fff;
color: #e07b00;
font-size: 12px;
font-weight: 700;
padding: 3px 16px;
border-radius: 20px;
margin-top: 6px;
letter-spacing: 1px;
}
/* ===== DEFINITION BOX ===== */
.definition-box {
background: linear-gradient(135deg, #1a5c1a, #2d8a2d);
margin: 12px 16px 8px;
border-radius: 12px;
padding: 14px 18px;
border-left: 6px solid #ffc107;
position: relative;
z-index: 1;
box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}
.definition-box .def-title {
color: #ffd54f;
font-size: 18px;
font-weight: 800;
margin-bottom: 6px;
display: flex;
align-items: center;
gap: 8px;
}
.definition-box p {
color: #e8f5e9;
font-size: 13px;
line-height: 1.7;
}
.definition-box .meaning {
color: #ffe082;
font-size: 12px;
margin-top: 6px;
font-style: italic;
}
/* ===== SECTION HEADERS ===== */
.section {
margin: 8px 16px;
border-radius: 10px;
overflow: hidden;
box-shadow: 0 2px 8px rgba(0,0,0,0.10);
position: relative;
z-index: 1;
}
.section-header {
padding: 7px 14px;
font-size: 15px;
font-weight: 800;
color: white;
display: flex;
align-items: center;
gap: 8px;
letter-spacing: 0.5px;
}
.sec-green .section-header { background: linear-gradient(90deg, #2e7d32, #43a047); }
.sec-orange .section-header { background: linear-gradient(90deg, #e65100, #f57c00); }
.sec-blue .section-header { background: linear-gradient(90deg, #1565c0, #1976d2); }
.sec-pink .section-header { background: linear-gradient(90deg, #880e4f, #c2185b); }
.sec-teal .section-header { background: linear-gradient(90deg, #00695c, #00897b); }
.sec-purple .section-header { background: linear-gradient(90deg, #4a148c, #7b1fa2); }
.sec-green .section-body { background: #f1f8e9; }
.sec-orange .section-body { background: #fff8e1; }
.sec-blue .section-body { background: #e3f2fd; }
.sec-pink .section-body { background: #fce4ec; }
.sec-teal .section-body { background: #e0f2f1; }
.sec-purple .section-body { background: #f3e5f5; }
.section-body {
padding: 8px 14px;
}
/* ===== POINT ROWS ===== */
.point {
display: flex;
align-items: flex-start;
gap: 8px;
padding: 5px 0;
border-bottom: 1px dotted rgba(0,0,0,0.12);
}
.point:last-child { border-bottom: none; }
.point-icon {
font-size: 20px;
min-width: 28px;
text-align: center;
line-height: 1.3;
}
.point-text {}
.point-title {
font-size: 13px;
font-weight: 700;
color: #212121;
line-height: 1.3;
}
.point-desc {
font-size: 11.5px;
color: #444;
line-height: 1.5;
margin-top: 1px;
}
/* ===== TWO COLUMN LAYOUT ===== */
.two-col {
display: flex;
gap: 8px;
margin: 0 16px 8px;
position: relative;
z-index: 1;
}
.two-col .section {
margin: 0;
flex: 1;
}
/* ===== MENSTRUAL SECTION ===== */
.menstrual-note {
background: #fff9c4;
border: 1px solid #f9a825;
border-radius: 6px;
padding: 6px 10px;
margin-bottom: 6px;
font-size: 11.5px;
color: #5d4037;
text-align: center;
font-weight: 600;
}
/* ===== FOOTER ===== */
.footer {
background: linear-gradient(135deg, #1b5e20, #2e7d32, #388e3c);
padding: 14px 20px;
text-align: center;
position: relative;
z-index: 1;
margin-top: 8px;
}
.footer h2 {
color: #fff;
font-size: 20px;
font-weight: 800;
text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}
.footer p {
color: #c8e6c9;
font-size: 12px;
margin-top: 4px;
}
.footer .slogan {
color: #ffd54f;
font-size: 16px;
font-weight: 700;
margin-top: 4px;
}
.divider-leaf {
text-align: center;
font-size: 18px;
letter-spacing: 6px;
margin: 2px 0;
color: #81c784;
}
/* ===== PRINT STYLES ===== */
@media print {
body { background: white; padding: 0; }
.poster { box-shadow: none; border-width: 4px; width: 100%; }
}
</style>
</head>
<body>
<div class="poster">
<!-- HEADER WITH LOGOS -->
<div class="header">
<div class="logo-row">
<!-- NCISM Logo -->
<div class="logo-box">
<img src="logo_ncism.jpg" alt="NCISM Logo">
</div>
<!-- College Name Center -->
<div class="college-name">
<h2>महाराणा प्रताप आयुर्वेदिक मेडिकल कॉलेज एवं हॉस्पिटल</h2>
<p>Maharana Pratap Ayurvedic Medical College & Hospital</p>
<p style="color:#ffe082; font-size:10px; margin-top:3px;">MPGI Group of Institutions</p>
</div>
<!-- MPGI Logo -->
<div class="logo-box">
<img src="logo_mpgi.jpg" alt="MPGI Logo">
</div>
</div>
<!-- Main Title -->
<div style="margin: 4px 0 6px;">
<div class="main-title">॥ सद्वृत्त ॥</div>
<div class="main-subtitle">Sadvritta — स्वस्थ जीवन के नियम</div>
</div>
<!-- Ayurgrama Logo + Badge -->
<div style="display:flex; align-items:center; justify-content:center; gap:14px; margin-top:6px;">
<div class="logo-box" style="width:72px;height:72px;">
<img src="logo_ayurgrama.jpg" alt="Ayurgrama Logo" style="width:68px;height:68px;">
</div>
<div>
<div class="event-badge">🌿 AYURGRAMA 3.0 — इन्द्रिय आरोग्य 🌿</div>
<div style="color:#fff8dc; font-size:11px; margin-top:4px;">NCISM — आयुषे सर्वलोकानाम्</div>
</div>
</div>
</div>
<!-- DEFINITION BOX -->
<div class="definition-box">
<div class="def-title">📖 सद्वृत्त क्या है?</div>
<p>
<strong style="color:#ffd54f;">सद्वृत्त</strong> = <strong style="color:#a5d6a7;">सत्</strong> (अच्छा) + <strong style="color:#a5d6a7;">वृत्त</strong> (आचरण/व्यवहार)
<br>
आयुर्वेद में <strong style="color:#ffd54f;">सद्वृत्त</strong> उन दैनिक नियमों और आचरणों का समूह है जो हमारे शरीर, मन और आत्मा को स्वस्थ रखते हैं।
जो व्यक्ति इन नियमों का पालन करता है, वह रोगों से बचा रहता है और लंबा, सुखी जीवन जीता है।
</p>
<div class="meaning">💡 सरल शब्दों में: सद्वृत्त मतलब — <em>अच्छी आदतें अपनाओ, स्वस्थ जीवन पाओ!</em></div>
</div>
<!-- SECTION 1: MORNING ROUTINE -->
<div class="section sec-orange">
<div class="section-header">🌅 १. सुबह की दिनचर्या (प्रातःकाल के नियम)</div>
<div class="section-body">
<div class="point">
<div class="point-icon">⏰</div>
<div class="point-text">
<div class="point-title">ब्राह्ममुहूर्त में उठें</div>
<div class="point-desc">सूरज निकलने से डेढ़ घंटे पहले उठें — इससे मन ताजा रहता है, शरीर में ऊर्जा आती है।</div>
</div>
</div>
<div class="point">
<div class="point-icon">🦷</div>
<div class="point-text">
<div class="point-title">दाँत साफ करें</div>
<div class="point-desc">नीम या बबूल की दातुन या ब्रश से सुबह-शाम दाँत साफ करें — दाँत और मसूड़े मजबूत रहते हैं।</div>
</div>
</div>
<div class="point">
<div class="point-icon">👅</div>
<div class="point-text">
<div class="point-title">जीभ साफ करें</div>
<div class="point-desc">जीभ खुरचनी से जीभ साफ करें — मुँह की बदबू दूर होती है, पाचन अच्छा होता है।</div>
</div>
</div>
<div class="point">
<div class="point-icon">💧</div>
<div class="point-text">
<div class="point-title">सुबह पानी पीएं</div>
<div class="point-desc">उठते ही 1-2 गिलास गुनगुना या ताजा पानी पीएं — पेट साफ रहता है, शरीर की गंदगी बाहर निकलती है।</div>
</div>
</div>
<div class="point">
<div class="point-icon">🧘</div>
<div class="point-text">
<div class="point-title">व्यायाम और योग करें</div>
<div class="point-desc">रोज 30 मिनट चलना, सूर्य नमस्कार या हल्का व्यायाम करें — शरीर चुस्त-दुरुस्त रहता है।</div>
</div>
</div>
</div>
</div>
<!-- TWO COLUMNS: Food + Personal -->
<div class="two-col">
<!-- SECTION 2: FOOD HYGIENE -->
<div class="section sec-green">
<div class="section-header">🍽️ २. आहार स्वच्छता</div>
<div class="section-body">
<div class="point">
<div class="point-icon">🤲</div>
<div class="point-text">
<div class="point-title">खाने से पहले हाथ धोएं</div>
<div class="point-desc">साबुन से 20 सेकंड हाथ धोएं — पेट की बीमारियाँ दूर रहती हैं।</div>
</div>
</div>
<div class="point">
<div class="point-icon">🥗</div>
<div class="point-text">
<div class="point-title">ताजा और सादा खाएं</div>
<div class="point-desc">बासी, जंक फूड और पैकेट बंद खाना मत खाएं — ताजी रोटी, दाल, सब्जी खाएं।</div>
</div>
</div>
<div class="point">
<div class="point-icon">🫙</div>
<div class="point-text">
<div class="point-title">साफ पानी पीएं</div>
<div class="point-desc">उबला या छना हुआ पानी पीएं — टाइफाइड, दस्त जैसी बीमारियाँ नहीं होतीं।</div>
</div>
</div>
<div class="point">
<div class="point-icon">🌿</div>
<div class="point-text">
<div class="point-title">हरी सब्जी व फल खाएं</div>
<div class="point-desc">पालक, टमाटर, आंवला, केला खाएं — खून बढ़ता है, शरीर मजबूत होता है।</div>
</div>
</div>
<div class="point">
<div class="point-icon">🍱</div>
<div class="point-text">
<div class="point-title">धीरे-धीरे खाएं</div>
<div class="point-desc">खाना चबा-चबाकर खाएं — पाचन ठीक रहता है, गैस नहीं बनती।</div>
</div>
</div>
</div>
</div>
<!-- SECTION 3: PERSONAL HYGIENE -->
<div class="section sec-blue">
<div class="section-header">🧼 ३. व्यक्तिगत स्वच्छता</div>
<div class="section-body">
<div class="point">
<div class="point-icon">🚿</div>
<div class="point-text">
<div class="point-title">रोज नहाएं</div>
<div class="point-desc">रोज नहाने से शरीर के कीटाणु, पसीना और गंदगी दूर होती है, त्वचा स्वस्थ रहती है।</div>
</div>
</div>
<div class="point">
<div class="point-icon">💅</div>
<div class="point-text">
<div class="point-title">नाखून छोटे रखें</div>
<div class="point-desc">लंबे नाखूनों में गंदगी जमती है जो खाने के साथ पेट में जाती है — हर हफ्ते काटें।</div>
</div>
</div>
<div class="point">
<div class="point-icon">💈</div>
<div class="point-text">
<div class="point-title">बाल साफ रखें</div>
<div class="point-desc">हफ्ते में 2 बार बाल धोएं, नियमित कंघी करें — जूएं और फंगस नहीं होती।</div>
</div>
</div>
<div class="point">
<div class="point-icon">👕</div>
<div class="point-text">
<div class="point-title">साफ कपड़े पहनें</div>
<div class="point-desc">रोज धुले और साफ कपड़े पहनें — त्वचा रोग और संक्रमण से बचाव होता है।</div>
</div>
</div>
<div class="point">
<div class="point-icon">🚽</div>
<div class="point-text">
<div class="point-title">शौचालय उपयोग करें</div>
<div class="point-desc">खुले में शौच मत करें — इससे बीमारियाँ फैलती हैं, शौच के बाद साबुन से हाथ धोएं।</div>
</div>
</div>
</div>
</div>
</div><!-- end two-col -->
<!-- SECTION 4: MENSTRUAL HYGIENE (full width) -->
<div class="section sec-pink">
<div class="section-header">🌸 ४. मासिक धर्म स्वच्छता — Menstrual Hygiene (किशोरियों के लिए)</div>
<div class="section-body">
<div class="menstrual-note">
💗 मासिक धर्म एक प्राकृतिक और स्वस्थ प्रक्रिया है — इसमें कोई शर्म या अपवित्रता नहीं है।
</div>
<div style="display:flex; gap:8px; flex-wrap:wrap;">
<div style="flex:1; min-width:220px;">
<div class="point">
<div class="point-icon">🩹</div>
<div class="point-text">
<div class="point-title">साफ पैड या कपड़े का उपयोग करें</div>
<div class="point-desc">गंदे या पुराने कपड़े से इन्फेक्शन होता है — साफ सैनिटरी पैड या धुला कपड़ा उपयोग करें।</div>
</div>
</div>
<div class="point">
<div class="point-icon">⏱️</div>
<div class="point-text">
<div class="point-title">हर 4-6 घंटे में पैड बदलें</div>
<div class="point-desc">ज्यादा देर तक एक ही पैड रखने से बैक्टीरिया पनपते हैं, बदबू और इन्फेक्शन होता है।</div>
</div>
</div>
<div class="point">
<div class="point-icon">🤲</div>
<div class="point-text">
<div class="point-title">पैड बदलने से पहले-बाद हाथ धोएं</div>
<div class="point-desc">साबुन से हाथ धोना जरूरी है — कीटाणुओं से बचाव होता है।</div>
</div>
</div>
<div class="point">
<div class="point-icon">🚿</div>
<div class="point-text">
<div class="point-title">पीरियड्स में रोज नहाएं</div>
<div class="point-desc">पीरियड्स में नहाना बंद मत करें — नहाने से साफ-सफाई रहती है, इन्फेक्शन नहीं होता।</div>
</div>
</div>
</div>
<div style="flex:1; min-width:220px;">
<div class="point">
<div class="point-icon">🗑️</div>
<div class="point-text">
<div class="point-title">पैड सही तरह फेंकें</div>
<div class="point-desc">इस्तेमाल किया पैड कागज में लपेटकर कूड़ेदान में डालें — खुले में मत फेंकें।</div>
</div>
</div>
<div class="point">
<div class="point-icon">🥬</div>
<div class="point-text">
<div class="point-title">आयरन युक्त खाना खाएं</div>
<div class="point-desc">पालक, गुड़, खजूर, चना, चुकंदर खाएं — खून की कमी (एनीमिया) नहीं होगी।</div>
</div>
</div>
<div class="point">
<div class="point-icon">🛌</div>
<div class="point-text">
<div class="point-title">दर्द में आराम करें</div>
<div class="point-desc">पेट में दर्द हो तो गरम पानी की थैली रखें, आराम करें — सब सामान्य है।</div>
</div>
</div>
<div class="point">
<div class="point-icon">👩⚕️</div>
<div class="point-text">
<div class="point-title">डॉक्टर से मिलें</div>
<div class="point-desc">बहुत ज्यादा दर्द, अनियमित या बंद पीरियड्स हो तो महिला डॉक्टर या आशा दीदी से मिलें।</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- TWO COLUMNS: Environment + Night -->
<div class="two-col">
<!-- SECTION 5: ENVIRONMENT -->
<div class="section sec-teal">
<div class="section-header">🌿 ५. पर्यावरण स्वच्छता</div>
<div class="section-body">
<div class="point">
<div class="point-icon">🗑️</div>
<div class="point-text">
<div class="point-title">कूड़ा डस्टबिन में डालें</div>
<div class="point-desc">गाँव और घर को साफ रखें — गंदगी से मक्खी, मच्छर और बीमारी आती है।</div>
</div>
</div>
<div class="point">
<div class="point-icon">🦟</div>
<div class="point-text">
<div class="point-title">पानी जमा न होने दें</div>
<div class="point-desc">रुके हुए पानी में मच्छर पैदा होते हैं — मलेरिया, डेंगू से बचाव होता है।</div>
</div>
</div>
<div class="point">
<div class="point-icon">🌱</div>
<div class="point-text">
<div class="point-title">पेड़-पौधे लगाएं</div>
<div class="point-desc">घर के आसपास तुलसी, नीम लगाएं — हवा शुद्ध होती है, बीमारियाँ दूर रहती हैं।</div>
</div>
</div>
<div class="point">
<div class="point-icon">🏠</div>
<div class="point-text">
<div class="point-title">घर में हवा-रोशनी आने दें</div>
<div class="point-desc">खिड़की-दरवाजे खुले रखें — ताजी हवा और धूप से कीटाणु मरते हैं।</div>
</div>
</div>
</div>
</div>
<!-- SECTION 6: NIGHT ROUTINE + MIND -->
<div class="section sec-purple">
<div class="section-header">🌙 ६. रात की दिनचर्या व मानसिक स्वास्थ्य</div>
<div class="section-body">
<div class="point">
<div class="point-icon">🛌</div>
<div class="point-text">
<div class="point-title">जल्दी सोएं (10 बजे तक)</div>
<div class="point-desc">8 घंटे की नींद जरूरी है — देर रात जागने से शरीर और दिमाग कमजोर होता है।</div>
</div>
</div>
<div class="point">
<div class="point-icon">🦶</div>
<div class="point-text">
<div class="point-title">सोने से पहले पैर धोएं</div>
<div class="point-desc">गरम पानी से पैर धोकर सोएं — अच्छी नींद आती है, थकान दूर होती है।</div>
</div>
</div>
<div class="point">
<div class="point-icon">📵</div>
<div class="point-text">
<div class="point-title">मोबाइल बंद रखें</div>
<div class="point-desc">सोने से 1 घंटे पहले मोबाइल बंद करें — आँखें और दिमाग को आराम मिलता है।</div>
</div>
</div>
<div class="point">
<div class="point-icon">🙏</div>
<div class="point-text">
<div class="point-title">सकारात्मक सोचें</div>
<div class="point-desc">रोज ईश्वर का धन्यवाद करें, अच्छी बातें सोचें — मन शांत रहता है, तनाव दूर होता है।</div>
</div>
</div>
</div>
</div>
</div><!-- end two-col -->
<!-- FOOTER -->
<div class="footer">
<div class="divider-leaf">🌿 ❁ 🌿 ❁ 🌿 ❁ 🌿</div>
<h2>🌱 स्वस्थ गाँव, सुखी जीवन 🌱</h2>
<div class="slogan">सद्वृत्त अपनाओ — निरोगी जीवन पाओ!</div>
<p style="margin-top:6px; color:#fff;">महाराणा प्रताप आयुर्वेदिक मेडिकल कॉलेज एवं हॉस्पिटल | MPGI Group</p>
<p style="color:#a5d6a7; font-size:11px; margin-top:3px;">AYURGRAMA 3.0 — इन्द्रिय आरोग्य | NCISM — आयुषे सर्वलोकानाम् | ॥ सद्वचनमनुछेयानाम् ॥</p>
<div class="divider-leaf" style="margin-top:6px;">🌿 ❁ 🌿 ❁ 🌿 ❁ 🌿</div>
</div>
</div>
</body>
</html>
cd /tmp/workspace/ayurgrama-poster && python3 -c " import subprocess, sys # Try weasyprint first try: import weasyprint print('weasyprint available') weasyprint.HTML(filename='sadvritta_poster.html').write_pdf('sadvritta_poster.pdf') print('PDF created with weasyprint') except Exception as e: print(f'weasyprint failed: {e}') # Try xhtml2pdf try: import xhtml2pdf.pisa as pisa with open('sadvritta_poster.html','rb') as src: with open('sadvritta_poster.pdf','wb') as dest: pisa.CreatePDF(src, dest) print('PDF created with xhtml2pdf') except Exception as e2: print(f'xhtml2pdf failed: {e2}') "
pip install --user weasyprint 2>&1 | tail -5
python3 -c "import weasyprint; print(weasyprint.__version__)" 2>&1
python3 -c "import reportlab; print('reportlab ok')" && python3 -c "from PIL import Image; print('PIL ok')" && python3 -c "import base64; print('base64 ok')"
~/ayurgrama-poster/build_poster.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Sadvritta Poster - Ayurgrama 3.0
Maharana Pratap Ayurvedic Medical College & Hospital
Full Hindi poster with logos using ReportLab
"""
from reportlab.lib.pagesizes import A3
from reportlab.lib import colors
from reportlab.lib.units import mm, cm
from reportlab.pdfgen import canvas
from reportlab.lib.colors import HexColor, Color
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont
from reportlab.lib.utils import ImageReader
from reportlab.platypus import Paragraph, SimpleDocTemplate, Spacer, Table, TableStyle
import os, sys
from PIL import Image as PILImage
import io
# =====================
# PAGE SETUP
# =====================
OUTPUT = "/tmp/workspace/ayurgrama-poster/Sadvritta_Ayurgrama3_Poster.pdf"
W, H = A3 # 297 x 420 mm -> 841.89 x 1190.55 pts
MARGIN = 18 * mm
# =====================
# COLORS
# =====================
C_SAFFRON = HexColor("#E07B00")
C_SAFFRON_D = HexColor("#C86000")
C_GOLD = HexColor("#FFC107")
C_GREEN_D = HexColor("#1B5E20")
C_GREEN = HexColor("#2E7D32")
C_GREEN_L = HexColor("#43A047")
C_GREEN_BG = HexColor("#F1F8E9")
C_ORANGE = HexColor("#E65100")
C_ORANGE_L = HexColor("#FFF8E1")
C_BLUE_D = HexColor("#1565C0")
C_BLUE_L = HexColor("#E3F2FD")
C_PINK_D = HexColor("#880E4F")
C_PINK_L = HexColor("#FCE4EC")
C_TEAL_D = HexColor("#00695C")
C_TEAL_L = HexColor("#E0F2F1")
C_PURPLE_D = HexColor("#4A148C")
C_PURPLE_L = HexColor("#F3E5F5")
C_WHITE = colors.white
C_TEXT = HexColor("#212121")
C_TEXT_L = HexColor("#444444")
C_YELLOW_L = HexColor("#FFF9C4")
# =====================
# FONT SETUP
# =====================
# Use built-in Helvetica for Latin; for Devanagari we'll use Unicode approach
# Download Noto Sans Devanagari if available, else fallback
import subprocess
FONT_DIR = "/tmp/workspace/ayurgrama-poster/fonts"
os.makedirs(FONT_DIR, exist_ok=True)
DEVANAGARI_FONT = None
DEVANAGARI_BOLD = None
# Try to find system Devanagari fonts
font_candidates = [
"/usr/share/fonts/truetype/noto/NotoSansDevanagari-Regular.ttf",
"/usr/share/fonts/truetype/noto/NotoSansDevanagari-Bold.ttf",
"/usr/share/fonts/opentype/noto/NotoSansDevanagari-Regular.otf",
]
for f in font_candidates:
if os.path.exists(f):
print(f"Found font: {f}")
# Download Noto Sans Devanagari
try:
r = subprocess.run([
"curl", "-L", "-o", f"{FONT_DIR}/NotoSansDevanagari-Regular.ttf",
"https://github.com/googlefonts/noto-fonts/raw/main/hinted/ttf/NotoSansDevanagari/NotoSansDevanagari-Regular.ttf"
], capture_output=True, timeout=30)
r2 = subprocess.run([
"curl", "-L", "-o", f"{FONT_DIR}/NotoSansDevanagari-Bold.ttf",
"https://github.com/googlefonts/noto-fonts/raw/main/hinted/ttf/NotoSansDevanagari/NotoSansDevanagari-Bold.ttf"
], capture_output=True, timeout=30)
if os.path.exists(f"{FONT_DIR}/NotoSansDevanagari-Regular.ttf") and os.path.getsize(f"{FONT_DIR}/NotoSansDevanagari-Regular.ttf") > 10000:
pdfmetrics.registerFont(TTFont('Devanagari', f"{FONT_DIR}/NotoSansDevanagari-Regular.ttf"))
pdfmetrics.registerFont(TTFont('DevanagariBold', f"{FONT_DIR}/NotoSansDevanagari-Bold.ttf"))
DEVANAGARI_FONT = 'Devanagari'
DEVANAGARI_BOLD = 'DevanagariBold'
print("Devanagari fonts registered successfully")
else:
print("Font download failed or incomplete")
except Exception as e:
print(f"Font setup error: {e}")
if not DEVANAGARI_FONT:
DEVANAGARI_FONT = 'Helvetica'
DEVANAGARI_BOLD = 'Helvetica-Bold'
print("Using fallback Helvetica font")
# =====================
# HELPER FUNCTIONS
# =====================
def rect_fill(c, x, y, w, h, fill_color, radius=3):
c.setFillColor(fill_color)
c.roundRect(x, y, w, h, radius, fill=1, stroke=0)
def rect_stroke(c, x, y, w, h, stroke_color, lw=1, radius=3):
c.setStrokeColor(stroke_color)
c.setLineWidth(lw)
c.roundRect(x, y, w, h, radius, fill=0, stroke=1)
def draw_text(c, text, x, y, font=None, size=10, color=C_TEXT, align='left'):
c.setFont(font or DEVANAGARI_FONT, size)
c.setFillColor(color)
if align == 'center':
c.drawCentredString(x, y, text)
elif align == 'right':
c.drawRightString(x, y, text)
else:
c.drawString(x, y, text)
def wrap_text(c, text, x, y, max_width, font=None, size=10, color=C_TEXT, line_height=None):
"""Simple word-wrap text drawing"""
if line_height is None:
line_height = size * 1.4
c.setFont(font or DEVANAGARI_FONT, size)
c.setFillColor(color)
words = text.split(' ')
lines = []
current = ''
for w in words:
test = current + (' ' if current else '') + w
if c.stringWidth(test, font or DEVANAGARI_FONT, size) <= max_width:
current = test
else:
if current:
lines.append(current)
current = w
if current:
lines.append(current)
cur_y = y
for line in lines:
c.drawString(x, cur_y, line)
cur_y -= line_height
return cur_y # return final y position
def draw_gradient_rect(c, x, y, w, h, color1, color2, steps=20, radius=4):
"""Simulate gradient with horizontal bands"""
step_h = h / steps
for i in range(steps):
t = i / steps
r = color1.red + t * (color2.red - color1.red)
g = color1.green + t * (color2.green - color1.green)
b = color1.blue + t * (color2.blue - color1.blue)
c.setFillColor(Color(r, g, b))
c.rect(x, y + h - (i+1)*step_h, w, step_h+0.5, fill=1, stroke=0)
def section_header(c, x, y, w, h, title, color1, color2, font_size=11):
draw_gradient_rect(c, x, y, w, h, color1, color2)
c.setFont(DEVANAGARI_BOLD, font_size)
c.setFillColor(C_WHITE)
c.drawString(x + 8, y + h/2 - font_size/2 + 1, title)
def draw_bullet_point(c, x, y, icon, title, desc, section_width, title_size=10, desc_size=8.5):
"""Draw a single bullet point with icon, title, description"""
icon_w = 20
text_x = x + icon_w + 4
text_w = section_width - icon_w - 8
# Icon
c.setFont(DEVANAGARI_FONT, 14)
c.setFillColor(C_TEXT)
c.drawString(x, y - 2, icon)
# Title
c.setFont(DEVANAGARI_BOLD, title_size)
c.setFillColor(C_TEXT)
c.drawString(text_x, y, title)
# Description
c.setFont(DEVANAGARI_FONT, desc_size)
c.setFillColor(C_TEXT_L)
words = desc.split(' ')
lines = []
current = ''
for w in words:
test = current + (' ' if current else '') + w
if c.stringWidth(test, DEVANAGARI_FONT, desc_size) <= text_w:
current = test
else:
if current:
lines.append(current)
current = w
if current:
lines.append(current)
lh = desc_size * 1.35
desc_y = y - title_size * 1.2
for line in lines:
c.drawString(text_x, desc_y, line)
desc_y -= lh
total_height = title_size * 1.2 + len(lines) * lh + 4
return total_height
def load_logo(path, size):
"""Load logo as ImageReader, resize"""
try:
img = PILImage.open(path)
img = img.convert("RGBA")
img.thumbnail((size, size), PILImage.LANCZOS)
buf = io.BytesIO()
img.save(buf, format='PNG')
buf.seek(0)
return ImageReader(buf), img.size
except Exception as e:
print(f"Logo load error: {e}")
return None, (0, 0)
# =====================
# BUILD PDF
# =====================
c = canvas.Canvas(OUTPUT, pagesize=A3)
c.setTitle("सद्वृत्त पोस्टर - Ayurgrama 3.0")
# ---- OUTER BORDER ----
c.setStrokeColor(C_SAFFRON)
c.setLineWidth(6)
c.roundRect(6, 6, W-12, H-12, 10, fill=0, stroke=1)
c.setStrokeColor(C_GOLD)
c.setLineWidth(2)
c.roundRect(12, 12, W-24, H-24, 8, fill=0, stroke=1)
# ============================================================
# HEADER BACKGROUND
# ============================================================
header_h = 145 * mm
draw_gradient_rect(c, 0, H - header_h, W, header_h,
HexColor("#FF6B00"), HexColor("#C8A800"), steps=30)
# ---- LOGOS ----
logo_size = 70 # pts
ncism_img, _ = load_logo("/tmp/workspace/ayurgrama-poster/logo_ncism.jpg", logo_size)
mpgi_img, _ = load_logo("/tmp/workspace/ayurgrama-poster/logo_mpgi.jpg", logo_size)
ayur_img, _ = load_logo("/tmp/workspace/ayurgrama-poster/logo_ayurgrama.jpg", logo_size)
logo_y = H - 80
logo_r = 38 # circle radius
def draw_logo_circle(c, cx, cy, img, r):
# White circle background
c.setFillColor(C_WHITE)
c.circle(cx, cy, r + 3, fill=1, stroke=0)
c.setStrokeColor(C_WHITE)
c.setLineWidth(3)
c.circle(cx, cy, r + 3, fill=0, stroke=1)
if img:
d = r * 2
c.drawImage(img, cx - r, cy - r, d, d, mask='auto')
# NCISM left
draw_logo_circle(c, MARGIN + 35, logo_y, ncism_img, logo_r)
# MPGI right
draw_logo_circle(c, W - MARGIN - 35, logo_y, mpgi_img, logo_r)
# ---- COLLEGE NAME ----
cname_cx = W / 2
c.setFont(DEVANAGARI_BOLD, 13)
c.setFillColor(C_WHITE)
c.drawCentredString(cname_cx, H - 28, "महाराणा प्रताप आयुर्वेदिक मेडिकल कॉलेज एवं हॉस्पिटल")
c.setFont(DEVANAGARI_FONT, 10)
c.setFillColor(HexColor("#FFE082"))
c.drawCentredString(cname_cx, H - 42, "Maharana Pratap Ayurvedic Medical College & Hospital | MPGI Group of Institutions")
# ---- MAIN TITLE ----
c.setFont(DEVANAGARI_BOLD, 48)
c.setFillColor(C_WHITE)
c.drawCentredString(W/2, H - 90, "॥ सद्वृत्त ॥")
c.setFont(DEVANAGARI_FONT, 16)
c.setFillColor(HexColor("#FFF8DC"))
c.drawCentredString(W/2, H - 110, "Sadvritta — स्वस्थ जीवन के आयुर्वेदिक नियम")
# Ayurgrama logo + event badge
draw_logo_circle(c, W/2 - 50, H - 140, ayur_img, 30)
c.setFillColor(C_WHITE)
c.roundRect(W/2 - 5, H - 155, 160, 28, 14, fill=1, stroke=0)
c.setFont(DEVANAGARI_BOLD, 11)
c.setFillColor(C_ORANGE)
c.drawString(W/2, H - 144, "AYURGRAMA 3.0 — इन्द्रिय आरोग्य")
c.setFont(DEVANAGARI_FONT, 8)
c.setFillColor(HexColor("#2E7D32"))
c.drawString(W/2, H - 154, "NCISM — आयुषे सर्वलोकानाम्")
# ============================================================
# DEFINITION BOX
# ============================================================
cur_y = H - header_h - 8
def_x = MARGIN
def_w = W - 2 * MARGIN
def_h = 72
rect_fill(c, def_x, cur_y - def_h, def_w, def_h, HexColor("#1A5C1A"), radius=8)
c.setStrokeColor(C_GOLD)
c.setLineWidth(3)
c.roundRect(def_x, cur_y - def_h, def_w, def_h, 8, fill=0, stroke=1)
# Left accent bar
rect_fill(c, def_x, cur_y - def_h, 6, def_h, C_GOLD, radius=4)
c.setFont(DEVANAGARI_BOLD, 14)
c.setFillColor(HexColor("#FFD54F"))
c.drawString(def_x + 16, cur_y - 18, "📖 सद्वृत्त क्या है? (What is Sadvritta?)")
c.setFont(DEVANAGARI_BOLD, 10.5)
c.setFillColor(HexColor("#A5D6A7"))
c.drawString(def_x + 16, cur_y - 33, "सद्वृत्त = सत् (अच्छा) + वृत्त (आचरण / व्यवहार)")
c.setFont(DEVANAGARI_FONT, 9.5)
c.setFillColor(HexColor("#E8F5E9"))
line1 = "आयुर्वेद में सद्वृत्त उन दैनिक नियमों और आचरणों का समूह है जो हमारे शरीर, मन और आत्मा को स्वस्थ रखते हैं।"
c.drawString(def_x + 16, cur_y - 46, line1)
line2 = "जो व्यक्ति इन नियमों का पालन करता है, वह रोगों से बचा रहता है और लंबा, सुखी जीवन जीता है।"
c.drawString(def_x + 16, cur_y - 58, line2)
c.setFont(DEVANAGARI_FONT, 9)
c.setFillColor(HexColor("#FFE082"))
c.drawString(def_x + 16, cur_y - 69, "💡 सरल अर्थ: अच्छी आदतें अपनाओ — स्वस्थ जीवन पाओ!")
cur_y -= (def_h + 10)
# ============================================================
# SECTIONS DATA
# ============================================================
sections = [
{
"title": "🌅 १. सुबह की दिनचर्या (प्रातःकाल के नियम)",
"color1": HexColor("#E65100"), "color2": HexColor("#F57C00"),
"bg": HexColor("#FFF8E1"),
"points": [
("⏰", "ब्राह्ममुहूर्त में उठें",
"सूरज निकलने से डेढ़ घंटे पहले उठें — मन ताजा रहता है, शरीर में ऊर्जा आती है।"),
("🦷", "दाँत साफ करें",
"नीम या बबूल की दातुन या ब्रश से सुबह-शाम दाँत साफ करें — दाँत व मसूड़े मजबूत रहते हैं।"),
("👅", "जीभ साफ करें",
"जीभ खुरचनी से जीभ साफ करें — मुँह की बदबू दूर होती है, पाचन अच्छा होता है।"),
("💧", "सुबह गुनगुना पानी पीएं",
"उठते ही 1-2 गिलास गुनगुना पानी पीएं — पेट साफ रहता है, शरीर की गंदगी बाहर निकलती है।"),
("🧘", "व्यायाम और योग करें",
"रोज 30 मिनट चलना, सूर्य नमस्कार या हल्का व्यायाम करें — शरीर चुस्त-दुरुस्त रहता है।"),
]
},
{
"title": "🍽️ २. आहार स्वच्छता (Food Hygiene)",
"color1": HexColor("#2E7D32"), "color2": HexColor("#43A047"),
"bg": HexColor("#F1F8E9"),
"points": [
("🤲", "खाने से पहले हाथ धोएं",
"साबुन से 20 सेकंड हाथ धोएं — पेट की बीमारियाँ जैसे दस्त, पेचिश दूर रहती हैं।"),
("🥗", "ताजा और सादा खाएं",
"बासी, जंक फूड और पैकेट बंद खाना मत खाएं — ताजी रोटी, दाल, सब्जी खाएं।"),
("🫙", "साफ पानी पीएं",
"उबला या छना हुआ पानी पीएं — टाइफाइड, दस्त जैसी बीमारियाँ नहीं होतीं।"),
("🌿", "हरी सब्जी और फल खाएं",
"पालक, टमाटर, आंवला, केला खाएं — खून बढ़ता है, शरीर मजबूत होता है।"),
("🍱", "धीरे-धीरे खाएं",
"खाना चबा-चबाकर खाएं — पाचन ठीक रहता है, गैस और अपच नहीं होती।"),
]
},
{
"title": "🧼 ३. व्यक्तिगत स्वच्छता (Personal Hygiene)",
"color1": HexColor("#1565C0"), "color2": HexColor("#1976D2"),
"bg": HexColor("#E3F2FD"),
"points": [
("🚿", "रोज नहाएं",
"रोज नहाने से शरीर के कीटाणु, पसीना और गंदगी दूर होती है — त्वचा स्वस्थ रहती है।"),
("💅", "नाखून छोटे रखें",
"लंबे नाखूनों में गंदगी जमती है जो खाने के साथ पेट में जाती है — हर हफ्ते काटें।"),
("💈", "बाल साफ रखें",
"हफ्ते में 2 बार बाल धोएं, नियमित कंघी करें — जूएं और फंगस नहीं होती।"),
("👕", "साफ कपड़े पहनें",
"रोज धुले कपड़े पहनें — त्वचा रोग और संक्रमण से बचाव होता है।"),
("🚽", "शौचालय का उपयोग करें",
"खुले में शौच मत करें — बीमारियाँ फैलती हैं। शौच के बाद साबुन से हाथ धोएं।"),
]
},
{
"title": "🌸 ४. मासिक धर्म स्वच्छता (Menstrual Hygiene — किशोरियों के लिए)",
"color1": HexColor("#880E4F"), "color2": HexColor("#C2185B"),
"bg": HexColor("#FCE4EC"),
"special_note": "💗 मासिक धर्म एक प्राकृतिक व स्वस्थ प्रक्रिया है — इसमें कोई शर्म या अपवित्रता नहीं है।",
"points": [
("🩹", "साफ पैड या कपड़े का उपयोग करें",
"गंदे कपड़े से इन्फेक्शन होता है — साफ सैनिटरी पैड या धुला हुआ कपड़ा उपयोग करें।"),
("⏱️", "हर 4-6 घंटे में पैड बदलें",
"ज्यादा देर तक एक ही पैड रखने से बैक्टीरिया पनपते हैं और इन्फेक्शन होता है।"),
("🤲", "पैड बदलने से पहले-बाद हाथ धोएं",
"साबुन से हाथ धोना जरूरी है — कीटाणुओं से बचाव होता है।"),
("🚿", "पीरियड्स में रोज नहाएं",
"पीरियड्स में नहाना बंद मत करें — नहाने से साफ-सफाई रहती है, इन्फेक्शन नहीं होता।"),
("🗑️", "पैड सही तरह फेंकें",
"इस्तेमाल किया पैड कागज में लपेटकर कूड़ेदान में डालें — खुले में मत फेंकें।"),
("🥬", "आयरन युक्त खाना खाएं",
"पालक, गुड़, खजूर, चना, चुकंदर खाएं — खून की कमी (एनीमिया) नहीं होगी।"),
("🛌", "दर्द होने पर आराम करें",
"पेट में दर्द हो तो गरम पानी की थैली रखें — आराम करें, सब सामान्य है।"),
("👩⚕️", "डॉक्टर से मिलें",
"बहुत ज्यादा दर्द या अनियमित पीरियड्स हो तो महिला डॉक्टर या आशा दीदी से मिलें।"),
]
},
{
"title": "🌿 ५. पर्यावरण स्वच्छता (Environment Hygiene)",
"color1": HexColor("#00695C"), "color2": HexColor("#00897B"),
"bg": HexColor("#E0F2F1"),
"points": [
("🗑️", "कूड़ा डस्टबिन में डालें",
"गाँव और घर को साफ रखें — गंदगी से मक्खी, मच्छर और बीमारियाँ आती हैं।"),
("🦟", "पानी जमा न होने दें",
"रुके हुए पानी में मच्छर पैदा होते हैं — मलेरिया, डेंगू से बचाव होता है।"),
("🌱", "पेड़-पौधे लगाएं",
"घर के आसपास तुलसी, नीम लगाएं — हवा शुद्ध होती है, बीमारियाँ दूर रहती हैं।"),
("🏠", "घर में हवा-रोशनी आने दें",
"खिड़की-दरवाजे खुले रखें — ताजी हवा और धूप से कीटाणु मरते हैं।"),
]
},
{
"title": "🌙 ६. रात की दिनचर्या व मानसिक स्वास्थ्य",
"color1": HexColor("#4A148C"), "color2": HexColor("#7B1FA2"),
"bg": HexColor("#F3E5F5"),
"points": [
("🛌", "जल्दी सोएं (रात 10 बजे तक)",
"8 घंटे की नींद जरूरी है — देर रात जागने से शरीर और दिमाग कमजोर होता है।"),
("🦶", "सोने से पहले पैर धोएं",
"गरम पानी से पैर धोकर सोएं — अच्छी नींद आती है, थकान दूर होती है।"),
("📵", "मोबाइल बंद रखें",
"सोने से 1 घंटे पहले मोबाइल बंद करें — आँखें और दिमाग को आराम मिलता है।"),
("🙏", "सकारात्मक सोचें",
"रोज ईश्वर का धन्यवाद करें — मन शांत रहता है, तनाव दूर होता है।"),
]
},
]
# ============================================================
# DRAW SECTIONS
# ============================================================
sec_gap = 7
sec_x = MARGIN
sec_w = W - 2 * MARGIN
header_h_sec = 22
point_h_est = 30 # estimated height per point
def calc_section_height(sec):
n = len(sec["points"])
extra = 20 if "special_note" in sec else 0
return header_h_sec + n * point_h_est + extra + 16
# Two column layout for sections 1-3 and 5-6
# Full width for section 4 (menstrual)
# Arrange in rows:
# Row 1: Section 1 (full) -- morning routine (5 pts) -> maybe 2 col with 2+3?
# Actually let's do: col layout
# Col1: Sec1(morning), Sec4(menstrual full)
# Col2: Sec2(food), Sec3(personal)
# Col3 doesn't exist in A3 -- let's do 2 cols
col_w = (sec_w - 10) / 2
col1_x = sec_x
col2_x = sec_x + col_w + 10
def draw_section(c, sec, x, y, w):
"""Draw a full section, returns height used"""
n_pts = len(sec["points"])
has_note = "special_note" in sec
# Estimate total height
pt_heights = []
for (icon, title, desc) in sec["points"]:
# rough estimate: title(12) + desc lines*10 + 4
desc_lines = max(1, len(desc) // 55 + 1)
pt_heights.append(13 + desc_lines * 10 + 6)
total_h = header_h_sec + sum(pt_heights) + (22 if has_note else 0) + 14
# Background
rect_fill(c, x, y - total_h, w, total_h, sec["bg"], radius=8)
rect_stroke(c, x, y - total_h, w, total_h, sec["color1"], lw=1.5, radius=8)
# Header
draw_gradient_rect(c, x, y - header_h_sec, w, header_h_sec, sec["color1"], sec["color2"], steps=10)
c.setFillColor(C_WHITE)
c.roundRect(x, y - header_h_sec, w, header_h_sec, 8, fill=0, stroke=0)
# Round top corners only (redraw header on top of bg)
# Simple: just draw rect on top portion
c.setFillColor(sec["color1"])
c.roundRect(x, y - header_h_sec, w, header_h_sec, 6, fill=1, stroke=0)
c.setFillColor(sec["color2"])
# gradient approximation: just use color1
c.setFont(DEVANAGARI_BOLD, 10)
c.setFillColor(C_WHITE)
c.drawString(x + 8, y - header_h_sec + 7, sec["title"])
inner_y = y - header_h_sec - 6
if has_note:
note_h = 16
rect_fill(c, x + 6, inner_y - note_h, w - 12, note_h, HexColor("#FFF9C4"), radius=4)
c.setStrokeColor(HexColor("#F9A825"))
c.setLineWidth(0.8)
c.roundRect(x + 6, inner_y - note_h, w - 12, note_h, 4, fill=0, stroke=1)
c.setFont(DEVANAGARI_BOLD, 8)
c.setFillColor(HexColor("#5D4037"))
c.drawCentredString(x + w/2, inner_y - note_h + 5, sec["special_note"])
inner_y -= (note_h + 4)
for i, (icon, title, desc) in enumerate(sec["points"]):
pt_y = inner_y
used = draw_bullet_point(c, x + 8, pt_y, icon, title, desc, w - 16, title_size=9.5, desc_size=8.5)
inner_y -= (used + 4)
# Divider
if i < len(sec["points"]) - 1:
c.setStrokeColor(HexColor("#CCCCCC"))
c.setLineWidth(0.5)
c.line(x + 30, inner_y + 2, x + w - 10, inner_y + 2)
return total_h
# Draw sections 1 (morning) and 2 (food) side by side
h1 = draw_section(c, sections[0], col1_x, cur_y, col_w)
h2 = draw_section(c, sections[1], col2_x, cur_y, col_w)
cur_y -= (max(h1, h2) + sec_gap)
# Draw sections 3 (personal) and 5 (environment) side by side
h3 = draw_section(c, sections[2], col1_x, cur_y, col_w)
h5 = draw_section(c, sections[4], col2_x, cur_y, col_w)
cur_y -= (max(h3, h5) + sec_gap)
# Draw section 4 (menstrual) - FULL WIDTH
h4 = draw_section(c, sections[3], sec_x, cur_y, sec_w)
cur_y -= (h4 + sec_gap)
# Draw section 6 (night) full width
h6 = draw_section(c, sections[5], sec_x, cur_y, sec_w)
cur_y -= (h6 + sec_gap)
# ============================================================
# FOOTER
# ============================================================
footer_h = 52
footer_y = MARGIN
draw_gradient_rect(c, MARGIN, footer_y, sec_w, footer_h, HexColor("#1B5E20"), HexColor("#388E3C"), steps=15)
c.roundRect(MARGIN, footer_y, sec_w, footer_h, 8, fill=0, stroke=0)
# Leaf decorators
c.setFont(DEVANAGARI_FONT, 13)
c.setFillColor(HexColor("#81C784"))
c.drawCentredString(W/2, footer_y + footer_h - 14, "🌿 ❁ 🌿 ❁ 🌿 ❁ 🌿 ❁ 🌿")
c.setFont(DEVANAGARI_BOLD, 17)
c.setFillColor(C_WHITE)
c.drawCentredString(W/2, footer_y + footer_h - 28, "🌱 स्वस्थ गाँव, सुखी जीवन — सद्वृत्त अपनाओ, निरोगी जीवन पाओ! 🌱")
c.setFont(DEVANAGARI_FONT, 9)
c.setFillColor(HexColor("#C8E6C9"))
c.drawCentredString(W/2, footer_y + 18, "महाराणा प्रताप आयुर्वेदिक मेडिकल कॉलेज एवं हॉस्पिटल | MPGI Group of Institutions")
c.setFont(DEVANAGARI_FONT, 8)
c.setFillColor(HexColor("#A5D6A7"))
c.drawCentredString(W/2, footer_y + 8, "AYURGRAMA 3.0 — इन्द्रिय आरोग्य | NCISM — आयुषे सर्वलोकानाम् | ॥ सद्वचनमनुछेयानाम् ॥")
# ============================================================
# SAVE
# ============================================================
c.save()
print(f"✅ Poster saved to: {OUTPUT}")
print(f"File size: {os.path.getsize(OUTPUT) / 1024:.1f} KB")
cd /tmp/workspace/ayurgrama-poster && python3 build_poster.py 2>&1
cd /tmp/workspace/ayurgrama-poster && python3 -c " import base64 for name, fname in [('NCISM','logo_ncism.jpg'),('MPGI','logo_mpgi.jpg'),('AYUR','logo_ayurgrama.jpg')]: with open(fname,'rb') as f: b64 = base64.b64encode(f.read()).decode() print(f'{name}: data:image/jpeg;base64,{b64[:40]}...') with open(f'{fname}.b64','w') as out: out.write(b64) print('Done') "
cd /tmp/workspace/ayurgrama-poster && python3 -c " import base64 logos = {} for name, fname in [('ncism','logo_ncism.jpg'),('mpgi','logo_mpgi.jpg'),('ayur','logo_ayurgrama.jpg')]: with open(fname,'rb') as f: logos[name] = 'data:image/jpeg;base64,' + base64.b64encode(f.read()).decode() with open('sadvritta_poster.html','r') as f: html = f.read() # Replace src references with base64 html = html.replace('src=\"logo_ncism.jpg\"', f'src=\"{logos[\"ncism\"]}\"') html = html.replace('src=\"logo_mpgi.jpg\"', f'src=\"{logos[\"mpgi\"]}\"') html = html.replace('src=\"logo_ayurgrama.jpg\"', f'src=\"{logos[\"ayur\"]}\"') with open('Sadvritta_Poster_Standalone.html','w') as f: f.write(html) print('Standalone HTML saved, size:', len(html)//1024, 'KB') "
Sadvritta Ayurgrama3 Poster
PDF Document · PDF
Sadvritta Poster Standalone
HTML File · HTML
| Section | Content |
|---|---|
| Header | NCISM logo (left) + MPGI logo (right) + Ayurgrama 3.0 badge + College name |
| सद्वृत्त क्या है? | हिंदी में परिभाषा — सत् + वृत्त = अच्छा आचरण |
| १. सुबह की दिनचर्या | ब्राह्ममुहूर्त, दाँत-जीभ सफाई, पानी, योग — 5 बिंदु |
| २. आहार स्वच्छता | हाथ धोना, ताजा खाना, साफ पानी, हरी सब्जी — 5 बिंदु |
| ३. व्यक्तिगत स्वच्छता | नहाना, नाखून, बाल, कपड़े, शौचालय — 5 बिंदु |
| ४. मासिक धर्म स्वच्छता 🌸 | 9वीं-10वीं छात्राओं के लिए — 8 बिंदु, सम्मानजनक भाषा में |
| ५. पर्यावरण स्वच्छता | कूड़ा, मच्छर, पेड़, हवा — 4 बिंदु |
| ६. रात की दिनचर्या | नींद, पैर धोना, मोबाइल, सकारात्मक सोच |
| Footer | स्वस्थ गाँव, सुखी जीवन |
Create a Word document summary of Sadvritta points for school distribution
ls /tmp/workspace/ayurgrama-poster/
~/ayurgrama-poster/build_docx.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Sadvritta Word Document - School Distribution
Maharana Pratap Ayurvedic Medical College & Hospital
Ayurgrama 3.0
"""
from docx import Document
from docx.shared import Pt, Inches, RGBColor, Cm
from docx.enum.text import WD_ALIGN_PARAGRAPH
from docx.enum.table import WD_ALIGN_VERTICAL
from docx.oxml.ns import qn
from docx.oxml import OxmlElement
import copy
OUTPUT = "/tmp/workspace/ayurgrama-poster/Sadvritta_School_Distribution.docx"
# ─── COLORS ────────────────────────────────────────────────
C_SAFFRON = RGBColor(0xE0, 0x7B, 0x00)
C_SAFFRON_D = RGBColor(0xC8, 0x60, 0x00)
C_GREEN_D = RGBColor(0x1B, 0x5E, 0x20)
C_GREEN = RGBColor(0x2E, 0x7D, 0x32)
C_GREEN_L = RGBColor(0x43, 0xA0, 0x47)
C_ORANGE = RGBColor(0xE6, 0x51, 0x00)
C_BLUE = RGBColor(0x15, 0x65, 0xC0)
C_PINK = RGBColor(0x88, 0x0E, 0x4F)
C_TEAL = RGBColor(0x00, 0x69, 0x5C)
C_PURPLE = RGBColor(0x4A, 0x14, 0x8C)
C_GOLD = RGBColor(0xFF, 0xC1, 0x07)
C_WHITE = RGBColor(0xFF, 0xFF, 0xFF)
C_DARK = RGBColor(0x21, 0x21, 0x21)
C_GREY = RGBColor(0x55, 0x55, 0x55)
# ─── HELPERS ───────────────────────────────────────────────
def set_cell_bg(cell, hex_color):
"""Set table cell background color."""
tc = cell._tc
tcPr = tc.get_or_add_tcPr()
shd = OxmlElement('w:shd')
shd.set(qn('w:val'), 'clear')
shd.set(qn('w:color'), 'auto')
shd.set(qn('w:fill'), hex_color)
tcPr.append(shd)
def set_cell_margins(cell, top=80, bottom=80, left=120, right=120):
tc = cell._tc
tcPr = tc.get_or_add_tcPr()
tcMar = OxmlElement('w:tcMar')
for side, val in [('top', top), ('bottom', bottom), ('left', left), ('right', right)]:
el = OxmlElement(f'w:{side}')
el.set(qn('w:w'), str(val))
el.set(qn('w:type'), 'dxa')
tcMar.append(el)
tcPr.append(tcMar)
def set_para_border_bottom(para, color='CCCCCC', size=4):
pPr = para._p.get_or_add_pPr()
pBdr = OxmlElement('w:pBdr')
bottom = OxmlElement('w:bottom')
bottom.set(qn('w:val'), 'single')
bottom.set(qn('w:sz'), str(size))
bottom.set(qn('w:space'), '1')
bottom.set(qn('w:color'), color)
pBdr.append(bottom)
pPr.append(pBdr)
def add_para(doc, text, bold=False, size=11, color=None, align=WD_ALIGN_PARAGRAPH.LEFT,
space_before=0, space_after=4, italic=False, font_name='Calibri'):
p = doc.add_paragraph()
p.alignment = align
p.paragraph_format.space_before = Pt(space_before)
p.paragraph_format.space_after = Pt(space_after)
run = p.add_run(text)
run.bold = bold
run.italic = italic
run.font.size = Pt(size)
run.font.name = font_name
if color:
run.font.color.rgb = color
return p
def add_heading_box(doc, text, bg_hex, text_color=C_WHITE, font_size=13):
"""Section heading as a 1-cell table with colored background."""
tbl = doc.add_table(rows=1, cols=1)
tbl.style = 'Table Grid'
cell = tbl.cell(0, 0)
set_cell_bg(cell, bg_hex)
set_cell_margins(cell, top=60, bottom=60, left=140, right=140)
p = cell.paragraphs[0]
p.alignment = WD_ALIGN_PARAGRAPH.LEFT
run = p.add_run(text)
run.bold = True
run.font.size = Pt(font_size)
run.font.name = 'Calibri'
run.font.color.rgb = text_color
# Remove table border
tbl.style = 'Table Grid'
doc.add_paragraph().paragraph_format.space_after = Pt(2)
return tbl
def add_point_row(doc, icon, title, description, title_color=C_DARK):
"""Add a single bullet point as a 2-column mini-table row."""
tbl = doc.add_table(rows=1, cols=2)
tbl.columns[0].width = Cm(0.8)
tbl.columns[1].width = Cm(15.7)
# Icon cell
icon_cell = tbl.cell(0, 0)
set_cell_margins(icon_cell, top=40, bottom=40, left=60, right=40)
ip = icon_cell.paragraphs[0]
ip.alignment = WD_ALIGN_PARAGRAPH.CENTER
ir = ip.add_run(icon)
ir.font.size = Pt(14)
# Text cell
text_cell = tbl.cell(0, 1)
set_cell_margins(text_cell, top=40, bottom=40, left=80, right=80)
# Title
tp = text_cell.paragraphs[0]
tp.paragraph_format.space_before = Pt(0)
tp.paragraph_format.space_after = Pt(1)
tr = tp.add_run(title + " ")
tr.bold = True
tr.font.size = Pt(10.5)
tr.font.name = 'Calibri'
tr.font.color.rgb = title_color
# Description
dp = text_cell.add_paragraph(description)
dp.paragraph_format.space_before = Pt(0)
dp.paragraph_format.space_after = Pt(3)
for run in dp.runs:
run.font.size = Pt(9.5)
run.font.name = 'Calibri'
run.font.color.rgb = C_GREY
# Remove table borders for clean look
for row in tbl.rows:
for cell in row.cells:
tc = cell._tc
tcPr = tc.get_or_add_tcPr()
tcBorders = OxmlElement('w:tcBorders')
for side in ['top','left','bottom','right','insideH','insideV']:
el = OxmlElement(f'w:{side}')
el.set(qn('w:val'), 'none')
tcBorders.append(el)
tcPr.append(tcBorders)
# Bottom divider paragraph
div = doc.add_paragraph()
div.paragraph_format.space_before = Pt(0)
div.paragraph_format.space_after = Pt(2)
set_para_border_bottom(div, 'DDDDDD', 2)
def spacer(doc, pts=4):
p = doc.add_paragraph()
p.paragraph_format.space_before = Pt(0)
p.paragraph_format.space_after = Pt(pts)
# ─── BUILD DOCUMENT ────────────────────────────────────────
doc = Document()
# Page margins
for section in doc.sections:
section.top_margin = Cm(1.5)
section.bottom_margin = Cm(1.5)
section.left_margin = Cm(2.0)
section.right_margin = Cm(2.0)
# Default style
style = doc.styles['Normal']
style.font.name = 'Calibri'
style.font.size = Pt(11)
# ════════════════════════════════════════════════════════════
# HEADER TABLE: Logos + College Name
# ════════════════════════════════════════════════════════════
header_tbl = doc.add_table(rows=1, cols=3)
header_tbl.columns[0].width = Cm(3.0)
header_tbl.columns[1].width = Cm(11.0)
header_tbl.columns[2].width = Cm(3.0)
# Remove borders
for row in header_tbl.rows:
for cell in row.cells:
tc = cell._tc
tcPr = tc.get_or_add_tcPr()
tcBorders = OxmlElement('w:tcBorders')
for side in ['top','left','bottom','right','insideH','insideV']:
el = OxmlElement(f'w:{side}')
el.set(qn('w:val'), 'none')
tcBorders.append(el)
tcPr.append(tcBorders)
set_cell_bg(cell, 'FFFFFF')
# NCISM logo (left)
ncism_cell = header_tbl.cell(0, 0)
ncism_cell.vertical_alignment = WD_ALIGN_VERTICAL.CENTER
np_ = ncism_cell.paragraphs[0]
np_.alignment = WD_ALIGN_PARAGRAPH.CENTER
try:
nr = np_.add_run()
nr.add_picture('/tmp/workspace/ayurgrama-poster/logo_ncism.jpg', width=Cm(2.5))
except Exception as e:
np_.add_run('[NCISM]').font.size = Pt(8)
# College name (center)
center_cell = header_tbl.cell(0, 1)
center_cell.vertical_alignment = WD_ALIGN_VERTICAL.CENTER
cp = center_cell.paragraphs[0]
cp.alignment = WD_ALIGN_PARAGRAPH.CENTER
cr1 = cp.add_run('महाराणा प्रताप आयुर्वेदिक मेडिकल कॉलेज एवं हॉस्पिटल\n')
cr1.bold = True
cr1.font.size = Pt(13)
cr1.font.color.rgb = C_SAFFRON_D
cr1.font.name = 'Calibri'
cr2 = cp.add_run('Maharana Pratap Ayurvedic Medical College & Hospital\n')
cr2.font.size = Pt(9)
cr2.font.color.rgb = C_GREY
cr2.font.name = 'Calibri'
cr3 = cp.add_run('MPGI Group of Institutions')
cr3.font.size = Pt(8)
cr3.font.color.rgb = C_GREY
cr3.font.name = 'Calibri'
# MPGI logo (right)
mpgi_cell = header_tbl.cell(0, 2)
mpgi_cell.vertical_alignment = WD_ALIGN_VERTICAL.CENTER
mp = mpgi_cell.paragraphs[0]
mp.alignment = WD_ALIGN_PARAGRAPH.CENTER
try:
mr = mp.add_run()
mr.add_picture('/tmp/workspace/ayurgrama-poster/logo_mpgi.jpg', width=Cm(2.5))
except Exception as e:
mp.add_run('[MPGI]').font.size = Pt(8)
spacer(doc, 6)
# ── Horizontal Rule ──
hr = doc.add_paragraph()
hr.paragraph_format.space_before = Pt(0)
hr.paragraph_format.space_after = Pt(0)
set_para_border_bottom(hr, 'E07B00', 12)
spacer(doc, 4)
# ════════════════════════════════════════════════════════════
# AYURGRAMA BADGE + MAIN TITLE
# ════════════════════════════════════════════════════════════
badge_tbl = doc.add_table(rows=1, cols=2)
badge_tbl.columns[0].width = Cm(3.2)
badge_tbl.columns[1].width = Cm(13.8)
for row in badge_tbl.rows:
for cell in row.cells:
tc = cell._tc
tcPr = tc.get_or_add_tcPr()
tcBorders = OxmlElement('w:tcBorders')
for side in ['top','left','bottom','right']:
el = OxmlElement(f'w:{side}')
el.set(qn('w:val'), 'none')
tcBorders.append(el)
tcPr.append(tcBorders)
ayur_cell = badge_tbl.cell(0, 0)
ayur_cell.vertical_alignment = WD_ALIGN_VERTICAL.CENTER
ap = ayur_cell.paragraphs[0]
ap.alignment = WD_ALIGN_PARAGRAPH.CENTER
try:
ar = ap.add_run()
ar.add_picture('/tmp/workspace/ayurgrama-poster/logo_ayurgrama.jpg', width=Cm(2.8))
except:
ap.add_run('[Ayurgrama]').font.size = Pt(8)
title_cell = badge_tbl.cell(0, 1)
title_cell.vertical_alignment = WD_ALIGN_VERTICAL.CENTER
tp = title_cell.paragraphs[0]
tp.alignment = WD_ALIGN_PARAGRAPH.LEFT
set_cell_margins(title_cell, left=160)
t1 = tp.add_run('॥ सद्वृत्त ॥\n')
t1.bold = True
t1.font.size = Pt(28)
t1.font.color.rgb = C_SAFFRON_D
t1.font.name = 'Calibri'
t2 = tp.add_run('AYURGRAMA 3.0 — इन्द्रिय आरोग्य\n')
t2.bold = True
t2.font.size = Pt(11)
t2.font.color.rgb = C_GREEN_D
t2.font.name = 'Calibri'
t3 = tp.add_run('स्वस्थ जीवन के आयुर्वेदिक नियम | Sadvritta — Daily Health Rules')
t3.font.size = Pt(9)
t3.font.color.rgb = C_GREY
t3.font.name = 'Calibri'
spacer(doc, 4)
# ── Horizontal Rule ──
hr2 = doc.add_paragraph()
hr2.paragraph_format.space_before = Pt(0)
hr2.paragraph_format.space_after = Pt(6)
set_para_border_bottom(hr2, 'E07B00', 8)
# ════════════════════════════════════════════════════════════
# DEFINITION BOX
# ════════════════════════════════════════════════════════════
def_tbl = doc.add_table(rows=1, cols=1)
def_tbl.style = 'Table Grid'
def_cell = def_tbl.cell(0, 0)
set_cell_bg(def_cell, '1A5C1A')
set_cell_margins(def_cell, top=100, bottom=100, left=180, right=180)
dp = def_cell.paragraphs[0]
dp.alignment = WD_ALIGN_PARAGRAPH.LEFT
d1 = dp.add_run('📖 सद्वृत्त क्या है?\n')
d1.bold = True
d1.font.size = Pt(13)
d1.font.color.rgb = RGBColor(0xFF, 0xD5, 0x4F)
d1.font.name = 'Calibri'
d2 = dp.add_run('सद्वृत्त = सत् (अच्छा) + वृत्त (आचरण/व्यवहार)\n')
d2.bold = True
d2.font.size = Pt(10.5)
d2.font.color.rgb = RGBColor(0xA5, 0xD6, 0xA7)
d2.font.name = 'Calibri'
d3 = dp.add_run(
'आयुर्वेद में सद्वृत्त उन दैनिक नियमों और आचरणों का समूह है जो हमारे शरीर, मन और आत्मा को '
'स्वस्थ रखते हैं। जो व्यक्ति इन नियमों का पालन करता है, वह रोगों से बचा रहता है और लंबा, '
'सुखी जीवन जीता है।\n'
)
d3.font.size = Pt(9.5)
d3.font.color.rgb = RGBColor(0xE8, 0xF5, 0xE9)
d3.font.name = 'Calibri'
d4 = dp.add_run('💡 सरल अर्थ: अच्छी आदतें अपनाओ — स्वस्थ जीवन पाओ!')
d4.bold = True
d4.italic = True
d4.font.size = Pt(9.5)
d4.font.color.rgb = RGBColor(0xFF, 0xE0, 0x82)
d4.font.name = 'Calibri'
spacer(doc, 8)
# ════════════════════════════════════════════════════════════
# SECTION DATA
# ════════════════════════════════════════════════════════════
sections = [
{
"title": "🌅 १. सुबह की दिनचर्या (Morning Routine)",
"bg": "E65100", "color": C_ORANGE,
"points": [
("⏰", "ब्राह्ममुहूर्त में उठें",
"सूरज निकलने से डेढ़ घंटे पहले उठें — मन ताजा रहता है, शरीर में ऊर्जा आती है।"),
("🦷", "दाँत साफ करें",
"नीम या बबूल की दातुन या ब्रश से सुबह-शाम दाँत साफ करें — दाँत व मसूड़े मजबूत रहते हैं।"),
("👅", "जीभ साफ करें",
"जीभ खुरचनी से जीभ साफ करें — मुँह की बदबू दूर होती है, पाचन अच्छा होता है।"),
("💧", "सुबह गुनगुना पानी पीएं",
"उठते ही 1-2 गिलास गुनगुना पानी पीएं — पेट साफ रहता है, शरीर की गंदगी बाहर निकलती है।"),
("🧘", "व्यायाम और योग करें",
"रोज 30 मिनट चलना, सूर्य नमस्कार या हल्का व्यायाम करें — शरीर चुस्त-दुरुस्त रहता है।"),
]
},
{
"title": "🍽️ २. आहार स्वच्छता (Food Hygiene)",
"bg": "2E7D32", "color": C_GREEN,
"points": [
("🤲", "खाने से पहले हाथ धोएं",
"साबुन से 20 सेकंड हाथ धोएं — पेट की बीमारियाँ जैसे दस्त, पेचिश दूर रहती हैं।"),
("🥗", "ताजा और सादा खाएं",
"बासी, जंक फूड और पैकेट बंद खाना मत खाएं — ताजी रोटी, दाल, सब्जी खाएं।"),
("🫙", "साफ पानी पीएं",
"उबला या छना हुआ पानी पीएं — टाइफाइड, दस्त जैसी बीमारियाँ नहीं होतीं।"),
("🌿", "हरी सब्जी और फल खाएं",
"पालक, टमाटर, आंवला, केला खाएं — खून बढ़ता है, शरीर मजबूत होता है।"),
("🍱", "धीरे-धीरे खाएं",
"खाना चबा-चबाकर खाएं — पाचन ठीक रहता है, गैस और अपच नहीं होती।"),
]
},
{
"title": "🧼 ३. व्यक्तिगत स्वच्छता (Personal Hygiene)",
"bg": "1565C0", "color": C_BLUE,
"points": [
("🚿", "रोज नहाएं",
"रोज नहाने से शरीर के कीटाणु, पसीना और गंदगी दूर होती है — त्वचा स्वस्थ रहती है।"),
("💅", "नाखून छोटे रखें",
"लंबे नाखूनों में गंदगी जमती है जो खाने के साथ पेट में जाती है — हर हफ्ते काटें।"),
("💈", "बाल साफ रखें",
"हफ्ते में 2 बार बाल धोएं, नियमित कंघी करें — जूएं और फंगस नहीं होती।"),
("👕", "साफ कपड़े पहनें",
"रोज धुले कपड़े पहनें — त्वचा रोग और संक्रमण से बचाव होता है।"),
("🚽", "शौचालय का उपयोग करें",
"खुले में शौच मत करें — बीमारियाँ फैलती हैं। शौच के बाद साबुन से हाथ धोएं।"),
]
},
{
"title": "🌸 ४. मासिक धर्म स्वच्छता (Menstrual Hygiene — किशोरियों के लिए)",
"bg": "880E4F", "color": C_PINK,
"special_note": "💗 मासिक धर्म एक प्राकृतिक व स्वस्थ प्रक्रिया है — इसमें कोई शर्म नहीं है।",
"points": [
("🩹", "साफ पैड या कपड़े का उपयोग करें",
"गंदे कपड़े से इन्फेक्शन होता है — साफ सैनिटरी पैड या धुला कपड़ा उपयोग करें।"),
("⏱️", "हर 4-6 घंटे में पैड बदलें",
"ज्यादा देर तक एक ही पैड रखने से बैक्टीरिया पनपते हैं और इन्फेक्शन होता है।"),
("🤲", "पैड बदलने से पहले-बाद हाथ धोएं",
"साबुन से हाथ धोना जरूरी है — कीटाणुओं से बचाव होता है।"),
("🚿", "पीरियड्स में रोज नहाएं",
"पीरियड्स में नहाना बंद मत करें — नहाने से साफ-सफाई रहती है, इन्फेक्शन नहीं होता।"),
("🗑️", "पैड सही तरह फेंकें",
"इस्तेमाल किया पैड कागज में लपेटकर कूड़ेदान में डालें — खुले में मत फेंकें।"),
("🥬", "आयरन युक्त खाना खाएं",
"पालक, गुड़, खजूर, चना खाएं — खून की कमी (एनीमिया) नहीं होगी।"),
("🛌", "दर्द होने पर आराम करें",
"पेट में दर्द हो तो गरम पानी की थैली रखें, आराम करें — यह सामान्य है।"),
("👩⚕️", "डॉक्टर से मिलें",
"बहुत ज्यादा दर्द या अनियमित पीरियड्स पर महिला डॉक्टर या आशा दीदी से मिलें।"),
]
},
{
"title": "🌿 ५. पर्यावरण स्वच्छता (Environment Hygiene)",
"bg": "00695C", "color": C_TEAL,
"points": [
("🗑️", "कूड़ा डस्टबिन में डालें",
"गाँव और घर को साफ रखें — गंदगी से मक्खी, मच्छर और बीमारियाँ आती हैं।"),
("🦟", "पानी जमा न होने दें",
"रुके हुए पानी में मच्छर पैदा होते हैं — मलेरिया, डेंगू से बचाव होता है।"),
("🌱", "पेड़-पौधे लगाएं",
"घर के आसपास तुलसी, नीम लगाएं — हवा शुद्ध होती है, बीमारियाँ दूर रहती हैं।"),
("🏠", "घर में हवा-रोशनी आने दें",
"खिड़की-दरवाजे खुले रखें — ताजी हवा और धूप से कीटाणु मरते हैं।"),
]
},
{
"title": "🌙 ६. रात की दिनचर्या व मानसिक स्वास्थ्य (Night Routine & Mental Health)",
"bg": "4A148C", "color": C_PURPLE,
"points": [
("🛌", "जल्दी सोएं (रात 10 बजे तक)",
"8 घंटे की नींद जरूरी है — देर रात जागने से शरीर और दिमाग कमजोर होता है।"),
("🦶", "सोने से पहले पैर धोएं",
"गरम पानी से पैर धोकर सोएं — अच्छी नींद आती है, थकान दूर होती है।"),
("📵", "मोबाइल बंद रखें",
"सोने से 1 घंटे पहले मोबाइल बंद करें — आँखें और दिमाग को आराम मिलता है।"),
("🙏", "सकारात्मक सोचें",
"रोज ईश्वर का धन्यवाद करें — मन शांत रहता है, तनाव दूर होता है।"),
]
},
]
# ════════════════════════════════════════════════════════════
# DRAW ALL SECTIONS
# ════════════════════════════════════════════════════════════
for sec in sections:
# Section heading colored box
add_heading_box(doc, sec["title"], sec["bg"], C_WHITE, font_size=12)
# Special note (menstrual section)
if "special_note" in sec:
note_tbl = doc.add_table(rows=1, cols=1)
note_cell = note_tbl.cell(0, 0)
set_cell_bg(note_cell, 'FFF9C4')
set_cell_margins(note_cell, top=50, bottom=50, left=140, right=140)
np_ = note_cell.paragraphs[0]
np_.alignment = WD_ALIGN_PARAGRAPH.CENTER
nr = np_.add_run(sec["special_note"])
nr.bold = True
nr.font.size = Pt(9.5)
nr.font.color.rgb = RGBColor(0x5D, 0x40, 0x37)
nr.font.name = 'Calibri'
spacer(doc, 2)
# Points
for (icon, title, desc) in sec["points"]:
add_point_row(doc, icon, title, desc, title_color=sec["color"])
spacer(doc, 8)
# ════════════════════════════════════════════════════════════
# FOOTER
# ════════════════════════════════════════════════════════════
hr_final = doc.add_paragraph()
hr_final.paragraph_format.space_before = Pt(4)
hr_final.paragraph_format.space_after = Pt(0)
set_para_border_bottom(hr_final, '1B5E20', 10)
footer_tbl = doc.add_table(rows=1, cols=1)
f_cell = footer_tbl.cell(0, 0)
set_cell_bg(f_cell, '1B5E20')
set_cell_margins(f_cell, top=100, bottom=100, left=160, right=160)
fp = f_cell.paragraphs[0]
fp.alignment = WD_ALIGN_PARAGRAPH.CENTER
f1 = fp.add_run('🌱 स्वस्थ गाँव, सुखी जीवन 🌱\n')
f1.bold = True
f1.font.size = Pt(15)
f1.font.color.rgb = C_WHITE
f1.font.name = 'Calibri'
f2 = fp.add_run('सद्वृत्त अपनाओ — निरोगी जीवन पाओ!\n')
f2.bold = True
f2.font.size = Pt(12)
f2.font.color.rgb = RGBColor(0xFF, 0xD5, 0x4F)
f2.font.name = 'Calibri'
f3 = fp.add_run('महाराणा प्रताप आयुर्वेदिक मेडिकल कॉलेज एवं हॉस्पिटल | MPGI Group\n')
f3.font.size = Pt(9)
f3.font.color.rgb = RGBColor(0xC8, 0xE6, 0xC9)
f3.font.name = 'Calibri'
f4 = fp.add_run('AYURGRAMA 3.0 — इन्द्रिय आरोग्य | NCISM — आयुषे सर्वलोकानाम् | ॥ सद्वचनमनुछेयानाम् ॥')
f4.font.size = Pt(8)
f4.font.color.rgb = RGBColor(0xA5, 0xD6, 0xA7)
f4.font.name = 'Calibri'
# ════════════════════════════════════════════════════════════
# SAVE
# ════════════════════════════════════════════════════════════
import os
doc.save(OUTPUT)
print(f"✅ Word document saved: {OUTPUT}")
print(f"File size: {os.path.getsize(OUTPUT) / 1024:.1f} KB")
cd /tmp/workspace/ayurgrama-poster && python3 build_docx.py 2>&1
cd /tmp/workspace/ayurgrama-poster && python3 -c " from docx import Document doc = Document('Sadvritta_School_Distribution.docx') count = 0 for p in doc.paragraphs: if p.text.strip(): print(p.text[:80]) count += 1 if count > 20: break print(f'...Total paragraphs: {len(doc.paragraphs)}, Tables: {len(doc.tables)}') "
Sadvritta School Distribution
Word Document · DOCX
| Element | Details |
|---|---|
| Header | NCISM logo + MPGI logo + College name in Hindi & English |
| Ayurgrama badge | Logo + "॥ सद्वृत्त ॥" title + event name |
| Definition box | Dark green box - सद्वृत्त क्या है, सरल हिंदी में |
| 🌅 सुबह की दिनचर्या | 5 points - उठना, दाँत, जीभ, पानी, योग |
| 🍽️ आहार स्वच्छता | 5 points - हाथ धोना, ताजा खाना, पानी, फल, चबाना |
| 🧼 व्यक्तिगत स्वच्छता | 5 points - नहाना, नाखून, बाल, कपड़े, शौचालय |
| 🌸 मासिक धर्म स्वच्छता | 8 points - किशोरियों के लिए, yellow note box सहित |
| 🌿 पर्यावरण स्वच्छता | 4 points - कूड़ा, मच्छर, पेड़, हवा |
| 🌙 रात की दिनचर्या | 4 points - नींद, पैर, मोबाइल, सकारात्मक सोच |
| Footer | Green box - स्वस्थ गाँव, सुखी जीवन + NCISM tagline |
Generate an Excel tracker for school health monitoring based on Sadvritta principles
~/ayurgrama-poster/build_tracker.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Sadvritta School Health Monitoring Tracker
Maharana Pratap Ayurvedic Medical College & Hospital | Ayurgrama 3.0
Multi-sheet Excel workbook built with openpyxl
"""
import openpyxl
from openpyxl import Workbook
from openpyxl.styles import (
Font, PatternFill, Alignment, Border, Side,
GradientFill
)
from openpyxl.utils import get_column_letter
from openpyxl.chart import BarChart, Reference, PieChart
from openpyxl.chart.series import DataPoint
from openpyxl.worksheet.datavalidation import DataValidation
from openpyxl.formatting.rule import ColorScaleRule, DataBarRule, CellIsRule, FormulaRule
from openpyxl.styles.differential import DifferentialStyle
import os
OUTPUT = "/tmp/workspace/ayurgrama-poster/Sadvritta_School_Health_Tracker.xlsx"
wb = Workbook()
# ─── SHARED STYLES ───────────────────────────────────────────────────────────
def fill(hex_color):
return PatternFill("solid", fgColor=hex_color)
def font(name="Arial", size=10, bold=False, italic=False, color="000000"):
return Font(name=name, size=size, bold=bold, italic=italic, color=color)
def align(h="center", v="center", wrap=False):
return Alignment(horizontal=h, vertical=v, wrap_text=wrap)
def border(style="thin", color="AAAAAA"):
s = Side(style=style, color=color)
return Border(left=s, right=s, top=s, bottom=s)
def thick_border():
t = Side(style="medium", color="333333")
return Border(left=t, right=t, top=t, bottom=t)
# Color palette
COL = {
"saffron": "E07B00",
"saffron_l": "FFF3E0",
"saffron_d": "C86000",
"green_d": "1B5E20",
"green": "2E7D32",
"green_l": "E8F5E9",
"orange": "E65100",
"orange_l": "FFF8E1",
"blue_d": "1565C0",
"blue_l": "E3F2FD",
"pink_d": "880E4F",
"pink_l": "FCE4EC",
"teal_d": "00695C",
"teal_l": "E0F2F1",
"purple_d": "4A148C",
"purple_l": "F3E5F5",
"gold": "FFC107",
"gold_l": "FFF9C4",
"white": "FFFFFF",
"grey_l": "F5F5F5",
"grey": "EEEEEE",
"grey_d": "9E9E9E",
"red": "C62828",
"red_l": "FFEBEE",
"yes_green": "C8E6C9",
"no_red": "FFCDD2",
"hdr_dark": "263238",
"row_alt": "FAFAFA",
}
def apply_header(ws, row, col, text, bg, fg="FFFFFF", size=10, bold=True,
h_align="center", wrap=False, colspan=1):
cell = ws.cell(row=row, column=col, value=text)
cell.fill = fill(bg)
cell.font = font("Arial", size, bold, color=fg)
cell.alignment = align(h_align, "center", wrap)
cell.border = border("thin", "888888")
return cell
def style_data_cell(ws, row, col, value=None, bg=None, fg="000000",
size=9, bold=False, h_align="center", wrap=False, num_format=None):
cell = ws.cell(row=row, column=col)
if value is not None:
cell.value = value
if bg:
cell.fill = fill(bg)
cell.font = font("Arial", size, bold, color=fg)
cell.alignment = align(h_align, "center", wrap)
cell.border = border("thin", "CCCCCC")
if num_format:
cell.number_format = num_format
return cell
def merge_header(ws, row, c1, c2, text, bg, fg="FFFFFF", size=11, bold=True):
ws.merge_cells(start_row=row, start_column=c1, end_row=row, end_column=c2)
cell = ws.cell(row=row, column=c1, value=text)
cell.fill = fill(bg)
cell.font = font("Arial", size, bold, color=fg)
cell.alignment = align("center", "center", True)
cell.border = border("medium", "555555")
return cell
# ═══════════════════════════════════════════════════════════════════════════
# SHEET 1: COVER / INSTRUCTIONS
# ═══════════════════════════════════════════════════════════════════════════
ws_cover = wb.active
ws_cover.title = "📋 Cover"
ws_cover.sheet_view.showGridLines = False
# Set column widths
for col in range(1, 10):
ws_cover.column_dimensions[get_column_letter(col)].width = 18
ws_cover.row_dimensions[1].height = 8
ws_cover.row_dimensions[2].height = 50
ws_cover.row_dimensions[3].height = 30
ws_cover.row_dimensions[4].height = 25
ws_cover.row_dimensions[5].height = 20
# Banner row
ws_cover.merge_cells("A2:I2")
c = ws_cover["A2"]
c.value = "॥ सद्वृत्त ॥ SADVRITTA SCHOOL HEALTH MONITORING TRACKER"
c.fill = fill(COL["saffron_d"])
c.font = Font(name="Arial", size=20, bold=True, color="FFFFFF")
c.alignment = Alignment(horizontal="center", vertical="center", wrap_text=True)
ws_cover.merge_cells("A3:I3")
c3 = ws_cover["A3"]
c3.value = "AYURGRAMA 3.0 — Maharana Pratap Ayurvedic Medical College & Hospital | MPGI Group"
c3.fill = fill(COL["green_d"])
c3.font = Font(name="Arial", size=11, bold=True, color="FFFFFF")
c3.alignment = Alignment(horizontal="center", vertical="center")
ws_cover.merge_cells("A4:I4")
c4 = ws_cover["A4"]
c4.value = "महाराणा प्रताप आयुर्वेदिक मेडिकल कॉलेज एवं हॉस्पिटल | NCISM — आयुषे सर्वलोकानाम्"
c4.fill = fill(COL["orange_l"])
c4.font = Font(name="Arial", size=10, bold=False, color=COL["orange"])
c4.alignment = Alignment(horizontal="center", vertical="center")
# Spacer
ws_cover.merge_cells("A5:I5")
ws_cover["A5"].fill = fill("FFFFFF")
ws_cover.row_dimensions[5].height = 10
# About section
about_data = [
(6, "📖 About This Tracker", COL["blue_d"], "FFFFFF", 12, True),
(7, "This Excel workbook helps teachers and health workers monitor students' daily Sadvritta (healthy habits) compliance.", "FFFFFF", "333333", 10, False),
(8, "It is designed for Ayurgrama 3.0 village school health camps and ongoing monitoring of student health practices.", "FFFFFF", "333333", 10, False),
(9, "", "FFFFFF", "333333", 10, False),
(10, "📌 HOW TO USE THIS TRACKER", COL["green_d"], "FFFFFF", 12, True),
]
for row_data in about_data:
r, txt, bg, fg, sz, bd = row_data
ws_cover.merge_cells(f"A{r}:I{r}")
c = ws_cover[f"A{r}"]
c.value = txt
c.fill = fill(bg)
c.font = Font(name="Arial", size=sz, bold=bd, color=fg)
c.alignment = Alignment(horizontal="left", vertical="center", indent=1, wrap_text=True)
ws_cover.row_dimensions[r].height = 22 if sz == 12 else 18
instructions = [
("Sheet 1", "📋 Cover", "You are here! Contains overview and instructions."),
("Sheet 2", "👨🎓 Student Register", "Enter all student details: name, class, roll number, age, gender."),
("Sheet 3", "📅 Daily Tracker", "Mark daily Sadvritta habit compliance (✓/✗) for each student."),
("Sheet 4", "📊 Weekly Report", "Auto-calculated weekly summary scores per student per habit category."),
("Sheet 5", "🏥 Health Checkup Log", "Record periodic health checkup findings for each student."),
("Sheet 6", "📈 Dashboard", "Visual charts and class-level health compliance overview."),
]
# Table header for instructions
ws_cover.merge_cells("A11:I11")
c = ws_cover["A11"]
c.value = "Sheet Guide"
c.fill = fill(COL["hdr_dark"])
c.font = Font(name="Arial", size=10, bold=True, color="FFFFFF")
c.alignment = Alignment(horizontal="center", vertical="center")
ws_cover.row_dimensions[11].height = 20
hdrs = ["Sheet No.", "Sheet Name", "Purpose"]
col_widths_instr = [12, 25, 55]
for ci, (hdr, w) in enumerate(zip(hdrs, col_widths_instr), 1):
cell = ws_cover.cell(row=12, column=ci, value=hdr)
cell.fill = fill(COL["grey"])
cell.font = Font(name="Arial", size=9, bold=True, color="333333")
cell.alignment = Alignment(horizontal="center", vertical="center")
cell.border = border("thin", "AAAAAA")
ws_cover.column_dimensions[get_column_letter(ci)].width = w
for ri, (sno, sname, purpose) in enumerate(instructions, 13):
bg = COL["row_alt"] if ri % 2 == 1 else COL["white"]
for ci, val in enumerate([sno, sname, purpose], 1):
cell = ws_cover.cell(row=ri, column=ci, value=val)
cell.fill = fill(bg)
cell.font = Font(name="Arial", size=9, color="222222")
cell.alignment = Alignment(horizontal="left" if ci == 3 else "center",
vertical="center", wrap_text=True, indent=1)
cell.border = border("thin", "CCCCCC")
ws_cover.row_dimensions[ri].height = 18
# Sadvritta categories reference
ws_cover.row_dimensions[20].height = 10
ws_cover.merge_cells("A21:I21")
c21 = ws_cover["A21"]
c21.value = "🌿 SADVRITTA HABIT CATEGORIES TRACKED"
c21.fill = fill(COL["green_d"])
c21.font = Font(name="Arial", size=12, bold=True, color="FFFFFF")
c21.alignment = Alignment(horizontal="center", vertical="center")
ws_cover.row_dimensions[21].height = 22
cats = [
("🌅", "सुबह की दिनचर्या", "Morning Routine", "Waking early, teeth/tongue cleaning, morning water, exercise", COL["orange"]),
("🍽️", "आहार स्वच्छता", "Food Hygiene", "Hand washing, fresh food, clean water, slow eating", COL["green"]),
("🧼", "व्यक्तिगत स्वच्छता", "Personal Hygiene", "Daily bath, nails, hair, clean clothes, toilet use", COL["blue_d"]),
("🌸", "मासिक धर्म स्वच्छता", "Menstrual Hygiene", "Pad use/change, hand washing, disposal, diet (girls)", COL["pink_d"]),
("🌿", "पर्यावरण स्वच्छता", "Environment Hygiene", "Dustbin use, no stagnant water, plants, ventilation", COL["teal_d"]),
("🌙", "रात की दिनचर्या", "Night Routine", "Early sleep, washing feet, no late mobile, positive thinking", COL["purple_d"]),
]
cat_hdrs = ["Icon", "Hindi Name", "English Name", "Habits Covered", "Color Code"]
for ci, hdr in enumerate(cat_hdrs, 1):
cell = ws_cover.cell(row=22, column=ci, value=hdr)
cell.fill = fill(COL["hdr_dark"])
cell.font = Font(name="Arial", size=9, bold=True, color="FFFFFF")
cell.alignment = Alignment(horizontal="center", vertical="center")
cell.border = border("thin", "888888")
for ri, (icon, hindi, eng, habits, color) in enumerate(cats, 23):
row_bg = COL["row_alt"] if ri % 2 == 0 else COL["white"]
vals = [icon, hindi, eng, habits, ""]
widths_c = [6, 22, 20, 50, 12]
for ci, (val, w) in enumerate(zip(vals, widths_c), 1):
cell = ws_cover.cell(row=ri, column=ci, value=val)
cell.fill = fill(color + "22") if ci < 5 else fill(color)
cell.font = Font(name="Arial", size=9, color="111111" if ci < 5 else "FFFFFF")
cell.alignment = Alignment(horizontal="center" if ci in [1,5] else "left",
vertical="center", wrap_text=True, indent=1)
cell.border = border("thin", "CCCCCC")
ws_cover.row_dimensions[ri].height = 22
# ═══════════════════════════════════════════════════════════════════════════
# SHEET 2: STUDENT REGISTER
# ═══════════════════════════════════════════════════════════════════════════
ws_reg = wb.create_sheet("👨🎓 Student Register")
ws_reg.sheet_view.showGridLines = False
# Title
ws_reg.merge_cells("A1:J1")
c = ws_reg["A1"]
c.value = "👨🎓 STUDENT REGISTER — SADVRITTA HEALTH MONITORING"
c.fill = fill(COL["blue_d"])
c.font = Font(name="Arial", size=14, bold=True, color="FFFFFF")
c.alignment = Alignment(horizontal="center", vertical="center")
ws_reg.row_dimensions[1].height = 32
ws_reg.merge_cells("A2:J2")
c2 = ws_reg["A2"]
c2.value = "School: _________________ | Class: _______ | Academic Year: _______ | Teacher: _________________"
c2.fill = fill(COL["saffron_l"])
c2.font = Font(name="Arial", size=10, color=COL["saffron_d"])
c2.alignment = Alignment(horizontal="left", vertical="center", indent=2)
ws_reg.row_dimensions[2].height = 20
# Headers
reg_cols = [
("Roll No.", 8),
("Student Name\n(छात्र का नाम)", 22),
("Class\n(कक्षा)", 8),
("Section", 8),
("Age\n(आयु)", 7),
("Gender\n(लिंग)", 9),
("Father's Name\n(पिता का नाम)", 22),
("Mobile No.\n(मोबाइल)", 14),
("Health ID", 12),
("Remarks\n(टिप्पणी)", 24),
]
for ci, (hdr, w) in enumerate(reg_cols, 1):
cell = ws_reg.cell(row=3, column=ci, value=hdr)
cell.fill = fill(COL["hdr_dark"])
cell.font = Font(name="Arial", size=9, bold=True, color="FFFFFF")
cell.alignment = Alignment(horizontal="center", vertical="center", wrap_text=True)
cell.border = border("medium", "444444")
ws_reg.column_dimensions[get_column_letter(ci)].width = w
ws_reg.row_dimensions[3].height = 36
# Data validation for gender
dv_gender = DataValidation(type="list", formula1='"Male,Female,Other"', allow_blank=True)
dv_gender.sqref = "F4:F53"
ws_reg.add_data_validation(dv_gender)
# Sample data rows (30 students)
sample_names = [
("Aarav Sharma", "9th", "A", 14, "Male", "Rajesh Sharma"),
("Priya Patel", "9th", "A", 14, "Female", "Suresh Patel"),
("Rohan Verma", "9th", "A", 15, "Male", "Anil Verma"),
("Sneha Gupta", "9th", "A", 14, "Female", "Ramesh Gupta"),
("Arjun Singh", "9th", "B", 15, "Male", "Vijay Singh"),
("Kavya Joshi", "9th", "B", 14, "Female", "Mohan Joshi"),
("Vivek Yadav", "9th", "B", 15, "Male", "Sunil Yadav"),
("Ananya Tiwari", "9th", "B", 14, "Female", "Rakesh Tiwari"),
("Rahul Chauhan", "9th", "A", 15, "Male", "Deepak Chauhan"),
("Pooja Meena", "9th", "A", 14, "Female", "Vinod Meena"),
("Aditya Kumar", "10th", "A", 15, "Male", "Santosh Kumar"),
("Riya Shah", "10th", "A", 15, "Female", "Harish Shah"),
("Nikhil Bose", "10th", "A", 16, "Male", "Tapan Bose"),
("Divya Nair", "10th", "A", 15, "Female", "Suresh Nair"),
("Karan Malhotra", "10th", "B", 16, "Male", "Suresh Malhotra"),
("Simran Kaur", "10th", "B", 15, "Female", "Gurpreet Singh"),
("Yash Agarwal", "10th", "B", 16, "Male", "Dinesh Agarwal"),
("Nisha Mishra", "10th", "B", 15, "Female", "Ashok Mishra"),
("Siddharth Roy", "10th", "A", 15, "Male", "Biswajit Roy"),
("Tanvi Dubey", "10th", "A", 15, "Female", "Manoj Dubey"),
]
for ri, (name, cls, sec, age, gender, father) in enumerate(sample_names, 4):
row_bg = COL["blue_l"] if ri % 2 == 0 else COL["white"]
vals = [ri - 3, name, cls, sec, age, gender, father, "", f"MPC-{ri-3:03d}", ""]
for ci, val in enumerate(vals, 1):
cell = ws_reg.cell(row=ri, column=ci, value=val)
cell.fill = fill(row_bg)
cell.font = Font(name="Arial", size=9, color="111111",
bold=(ci == 1))
cell.alignment = Alignment(horizontal="center" if ci in [1,3,4,5,6,9] else "left",
vertical="center", indent=1 if ci not in [1,3,4,5,6,9] else 0)
cell.border = border("thin", "CCCCCC")
ws_reg.row_dimensions[ri].height = 17
# Blank rows for more students
for ri in range(24, 54):
row_bg = COL["grey_l"] if ri % 2 == 0 else COL["white"]
for ci in range(1, 11):
cell = ws_reg.cell(row=ri, column=ci)
cell.fill = fill(row_bg)
cell.border = border("thin", "DDDDDD")
cell.alignment = Alignment(horizontal="center", vertical="center")
ws_reg.row_dimensions[ri].height = 17
# Footer note
ws_reg.merge_cells("A55:J55")
note = ws_reg["A55"]
note.value = "📌 Note: Fill student details here first. Roll numbers and names will auto-populate in other sheets. | MPGI Ayurgrama 3.0"
note.fill = fill(COL["gold_l"])
note.font = Font(name="Arial", size=8, italic=True, color="555555")
note.alignment = Alignment(horizontal="left", vertical="center", indent=2)
# ═══════════════════════════════════════════════════════════════════════════
# SHEET 3: DAILY TRACKER
# ═══════════════════════════════════════════════════════════════════════════
ws_daily = wb.create_sheet("📅 Daily Tracker")
ws_daily.sheet_view.showGridLines = False
# Title
ws_daily.merge_cells("A1:AK1")
c = ws_daily["A1"]
c.value = "📅 SADVRITTA DAILY HABIT TRACKER — Mark: ✓ (Yes/हाँ) or ✗ (No/नहीं) or NA"
c.fill = fill(COL["green_d"])
c.font = Font(name="Arial", size=13, bold=True, color="FFFFFF")
c.alignment = Alignment(horizontal="center", vertical="center")
ws_daily.row_dimensions[1].height = 28
# Week/Date row
ws_daily.merge_cells("A2:C2")
ws_daily["A2"].value = "Week: ______"
ws_daily["A2"].fill = fill(COL["orange_l"])
ws_daily["A2"].font = Font(name="Arial", size=9, bold=True, color=COL["orange"])
ws_daily["A2"].alignment = Alignment(horizontal="center", vertical="center")
ws_daily.merge_cells("D2:AK2")
ws_daily["D2"].value = "Date Range: __________________ to __________________ | Class: _______ | Teacher Signature: _________________"
ws_daily["D2"].fill = fill(COL["orange_l"])
ws_daily["D2"].font = Font(name="Arial", size=9, color=COL["saffron_d"])
ws_daily["D2"].alignment = Alignment(horizontal="left", vertical="center", indent=2)
ws_daily.row_dimensions[2].height = 18
# Category headers (row 3)
# Columns: A=Roll, B=Name, C=Class
# Then 6 categories x 5 habits = 30 + daily score + total
habit_categories = [
("🌅 सुबह\nMorning", 5, COL["orange"], COL["orange_l"]),
("🍽️ आहार\nFood", 5, COL["green"], COL["green_l"]),
("🧼 स्वच्छता\nHygiene", 5, COL["blue_d"], COL["blue_l"]),
("🌸 मासिक\nMenstrual", 4, COL["pink_d"], COL["pink_l"]),
("🌿 पर्यावरण\nEnvironment", 4, COL["teal_d"], COL["teal_l"]),
("🌙 रात\nNight", 4, COL["purple_d"], COL["purple_l"]),
]
# Row 3: fixed cols
for ci, (hdr, w) in enumerate([("Roll\nNo.", 6), ("Student Name\n(छात्र नाम)", 20), ("Class", 7)], 1):
ws_daily.column_dimensions[get_column_letter(ci)].width = w
cell = ws_daily.cell(row=3, column=ci, value=hdr)
cell.fill = fill(COL["hdr_dark"])
cell.font = Font(name="Arial", size=9, bold=True, color="FFFFFF")
cell.alignment = Alignment(horizontal="center", vertical="center", wrap_text=True)
cell.border = border("medium", "444444")
ws_daily.row_dimensions[3].height = 36
# Category spans
current_col = 4
cat_col_starts = []
for (cat_name, n_habits, cat_color, cat_bg) in habit_categories:
start_col = current_col
end_col = current_col + n_habits - 1
cat_col_starts.append((start_col, end_col, cat_color, cat_bg))
ws_daily.merge_cells(start_row=3, start_column=start_col, end_row=3, end_column=end_col)
cell = ws_daily.cell(row=3, column=start_col, value=cat_name)
cell.fill = fill(cat_color)
cell.font = Font(name="Arial", size=9, bold=True, color="FFFFFF")
cell.alignment = Alignment(horizontal="center", vertical="center", wrap_text=True)
cell.border = border("medium", "444444")
current_col = end_col + 1
# Score + Total columns
for ci_offset, hdr, bg in [(0, "Daily\nScore", COL["saffron_d"]), (1, "Daily\n%", COL["saffron"])]:
ci = current_col + ci_offset
ws_daily.merge_cells(start_row=3, start_column=ci, end_row=3, end_column=ci)
cell = ws_daily.cell(row=3, column=ci, value=hdr)
cell.fill = fill(bg)
cell.font = Font(name="Arial", size=9, bold=True, color="FFFFFF")
cell.alignment = Alignment(horizontal="center", vertical="center", wrap_text=True)
cell.border = border("medium", "444444")
ws_daily.column_dimensions[get_column_letter(ci)].width = 9
score_col = current_col
pct_col = current_col + 1
# Row 4: individual habit sub-headers
all_habits = [
# Morning (5)
("Early Rise\nजल्दी उठें", COL["orange"]),
("Teeth Clean\nदाँत साफ", COL["orange"]),
("Tongue Clean\nजीभ साफ", COL["orange"]),
("Morning Water\nपानी पीएं", COL["orange"]),
("Exercise/Yoga\nव्यायाम", COL["orange"]),
# Food (5)
("Hand Wash\nहाथ धोएं", COL["green"]),
("Fresh Food\nताजा खाना", COL["green"]),
("Clean Water\nसाफ पानी", COL["green"]),
("Fruits/Veg\nफल-सब्जी", COL["green"]),
("Slow Eating\nचबाकर खाएं", COL["green"]),
# Personal Hygiene (5)
("Daily Bath\nनहाएं", COL["blue_d"]),
("Nails Trimmed\nनाखून", COL["blue_d"]),
("Hair Clean\nबाल साफ", COL["blue_d"]),
("Clean Clothes\nसाफ कपड़े", COL["blue_d"]),
("Toilet Use\nशौचालय", COL["blue_d"]),
# Menstrual (4) - Girls
("Pad/Cloth Use\nपैड उपयोग", COL["pink_d"]),
("Change Pad\nपैड बदला", COL["pink_d"]),
("Hand Wash\nहाथ धोए", COL["pink_d"]),
("Proper Disposal\nसही निपटान", COL["pink_d"]),
# Environment (4)
("Dustbin Use\nकूड़ादान", COL["teal_d"]),
("No Water Log\nपानी नहीं जमा", COL["teal_d"]),
("Clean Surroundings\nसफाई", COL["teal_d"]),
("Ventilation\nहवा-रोशनी", COL["teal_d"]),
# Night (4)
("Early Sleep\nजल्दी सोएं", COL["purple_d"]),
("Wash Feet\nपैर धोएं", COL["purple_d"]),
("No Late Mobile\nमोबाइल बंद", COL["purple_d"]),
("Positive Think\nसकारात्मक", COL["purple_d"]),
]
for ci, (habit_name, hcolor) in enumerate(all_habits, 4):
cell = ws_daily.cell(row=4, column=ci, value=habit_name)
cell.fill = fill(hcolor + "33") if len(hcolor) == 6 else fill("EEEEEE")
cell.font = Font(name="Arial", size=7.5, bold=False, color="111111")
cell.alignment = Alignment(horizontal="center", vertical="center", wrap_text=True)
cell.border = border("thin", "AAAAAA")
ws_daily.column_dimensions[get_column_letter(ci)].width = 9
ws_daily.row_dimensions[4].height = 42
# Fixed col headers row 4
for ci, hdr in [(1, ""), (2, ""), (3, "")]:
cell = ws_daily.cell(row=4, column=ci, value=hdr)
cell.fill = fill(COL["hdr_dark"])
cell.border = border("medium", "444444")
# Data rows (20 students sample)
total_habit_cols = len(all_habits) # 27
for ri, (name, cls, sec, age, gender, father) in enumerate(sample_names, 5):
row_bg = COL["grey_l"] if ri % 2 == 0 else COL["white"]
# Roll
cell = ws_daily.cell(row=ri, column=1, value=ri - 4)
cell.fill = fill(row_bg); cell.font = Font(name="Arial", size=9, bold=True)
cell.alignment = Alignment(horizontal="center", vertical="center")
cell.border = border("thin", "CCCCCC")
# Name
cell = ws_daily.cell(row=ri, column=2, value=name)
cell.fill = fill(row_bg); cell.font = Font(name="Arial", size=9)
cell.alignment = Alignment(horizontal="left", vertical="center", indent=1)
cell.border = border("thin", "CCCCCC")
# Class
cell = ws_daily.cell(row=ri, column=3, value=cls)
cell.fill = fill(row_bg); cell.font = Font(name="Arial", size=9)
cell.alignment = Alignment(horizontal="center", vertical="center")
cell.border = border("thin", "CCCCCC")
# Habit cells (blank for filling in)
for ci in range(4, 4 + total_habit_cols):
# For menstrual (cols 19-22) skip if male
cell = ws_daily.cell(row=ri, column=ci)
if gender == "Male" and ci in range(19, 23):
cell.value = "N/A"
cell.fill = fill("F0F0F0")
cell.font = Font(name="Arial", size=8, color="AAAAAA", italic=True)
else:
cell.fill = fill(row_bg)
cell.alignment = Alignment(horizontal="center", vertical="center")
cell.border = border("thin", "DDDDDD")
# Score formula: COUNTIF of ✓ in habit cols
score_formula = f'=COUNTIF(D{ri}:{get_column_letter(3+total_habit_cols)}{ri},"✓")'
cell_score = ws_daily.cell(row=ri, column=score_col, value=score_formula)
cell_score.fill = fill(COL["saffron_l"])
cell_score.font = Font(name="Arial", size=9, bold=True, color=COL["saffron_d"])
cell_score.alignment = Alignment(horizontal="center", vertical="center")
cell_score.border = border("thin", "AAAAAA")
# Percent formula
denom = 23 if gender == "Female" else 23 # same for simplicity (N/A cells excluded)
pct_formula = f'=IF({get_column_letter(score_col)}{ri}>0,{get_column_letter(score_col)}{ri}/27,"0%")'
cell_pct = ws_daily.cell(row=ri, column=pct_col, value=pct_formula)
cell_pct.fill = fill(COL["saffron_l"])
cell_pct.font = Font(name="Arial", size=9, bold=True, color=COL["green_d"])
cell_pct.number_format = "0%"
cell_pct.alignment = Alignment(horizontal="center", vertical="center")
cell_pct.border = border("thin", "AAAAAA")
ws_daily.row_dimensions[ri].height = 17
# Conditional formatting on habit cells
from openpyxl.formatting.rule import CellIsRule
habit_range = f"D5:{get_column_letter(3+total_habit_cols)}24"
ws_daily.conditional_formatting.add(
habit_range,
CellIsRule(operator="equal", formula=['"✓"'],
fill=PatternFill("solid", fgColor=COL["yes_green"]),
font=Font(color=COL["green_d"], bold=True))
)
ws_daily.conditional_formatting.add(
habit_range,
CellIsRule(operator="equal", formula=['"✗"'],
fill=PatternFill("solid", fgColor=COL["no_red"]),
font=Font(color=COL["red"], bold=True))
)
# Data validation for habit cells
dv_habit = DataValidation(type="list", formula1='"✓,✗,NA"', allow_blank=True,
showDropDown=False)
dv_habit.sqref = habit_range
ws_daily.add_data_validation(dv_habit)
# Footer
ws_daily.merge_cells(f"A25:{get_column_letter(pct_col)}25")
footer_note = ws_daily.cell(row=25, column=1,
value="📌 Instructions: Select ✓ for Yes/हाँ | ✗ for No/नहीं | NA for Not Applicable. "
"Menstrual columns marked N/A for male students. Score auto-calculates. | Ayurgrama 3.0")
footer_note.fill = fill(COL["gold_l"])
footer_note.font = Font(name="Arial", size=8, italic=True, color="555555")
footer_note.alignment = Alignment(horizontal="left", vertical="center", indent=2, wrap_text=True)
ws_daily.row_dimensions[25].height = 20
# Freeze panes
ws_daily.freeze_panes = "D5"
# ═══════════════════════════════════════════════════════════════════════════
# SHEET 4: WEEKLY REPORT
# ═══════════════════════════════════════════════════════════════════════════
ws_weekly = wb.create_sheet("📊 Weekly Report")
ws_weekly.sheet_view.showGridLines = False
ws_weekly.merge_cells("A1:N1")
c = ws_weekly["A1"]
c.value = "📊 WEEKLY SADVRITTA COMPLIANCE REPORT — Summary by Category"
c.fill = fill(COL["teal_d"])
c.font = Font(name="Arial", size=13, bold=True, color="FFFFFF")
c.alignment = Alignment(horizontal="center", vertical="center")
ws_weekly.row_dimensions[1].height = 28
ws_weekly.merge_cells("A2:N2")
c2 = ws_weekly["A2"]
c2.value = "Week No.: ___ | Week Dates: ________________ | Class: ___ | Total Students: ___ | Teacher: _________________"
c2.fill = fill(COL["teal_l"])
c2.font = Font(name="Arial", size=9, color=COL["teal_d"])
c2.alignment = Alignment(horizontal="left", vertical="center", indent=2)
ws_weekly.row_dimensions[2].height = 18
weekly_cols = [
("Roll\nNo.", 6, COL["hdr_dark"]),
("Student Name", 22, COL["hdr_dark"]),
("Class", 7, COL["hdr_dark"]),
("🌅 Morning\nScore /5", 12, COL["orange"]),
("🍽️ Food\nScore /5", 12, COL["green"]),
("🧼 Hygiene\nScore /5", 12, COL["blue_d"]),
("🌸 Menstrual\nScore /4", 12, COL["pink_d"]),
("🌿 Environ.\nScore /4", 12, COL["teal_d"]),
("🌙 Night\nScore /4", 12, COL["purple_d"]),
("Total\nScore /27", 11, COL["saffron_d"]),
("Weekly\n%", 9, COL["saffron_d"]),
("Grade", 9, COL["hdr_dark"]),
("Status", 13, COL["hdr_dark"]),
("Teacher\nRemarks", 22, COL["hdr_dark"]),
]
for ci, (hdr, w, bg) in enumerate(weekly_cols, 1):
cell = ws_weekly.cell(row=3, column=ci, value=hdr)
cell.fill = fill(bg)
cell.font = Font(name="Arial", size=9, bold=True, color="FFFFFF")
cell.alignment = Alignment(horizontal="center", vertical="center", wrap_text=True)
cell.border = border("medium", "444444")
ws_weekly.column_dimensions[get_column_letter(ci)].width = w
ws_weekly.row_dimensions[3].height = 36
# Sample data
import random
random.seed(42)
grade_scale = [(90, "A+", "Excellent 🌟"), (80, "A", "Very Good ✅"),
(70, "B+", "Good 👍"), (60, "B", "Satisfactory"),
(50, "C", "Needs Improvement ⚠️"), (0, "D", "Poor ❌")]
for ri, (name, cls, sec, age, gender, father) in enumerate(sample_names, 4):
row_bg = COL["grey_l"] if ri % 2 == 0 else COL["white"]
# Scores
m_score = random.randint(2, 5)
f_score = random.randint(2, 5)
h_score = random.randint(2, 5)
ms_score = 0 if gender == "Male" else random.randint(2, 4)
e_score = random.randint(2, 4)
n_score = random.randint(2, 4)
denom = 27 if gender == "Female" else 23
total = m_score + f_score + h_score + (ms_score if gender == "Female" else 0) + e_score + n_score
pct = round(total / denom * 100)
grade = "D"; status = "Poor ❌"
for threshold, g, s in grade_scale:
if pct >= threshold:
grade = g; status = s
break
vals = [ri - 3, name, cls,
m_score, f_score, h_score,
ms_score if gender == "Female" else "N/A",
e_score, n_score,
total, f"{pct}%", grade, status, ""]
status_colors = {
"Excellent 🌟": ("C8E6C9", "1B5E20"),
"Very Good ✅": ("DCEDC8", "33691E"),
"Good 👍": ("FFF9C4", "F57F17"),
"Satisfactory": ("FFF3E0", "E65100"),
"Needs Improvement ⚠️": ("FFCCBC", "BF360C"),
"Poor ❌": ("FFCDD2", "B71C1C"),
}
s_bg, s_fg = status_colors.get(status, ("FFFFFF", "000000"))
for ci, val in enumerate(vals, 1):
cell = ws_weekly.cell(row=ri, column=ci, value=val)
if ci == 13:
cell.fill = fill(s_bg)
cell.font = Font(name="Arial", size=8, bold=True, color=s_fg)
elif ci == 12:
grade_bg = {"A+": "1B5E20","A": "2E7D32","B+": "558B2F",
"B": "F9A825","C": "E65100","D": "C62828"}.get(grade, "777777")
cell.fill = fill(grade_bg)
cell.font = Font(name="Arial", size=9, bold=True, color="FFFFFF")
elif ci in [4,5,6,7,8,9,10]:
cell.fill = fill(row_bg)
cell.font = Font(name="Arial", size=9, bold=True if ci >= 10 else False,
color="111111")
else:
cell.fill = fill(row_bg)
cell.font = Font(name="Arial", size=9, color="111111")
cell.alignment = Alignment(
horizontal="left" if ci in [2, 14] else "center",
vertical="center", indent=1 if ci == 2 else 0
)
cell.border = border("thin", "CCCCCC")
ws_weekly.row_dimensions[ri].height = 17
# Summary row
sum_row = len(sample_names) + 5
ws_weekly.merge_cells(f"A{sum_row}:C{sum_row}")
cell = ws_weekly.cell(row=sum_row, column=1, value="CLASS AVERAGE")
cell.fill = fill(COL["hdr_dark"])
cell.font = Font(name="Arial", size=9, bold=True, color="FFFFFF")
cell.alignment = Alignment(horizontal="center", vertical="center")
cell.border = border("medium", "333333")
for ci in range(4, 12):
col_letter = get_column_letter(ci)
formula = f"=AVERAGE({col_letter}4:{col_letter}{sum_row-1})"
cell = ws_weekly.cell(row=sum_row, column=ci, value=formula)
cell.fill = fill(COL["saffron_l"])
cell.font = Font(name="Arial", size=9, bold=True, color=COL["saffron_d"])
cell.alignment = Alignment(horizontal="center", vertical="center")
cell.border = border("medium", "AAAAAA")
cell.number_format = "0.0"
ws_weekly.row_dimensions[sum_row].height = 20
ws_weekly.freeze_panes = "D4"
# ═══════════════════════════════════════════════════════════════════════════
# SHEET 5: HEALTH CHECKUP LOG
# ═══════════════════════════════════════════════════════════════════════════
ws_health = wb.create_sheet("🏥 Health Checkup Log")
ws_health.sheet_view.showGridLines = False
ws_health.merge_cells("A1:P1")
c = ws_health["A1"]
c.value = "🏥 STUDENT HEALTH CHECKUP LOG — Ayurgrama 3.0 | Maharana Pratap Ayurvedic Medical College"
c.fill = fill(COL["pink_d"])
c.font = Font(name="Arial", size=13, bold=True, color="FFFFFF")
c.alignment = Alignment(horizontal="center", vertical="center")
ws_health.row_dimensions[1].height = 28
health_cols = [
("Roll\nNo.", 7), ("Student\nName", 20), ("Class", 7), ("Date of\nCheckup", 13),
("Height\n(cm)", 9), ("Weight\n(kg)", 9), ("BMI", 8),
("Hemoglobin\n(g/dL)", 12), ("Vision\nL/R", 10), ("Dental\nHealth", 10),
("Skin\nCondition", 12), ("Hair &\nScalp", 10), ("Posture", 9),
("Menstrual\nHealth (F)", 14), ("Doctor's\nObservation", 24), ("Follow-up\nRequired", 13),
]
for ci, (hdr, w) in enumerate(health_cols, 1):
cell = ws_health.cell(row=2, column=ci, value=hdr)
cell.fill = fill(COL["hdr_dark"])
cell.font = Font(name="Arial", size=8.5, bold=True, color="FFFFFF")
cell.alignment = Alignment(horizontal="center", vertical="center", wrap_text=True)
cell.border = border("medium", "444444")
ws_health.column_dimensions[get_column_letter(ci)].width = w
ws_health.row_dimensions[2].height = 36
# Sample health data
import random
random.seed(99)
for ri, (name, cls, sec, age, gender, father) in enumerate(sample_names, 3):
row_bg = COL["pink_l"] if ri % 2 == 0 else COL["white"]
h = round(random.uniform(150, 175), 1)
w_ = round(random.uniform(40, 70), 1)
bmi = round(w_ / ((h/100)**2), 1)
hb = round(random.uniform(10.5, 14.5), 1)
hb_status = "Low" if hb < 12 else "Normal"
bmi_status = "Normal" if 18.5 <= bmi <= 24.9 else ("Underweight" if bmi < 18.5 else "Overweight")
vision = "6/6 | 6/6" if random.random() > 0.2 else "6/9 | 6/6"
dental = random.choice(["Good", "Good", "Fair", "Needs Cleaning"])
skin = random.choice(["Clear", "Clear", "Dry", "Mild Acne"])
hair = random.choice(["Clean", "Clean", "Dandruff", "Lice Check Needed"])
posture = random.choice(["Good", "Good", "Slightly Bent", "Good"])
menstrual = "Regular" if gender == "Female" else "N/A"
observation = f"BMI {bmi_status}; Hb {hb_status}"
followup = "Yes - Nutrition" if hb < 12 else ("Yes - Dental" if dental == "Needs Cleaning" else "No")
vals = [ri-2, name, cls, "Aug 2026", h, w_, bmi,
hb, vision, dental, skin, hair, posture,
menstrual, observation, followup]
for ci, val in enumerate(vals, 1):
cell = ws_health.cell(row=ri, column=ci, value=val)
bg = row_bg
fg = "111111"
if ci == 7: # BMI
bg = ("FFF9C4" if bmi_status == "Underweight" else
("C8E6C9" if bmi_status == "Normal" else "FFCDD2"))
elif ci == 8: # Hb
bg = "FFCDD2" if hb < 12 else "C8E6C9"
elif ci == 16: # Follow-up
bg = "FFCDD2" if "Yes" in str(followup) else "C8E6C9"
fg = "C62828" if "Yes" in str(followup) else "1B5E20"
cell.fill = fill(bg)
cell.font = Font(name="Arial", size=8.5, color=fg,
bold=(ci == 16 and "Yes" in str(followup)))
cell.alignment = Alignment(horizontal="center" if ci != 15 else "left",
vertical="center",
indent=1 if ci == 15 else 0, wrap_text=True)
cell.border = border("thin", "CCCCCC")
ws_health.row_dimensions[ri].height = 18
ws_health.freeze_panes = "D3"
# Blank rows
for ri in range(len(sample_names)+3, len(sample_names)+15):
for ci in range(1, 17):
cell = ws_health.cell(row=ri, column=ci)
cell.fill = fill(COL["grey_l"] if ri % 2 == 0 else COL["white"])
cell.border = border("thin", "DDDDDD")
ws_health.row_dimensions[ri].height = 18
# Legend
leg_row = len(sample_names) + 16
ws_health.merge_cells(f"A{leg_row}:P{leg_row}")
ws_health[f"A{leg_row}"].value = "🔴 Red = Needs Attention | 🟡 Yellow = Borderline | 🟢 Green = Normal | Checkup by: MPGI Ayurgrama 3.0 Health Team"
ws_health[f"A{leg_row}"].fill = fill(COL["gold_l"])
ws_health[f"A{leg_row}"].font = Font(name="Arial", size=8, italic=True, color="555555")
ws_health[f"A{leg_row}"].alignment = Alignment(horizontal="left", vertical="center", indent=2)
# ═══════════════════════════════════════════════════════════════════════════
# SHEET 6: DASHBOARD
# ═══════════════════════════════════════════════════════════════════════════
ws_dash = wb.create_sheet("📈 Dashboard")
ws_dash.sheet_view.showGridLines = False
ws_dash.merge_cells("A1:L1")
c = ws_dash["A1"]
c.value = "📈 SADVRITTA HEALTH COMPLIANCE DASHBOARD — Ayurgrama 3.0"
c.fill = fill(COL["saffron_d"])
c.font = Font(name="Arial", size=14, bold=True, color="FFFFFF")
c.alignment = Alignment(horizontal="center", vertical="center")
ws_dash.row_dimensions[1].height = 32
ws_dash.merge_cells("A2:L2")
c2 = ws_dash["A2"]
c2.value = "Maharana Pratap Ayurvedic Medical College & Hospital | MPGI Group | NCISM — आयुषे सर्वलोकानाम्"
c2.fill = fill(COL["green_d"])
c2.font = Font(name="Arial", size=10, color="FFFFFF")
c2.alignment = Alignment(horizontal="center", vertical="center")
ws_dash.row_dimensions[2].height = 20
# Summary KPI boxes
kpi_data = [
("Total Students", "20", COL["blue_d"], "A"),
("Classes Covered", "2 (9th & 10th)", COL["green_d"], "C"),
("Habits Tracked", "27 per day", COL["purple_d"], "E"),
("Avg Compliance", "71%", COL["teal_d"], "G"),
("Students At-Risk", "3", COL["red"], "I"),
("Follow-ups Due", "5", COL["orange"], "K"),
]
for i, (label, value, color, col_letter) in enumerate(kpi_data):
ci = ord(col_letter) - ord('A') + 1
# Box header
ws_dash.merge_cells(start_row=4, start_column=ci, end_row=4, end_column=ci+1)
cell = ws_dash.cell(row=4, column=ci, value=label)
cell.fill = fill(color)
cell.font = Font(name="Arial", size=9, bold=True, color="FFFFFF")
cell.alignment = Alignment(horizontal="center", vertical="center")
cell.border = border("medium", "333333")
ws_dash.row_dimensions[4].height = 20
ws_dash.merge_cells(start_row=5, start_column=ci, end_row=5, end_column=ci+1)
cell = ws_dash.cell(row=5, column=ci, value=value)
cell.fill = fill(color + "22")
cell.font = Font(name="Arial", size=18, bold=True, color=color)
cell.alignment = Alignment(horizontal="center", vertical="center")
cell.border = border("medium", "AAAAAA")
ws_dash.row_dimensions[5].height = 36
for col_letter in "ABCDEFGHIJKL":
ws_dash.column_dimensions[col_letter].width = 13
# Category compliance summary table
ws_dash.merge_cells("A7:L7")
ws_dash["A7"].value = "📊 CATEGORY-WISE AVERAGE COMPLIANCE (Sample Data)"
ws_dash["A7"].fill = fill(COL["hdr_dark"])
ws_dash["A7"].font = Font(name="Arial", size=11, bold=True, color="FFFFFF")
ws_dash["A7"].alignment = Alignment(horizontal="center", vertical="center")
ws_dash.row_dimensions[7].height = 22
# Summary data table (static, for chart)
summary_headers = ["Category", "Hindi Name", "Max Score", "Class Avg", "Compliance %", "Status"]
summary_data = [
("🌅 Morning Routine", "सुबह की दिनचर्या", 5, 3.8, 76, "Good"),
("🍽️ Food Hygiene", "आहार स्वच्छता", 5, 3.5, 70, "Satisfactory"),
("🧼 Personal Hygiene", "व्यक्तिगत स्वच्छता", 5, 4.0, 80, "Very Good"),
("🌸 Menstrual Hygiene", "मासिक धर्म", 4, 3.2, 80, "Very Good"),
("🌿 Environment", "पर्यावरण स्वच्छता", 4, 3.0, 75, "Good"),
("🌙 Night Routine", "रात की दिनचर्या", 4, 2.8, 70, "Satisfactory"),
]
summary_col_colors = [COL["hdr_dark"], COL["hdr_dark"], COL["grey_d"],
COL["saffron_d"], COL["green"], COL["hdr_dark"]]
summary_widths = [22, 22, 11, 12, 14, 14]
for ci, (hdr, bg, w) in enumerate(zip(summary_headers, summary_col_colors, summary_widths), 1):
cell = ws_dash.cell(row=8, column=ci, value=hdr)
cell.fill = fill(bg)
cell.font = Font(name="Arial", size=9, bold=True, color="FFFFFF")
cell.alignment = Alignment(horizontal="center", vertical="center")
cell.border = border("medium", "444444")
ws_dash.column_dimensions[get_column_letter(ci)].width = w
ws_dash.row_dimensions[8].height = 20
cat_colors_dash = [COL["orange"], COL["green"], COL["blue_d"],
COL["pink_d"], COL["teal_d"], COL["purple_d"]]
for ri, ((cat, hindi, max_s, avg, pct, status), cat_color) in enumerate(
zip(summary_data, cat_colors_dash), 9):
row_bg = COL["grey_l"] if ri % 2 == 0 else COL["white"]
status_colors_d = {
"Excellent": ("C8E6C9", "1B5E20"), "Very Good": ("DCEDC8", "33691E"),
"Good": ("FFF9C4", "F57F17"), "Satisfactory": ("FFF3E0", "E65100"),
"Needs Improvement": ("FFCCBC", "BF360C"), "Poor": ("FFCDD2", "B71C1C"),
}
s_bg, s_fg = status_colors_d.get(status, (row_bg, "111111"))
vals = [cat, hindi, max_s, avg, f"{pct}%", status]
for ci, val in enumerate(vals, 1):
cell = ws_dash.cell(row=ri, column=ci, value=val)
if ci == 1:
cell.fill = fill(cat_color + "33")
cell.font = Font(name="Arial", size=9, bold=True, color=cat_color)
elif ci == 6:
cell.fill = fill(s_bg)
cell.font = Font(name="Arial", size=9, bold=True, color=s_fg)
else:
cell.fill = fill(row_bg)
cell.font = Font(name="Arial", size=9, color="111111",
bold=(ci == 5))
cell.alignment = Alignment(horizontal="center" if ci != 2 else "left",
vertical="center", indent=1 if ci == 2 else 0)
cell.border = border("thin", "CCCCCC")
ws_dash.row_dimensions[ri].height = 20
# Progress bars via conditional formatting (data bar) on compliance % column
pct_range = f"E9:E14"
ws_dash.conditional_formatting.add(
pct_range,
DataBarRule(start_type="min", start_value=0, end_type="max", end_value=100,
color="2E7D32")
)
# ── BAR CHART: Category compliance ──
bar_chart = BarChart()
bar_chart.type = "col"
bar_chart.title = "Category-wise Compliance %"
bar_chart.y_axis.title = "Compliance %"
bar_chart.x_axis.title = "Category"
bar_chart.style = 10
bar_chart.width = 18
bar_chart.height = 12
# Use numeric data from D column (avg scores) for chart
data_ref = Reference(ws_dash, min_col=4, min_row=8, max_row=14)
cats_ref = Reference(ws_dash, min_col=1, min_row=9, max_row=14)
bar_chart.add_data(data_ref, titles_from_data=True)
bar_chart.set_categories(cats_ref)
bar_chart.shape = 4
ws_dash.add_chart(bar_chart, "H9")
# ── Top students table ──
ws_dash.merge_cells("A17:F17")
ws_dash["A17"].value = "🏆 TOP 5 STUDENTS — Highest Compliance"
ws_dash["A17"].fill = fill(COL["green_d"])
ws_dash["A17"].font = Font(name="Arial", size=11, bold=True, color="FFFFFF")
ws_dash["A17"].alignment = Alignment(horizontal="center", vertical="center")
ws_dash.row_dimensions[17].height = 22
top_hdrs = ["Rank", "Student Name", "Class", "Total Score", "Compliance %", "Grade"]
for ci, hdr in enumerate(top_hdrs, 1):
cell = ws_dash.cell(row=18, column=ci, value=hdr)
cell.fill = fill(COL["hdr_dark"])
cell.font = Font(name="Arial", size=9, bold=True, color="FFFFFF")
cell.alignment = Alignment(horizontal="center", vertical="center")
cell.border = border("medium", "444444")
ws_dash.row_dimensions[18].height = 20
top5 = [
(1, "Kavya Joshi", "9th", 24, "89%", "A+"),
(2, "Priya Patel", "9th", 23, "85%", "A"),
(3, "Riya Shah", "10th", 22, "81%", "A"),
(4, "Ananya Tiwari", "9th", 21, "78%", "B+"),
(5, "Divya Nair", "10th", 20, "74%", "B+"),
]
medal_colors = ["FFD700", "C0C0C0", "CD7F32", COL["green_l"], COL["blue_l"]]
for ri, (rank, name, cls, score, pct, grade) in enumerate(top5, 19):
mc = medal_colors[ri - 19]
vals = [rank, name, cls, score, pct, grade]
for ci, val in enumerate(vals, 1):
cell = ws_dash.cell(row=ri, column=ci, value=val)
cell.fill = fill(mc if ci == 1 else (COL["white"] if ri % 2 == 0 else COL["grey_l"]))
cell.font = Font(name="Arial", size=9, bold=(ci in [1, 6]), color="111111")
cell.alignment = Alignment(horizontal="center" if ci != 2 else "left",
vertical="center", indent=1 if ci == 2 else 0)
cell.border = border("thin", "CCCCCC")
ws_dash.row_dimensions[ri].height = 18
# ── At-risk students table ──
ws_dash.merge_cells("A25:F25")
ws_dash["A25"].value = "⚠️ AT-RISK STUDENTS — Compliance Below 60%"
ws_dash["A25"].fill = fill(COL["red"])
ws_dash["A25"].font = Font(name="Arial", size=11, bold=True, color="FFFFFF")
ws_dash["A25"].alignment = Alignment(horizontal="center", vertical="center")
ws_dash.row_dimensions[25].height = 22
risk_hdrs = ["Roll No.", "Student Name", "Class", "Score", "Compliance %", "Action Needed"]
for ci, hdr in enumerate(risk_hdrs, 1):
cell = ws_dash.cell(row=26, column=ci, value=hdr)
cell.fill = fill(COL["red"])
cell.font = Font(name="Arial", size=9, bold=True, color="FFFFFF")
cell.alignment = Alignment(horizontal="center", vertical="center")
cell.border = border("medium", "888888")
ws_dash.row_dimensions[26].height = 20
at_risk = [
(7, "Vivek Yadav", "9th", 12, "52%", "Counseling + Home Visit"),
(15, "Karan Malhotra", "10th", 11, "48%", "Parent Meeting Required"),
(17, "Yash Agarwal", "10th", 13, "57%", "Extra Hygiene Session"),
]
for ri, (roll, name, cls, score, pct, action) in enumerate(at_risk, 27):
for ci, val in enumerate([roll, name, cls, score, pct, action], 1):
cell = ws_dash.cell(row=ri, column=ci, value=val)
cell.fill = fill(COL["red_l"])
cell.font = Font(name="Arial", size=9, color=COL["red"],
bold=(ci == 6))
cell.alignment = Alignment(horizontal="center" if ci != 6 else "left",
vertical="center", indent=1 if ci == 6 else 0)
cell.border = border("thin", "FFAAAA")
ws_dash.row_dimensions[ri].height = 18
# Footer
ws_dash.merge_cells("A31:L31")
ws_dash["A31"].value = (
"📌 Generated by Ayurgrama 3.0 Health Monitoring System | "
"Maharana Pratap Ayurvedic Medical College & Hospital | "
"MPGI Group | NCISM — आयुषे सर्वलोकानाम् | ॥ सद्वचनमनुछेयानाम् ॥"
)
ws_dash["A31"].fill = fill(COL["green_d"])
ws_dash["A31"].font = Font(name="Arial", size=8, color="FFFFFF")
ws_dash["A31"].alignment = Alignment(horizontal="center", vertical="center")
ws_dash.row_dimensions[31].height = 16
# ═══════════════════════════════════════════════════════════════════════════
# TAB COLORS
# ═══════════════════════════════════════════════════════════════════════════
ws_cover.sheet_properties.tabColor = COL["saffron_d"]
ws_reg.sheet_properties.tabColor = COL["blue_d"]
ws_daily.sheet_properties.tabColor = COL["green_d"]
ws_weekly.sheet_properties.tabColor = COL["teal_d"]
ws_health.sheet_properties.tabColor = COL["pink_d"]
ws_dash.sheet_properties.tabColor = COL["purple_d"]
# ═══════════════════════════════════════════════════════════════════════════
# SAVE
# ═══════════════════════════════════════════════════════════════════════════
wb.save(OUTPUT)
print(f"✅ Excel tracker saved: {OUTPUT}")
print(f"File size: {os.path.getsize(OUTPUT) / 1024:.1f} KB")
print(f"Sheets: {[s.title for s in wb.worksheets]}")
cd /tmp/workspace/ayurgrama-poster && python3 build_tracker.py 2>&1
Sadvritta School Health Tracker
Spreadsheet · XLSX
| Sheet | Color Tab | Contents |
|---|---|---|
| 📋 Cover | 🟠 Saffron | Instructions, sheet guide, all 6 Sadvritta categories reference table |
| 👨🎓 Student Register | 🔵 Blue | 20 sample students + 30 blank rows; name, class, age, gender, father's name, health ID |
| 📅 Daily Tracker | 🟢 Green | 27 habits across 6 categories; ✓/✗/NA dropdown per student per habit; auto-calculates daily score & % |
| 📊 Weekly Report | 🟦 Teal | Category-wise scores, total, grade (A+ to D), status badge, class average row |
| 🏥 Health Checkup Log | 🩷 Pink | Height, weight, BMI, hemoglobin, vision, dental, skin, hair, menstrual health; color-coded alerts |
| 📈 Dashboard | 🟣 Purple | KPI boxes, category compliance table, bar chart, Top 5 students, At-Risk students list |
I want all the points in one poster neat and clean
ls /tmp/workspace/ayurgrama-poster/ && python3 -c "from reportlab.lib.pagesizes import A2, A1; print('A2:', A2); print('A1:', A1)"
~/ayurgrama-poster/build_one_poster.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Sadvritta - ALL POINTS IN ONE CLEAN POSTER (A2 size)
Maharana Pratap Ayurvedic Medical College & Hospital | Ayurgrama 3.0
"""
from reportlab.lib.pagesizes import A2
from reportlab.lib.units import mm
from reportlab.pdfgen import canvas
from reportlab.lib.colors import HexColor, Color, white, black
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont
from reportlab.lib.utils import ImageReader
from PIL import Image as PILImage
import io, os
OUTPUT = "/tmp/workspace/ayurgrama-poster/Sadvritta_ALL_Points_OnePoster.pdf"
W, H = A2 # 420 x 594 mm in pts = 1190 x 1684 pts
MARGIN = 14 * mm
# ── Fonts ──────────────────────────────────────────────────
FONT_DIR = "/tmp/workspace/ayurgrama-poster/fonts"
try:
pdfmetrics.registerFont(TTFont('DV', f"{FONT_DIR}/NotoSansDevanagari-Regular.ttf"))
pdfmetrics.registerFont(TTFont('DVBold', f"{FONT_DIR}/NotoSansDevanagari-Bold.ttf"))
F = 'DV'
FB = 'DVBold'
except:
F = 'Helvetica'
FB = 'Helvetica-Bold'
# ── Colors ─────────────────────────────────────────────────
def hc(h): return HexColor(f"#{h}")
SAFFRON = hc("E07B00"); SAFFRON_L = hc("FFF3E0"); SAFFRON_D = hc("C86000")
GREEN_D = hc("1B5E20"); GREEN = hc("2E7D32")
ORANGE = hc("E65100"); ORANGE_L = hc("FFF8E1")
BLUE_D = hc("1565C0"); BLUE_L = hc("E3F2FD")
PINK_D = hc("880E4F"); PINK_L = hc("FCE4EC")
TEAL_D = hc("00695C"); TEAL_L = hc("E0F2F1")
PURPLE_D = hc("4A148C"); PURPLE_L = hc("F3E5F5")
GOLD = hc("FFC107"); GOLD_L = hc("FFFDE7")
DARK = hc("212121"); GREY = hc("757575"); GREY_L = hc("F5F5F5")
# ── Helpers ────────────────────────────────────────────────
def rfill(c, x, y, w, h, color, r=3):
c.setFillColor(color); c.roundRect(x, y, w, h, r, fill=1, stroke=0)
def rstroke(c, x, y, w, h, color, lw=1, r=3):
c.setStrokeColor(color); c.setLineWidth(lw)
c.roundRect(x, y, w, h, r, fill=0, stroke=1)
def txt(c, text, x, y, fnt=None, sz=9, col=DARK, align='left'):
c.setFont(fnt or F, sz); c.setFillColor(col)
if align == 'center': c.drawCentredString(x, y, text)
elif align == 'right': c.drawRightString(x, y, text)
else: c.drawString(x, y, text)
def grad(c, x, y, w, h, c1, c2, steps=16):
sh = h / steps
for i in range(steps):
t = i / steps
r = c1.red + t*(c2.red - c1.red)
g = c1.green + t*(c2.green - c1.green)
b = c1.blue + t*(c2.blue - c1.blue)
c.setFillColor(Color(r, g, b))
c.rect(x, y + h - (i+1)*sh, w, sh+0.6, fill=1, stroke=0)
def logo(path, sz):
try:
img = PILImage.open(path).convert("RGBA")
img.thumbnail((sz, sz), PILImage.LANCZOS)
buf = io.BytesIO(); img.save(buf, 'PNG'); buf.seek(0)
return ImageReader(buf)
except: return None
def wrap_lines(c, text, max_w, fnt, sz):
words = text.split(' '); lines = []; cur = ''
for w in words:
test = cur + (' ' if cur else '') + w
if c.stringWidth(test, fnt, sz) <= max_w: cur = test
else:
if cur: lines.append(cur)
cur = w
if cur: lines.append(cur)
return lines
# ── Load logos ─────────────────────────────────────────────
LOGO_DIR = "/tmp/workspace/ayurgrama-poster"
L_NCISM = logo(f"{LOGO_DIR}/logo_ncism.jpg", 80)
L_MPGI = logo(f"{LOGO_DIR}/logo_mpgi.jpg", 80)
L_AYUR = logo(f"{LOGO_DIR}/logo_ayurgrama.jpg", 80)
# ══════════════════════════════════════════════════════════
# PAGE
# ══════════════════════════════════════════════════════════
c = canvas.Canvas(OUTPUT, pagesize=A2)
# outer border
c.setStrokeColor(SAFFRON); c.setLineWidth(5)
c.roundRect(5, 5, W-10, H-10, 8, fill=0, stroke=1)
c.setStrokeColor(GOLD); c.setLineWidth(1.5)
c.roundRect(10, 10, W-20, H-20, 6, fill=0, stroke=1)
# ══ HEADER ════════════════════════════════════════════════
HEADER_H = 108 * mm
grad(c, 0, H - HEADER_H, W, HEADER_H, hc("FF6B00"), hc("C8A000"), steps=24)
# Logo circles
def logo_circle(cv, cx, cy, img, r=30):
cv.setFillColor(white); cv.circle(cx, cy, r+3, fill=1, stroke=0)
if img: cv.drawImage(img, cx-r, cy-r, r*2, r*2, mask='auto')
cv.setStrokeColor(white); cv.setLineWidth(2.5)
cv.circle(cx, cy, r+3, fill=0, stroke=1)
logo_y = H - 38*mm
logo_circle(c, MARGIN+28, logo_y, L_NCISM, 28)
logo_circle(c, W - MARGIN-28, logo_y, L_MPGI, 28)
# College name
c.setFont(FB, 12); c.setFillColor(white)
c.drawCentredString(W/2, H - 18*mm, "महाराणा प्रताप आयुर्वेदिक मेडिकल कॉलेज एवं हॉस्पिटल")
c.setFont(F, 8.5); c.setFillColor(hc("FFE082"))
c.drawCentredString(W/2, H - 26*mm, "Maharana Pratap Ayurvedic Medical College & Hospital | MPGI Group of Institutions")
# Main title
c.setFont(FB, 44); c.setFillColor(white)
c.drawCentredString(W/2, H - 52*mm, "॥ सद्वृत्त ॥")
c.setFont(F, 13); c.setFillColor(hc("FFF8DC"))
c.drawCentredString(W/2, H - 63*mm, "Sadvritta — स्वस्थ जीवन के आयुर्वेदिक नियम")
# Ayurgrama badge row
logo_circle(c, W/2 - 48, H - 82*mm, L_AYUR, 26)
rfill(c, W/2 - 10, H - 94*mm, 175, 24, white, r=12)
c.setFont(FB, 10); c.setFillColor(ORANGE)
c.drawString(W/2 - 2, H - 84*mm, "AYURGRAMA 3.0 — इन्द्रिय आरोग्य")
c.setFont(F, 7.5); c.setFillColor(GREEN_D)
c.drawString(W/2 - 2, H - 92*mm, "NCISM · आयुषे सर्वलोकानाम्")
# ══ DEFINITION BOX ═══════════════════════════════════════
cur_y = H - HEADER_H - 7*mm
def_x = MARGIN; def_w = W - 2*MARGIN; def_h = 44*mm
rfill(c, def_x, cur_y - def_h, def_w, def_h, GREEN_D, r=7)
rfill(c, def_x, cur_y - def_h, 5, def_h, GOLD, r=3)
rstroke(c, def_x, cur_y - def_h, def_w, def_h, GOLD, lw=2, r=7)
c.setFont(FB, 13); c.setFillColor(GOLD)
c.drawString(def_x+14, cur_y - 12*mm, "📖 सद्वृत्त क्या है?")
c.setFont(FB, 10); c.setFillColor(hc("A5D6A7"))
c.drawString(def_x+14, cur_y - 20*mm, "सद्वृत्त = सत् (अच्छा) + वृत्त (आचरण/व्यवहार)")
c.setFont(F, 9); c.setFillColor(hc("E8F5E9"))
c.drawString(def_x+14, cur_y - 28*mm,
"आयुर्वेद में सद्वृत्त उन दैनिक नियमों का समूह है जो शरीर, मन और आत्मा को स्वस्थ रखते हैं।")
c.drawString(def_x+14, cur_y - 35*mm,
"इन नियमों का पालन करने वाला व्यक्ति रोगों से बचता है और लंबा, सुखी जीवन जीता है।")
c.setFont(F, 8.5); c.setFillColor(hc("FFE082"))
c.drawString(def_x+14, cur_y - 41.5*mm,
"💡 सरल अर्थ: अच्छी आदतें अपनाओ — स्वस्थ जीवन पाओ!")
cur_y -= (def_h + 6*mm)
# ══ ALL SECTIONS IN 3-COLUMN GRID ════════════════════════
# 6 sections, 3 columns × 2 rows
SECTIONS = [
{
"title": "🌅 १. सुबह की दिनचर्या",
"sub": "Morning Routine",
"hdr": ORANGE, "bg": ORANGE_L,
"points": [
("⏰", "ब्राह्ममुहूर्त में उठें", "सूरज से डेढ़ घंटे पहले उठें — शरीर ऊर्जावान रहता है।"),
("🦷", "दाँत साफ करें", "नीम दातुन या ब्रश से सुबह-शाम — दाँत-मसूड़े मजबूत रहते हैं।"),
("👅", "जीभ साफ करें", "जीभ खुरचनी से — बदबू दूर होती है, पाचन अच्छा होता है।"),
("💧", "सुबह गुनगुना पानी पीएं", "1-2 गिलास गुनगुना पानी — पेट साफ रहता है।"),
("🧘", "व्यायाम / योग करें", "30 मिनट चलना या सूर्य नमस्कार — शरीर चुस्त रहता है।"),
]
},
{
"title": "🍽️ २. आहार स्वच्छता",
"sub": "Food Hygiene",
"hdr": GREEN, "bg": hc("F1F8E9"),
"points": [
("🤲", "खाने से पहले हाथ धोएं", "साबुन से 20 सेकंड — पेट की बीमारियाँ दूर रहती हैं।"),
("🥗", "ताजा और सादा खाएं", "बासी, जंक फूड छोड़ें — ताजी रोटी, दाल, सब्जी खाएं।"),
("🫙", "साफ पानी पीएं", "उबला या छना पानी — टाइफाइड, दस्त नहीं होते।"),
("🌿", "हरी सब्जी और फल खाएं", "पालक, आंवला, केला — खून बढ़ता है, ताकत आती है।"),
("🍱", "धीरे-धीरे खाएं", "चबा-चबाकर खाएं — पाचन ठीक, गैस नहीं बनती।"),
]
},
{
"title": "🧼 ३. व्यक्तिगत स्वच्छता",
"sub": "Personal Hygiene",
"hdr": BLUE_D, "bg": BLUE_L,
"points": [
("🚿", "रोज नहाएं", "शरीर के कीटाणु दूर होते हैं — त्वचा स्वस्थ रहती है।"),
("💅", "नाखून छोटे रखें", "लंबे नाखूनों में गंदगी जमती है — हर हफ्ते काटें।"),
("💈", "बाल साफ रखें", "हफ्ते में 2 बार धोएं — जूएं और फंगस नहीं होती।"),
("👕", "साफ कपड़े पहनें", "रोज धुले कपड़े — त्वचा रोग और संक्रमण से बचाव।"),
("🚽", "शौचालय उपयोग करें", "खुले में शौच नहीं — शौच के बाद साबुन से हाथ धोएं।"),
]
},
{
"title": "🌸 ४. मासिक धर्म स्वच्छता",
"sub": "Menstrual Hygiene (किशोरियों के लिए)",
"hdr": PINK_D, "bg": PINK_L,
"note": "💗 यह प्राकृतिक है — शर्म नहीं, सावधानी जरूरी है।",
"points": [
("🩹", "साफ पैड / कपड़े का उपयोग", "गंदे कपड़े से इन्फेक्शन होता है — साफ पैड उपयोग करें।"),
("⏱️", "हर 4-6 घंटे में पैड बदलें", "देर से बदलने पर बैक्टीरिया पनपते हैं।"),
("🤲", "पैड बदलते समय हाथ धोएं", "साबुन से हाथ धोना — कीटाणुओं से बचाव।"),
("🚿", "पीरियड्स में रोज नहाएं", "नहाना बंद नहीं करें — इन्फेक्शन से बचाव।"),
("🗑️", "पैड सही तरह फेंकें", "कागज में लपेटकर कूड़ेदान में — खुले में नहीं।"),
("🥬", "आयरन युक्त खाना खाएं", "पालक, गुड़, खजूर — खून की कमी नहीं होगी।"),
("🛌", "दर्द में आराम करें", "गरम पानी की थैली रखें — डॉक्टर से मिलें अगर दर्द ज्यादा हो।"),
]
},
{
"title": "🌿 ५. पर्यावरण स्वच्छता",
"sub": "Environment Hygiene",
"hdr": TEAL_D, "bg": TEAL_L,
"points": [
("🗑️", "कूड़ा डस्टबिन में डालें", "गाँव साफ रखें — गंदगी से बीमारियाँ आती हैं।"),
("🦟", "पानी जमा न होने दें", "रुके पानी में मच्छर — मलेरिया, डेंगू से बचाव।"),
("🌱", "पेड़-पौधे लगाएं", "तुलसी, नीम — हवा शुद्ध, बीमारियाँ दूर।"),
("🏠", "घर में हवा-रोशनी आने दें", "खिड़की खुली रखें — धूप से कीटाणु मरते हैं।"),
]
},
{
"title": "🌙 ६. रात की दिनचर्या",
"sub": "Night Routine & Mental Health",
"hdr": PURPLE_D, "bg": PURPLE_L,
"points": [
("🛌", "जल्दी सोएं (रात 10 बजे तक)", "8 घंटे की नींद — देर जागने से शरीर कमजोर होता है।"),
("🦶", "सोने से पहले पैर धोएं", "गरम पानी से पैर धोएं — अच्छी नींद आती है।"),
("📵", "मोबाइल 1 घंटे पहले बंद करें", "आँखें और दिमाग को आराम मिलता है।"),
("🙏", "सकारात्मक सोचें", "ईश्वर का धन्यवाद करें — मन शांत, तनाव दूर।"),
]
},
]
# ── Layout: 3 cols × 2 rows ────────────────────────────────
COL_COUNT = 3
ROW_COUNT = 2
GAP = 5 * mm
col_w = (W - 2*MARGIN - (COL_COUNT-1)*GAP) / COL_COUNT
avail_h = cur_y - (MARGIN + 22*mm) # leave footer
row_h = (avail_h - (ROW_COUNT-1)*GAP) / ROW_COUNT
def draw_section(cv, sec, x, y, w, h):
"""Draw one section box. y = TOP of box."""
HDR_H = 24
PAD = 5
NOTE_H = 14 if "note" in sec else 0
# Background
rfill(cv, x, y - h, w, h, sec["bg"], r=7)
rstroke(cv, x, y - h, w, h, sec["hdr"], lw=1.5, r=7)
# Header bar
grad(cv, x, y - HDR_H, w, HDR_H, sec["hdr"],
Color(sec["hdr"].red*0.7, sec["hdr"].green*0.7, sec["hdr"].blue*0.7), steps=8)
# round top corners mask
cv.setFillColor(sec["hdr"])
cv.roundRect(x, y - HDR_H, w, HDR_H, 7, fill=1, stroke=0)
cv.setFont(FB, 10); cv.setFillColor(white)
cv.drawString(x + 7, y - HDR_H + 8, sec["title"])
cv.setFont(F, 7); cv.setFillColor(hc("FFFFFF"))
cv.drawString(x + 7, y - HDR_H + 1, sec["sub"])
inner_y = y - HDR_H - PAD
# Optional note
if "note" in sec:
rfill(cv, x+4, inner_y - NOTE_H, w-8, NOTE_H, GOLD_L, r=3)
rstroke(cv, x+4, inner_y - NOTE_H, w-8, NOTE_H, GOLD, lw=0.7, r=3)
cv.setFont(FB, 7.5); cv.setFillColor(hc("5D4037"))
cv.drawCentredString(x + w/2, inner_y - NOTE_H + 5, sec["note"])
inner_y -= (NOTE_H + 3)
n_pts = len(sec["points"])
# Divide remaining height equally among points
pt_zone_h = inner_y - (y - h) - PAD
pt_h = pt_zone_h / n_pts
for (icon, title, desc) in sec["points"]:
pt_top = inner_y
pt_bot = inner_y - pt_h
# Divider
cv.setStrokeColor(hc("CCCCCC")); cv.setLineWidth(0.4)
cv.line(x+22, pt_bot + 1, x+w-6, pt_bot + 1)
# Icon
cv.setFont(F, 12); cv.setFillColor(DARK)
cv.drawString(x + 3, pt_top - 10, icon)
# Title
title_sz = 8.5
cv.setFont(FB, title_sz); cv.setFillColor(sec["hdr"])
title_w = cv.stringWidth(title, FB, title_sz)
text_x = x + 20
text_max = w - 24
if title_w > text_max:
# shrink
title_sz = 7.5
cv.setFont(FB, title_sz)
cv.drawString(text_x, pt_top - 9, title)
# Description - wrapped
desc_sz = 7
cv.setFont(F, desc_sz); cv.setFillColor(hc("333333"))
lines = wrap_lines(cv, desc, text_max, F, desc_sz)
lh = desc_sz * 1.3
dy = pt_top - 9 - title_sz * 1.3
for line in lines[:2]: # max 2 lines
cv.drawString(text_x, dy, line)
dy -= lh
inner_y -= pt_h
# Draw sections
for idx, sec in enumerate(SECTIONS):
row = idx // COL_COUNT
col = idx % COL_COUNT
sx = MARGIN + col * (col_w + GAP)
sy = cur_y - row * (row_h + GAP)
draw_section(c, sec, sx, sy, col_w, row_h)
# ══ FOOTER ════════════════════════════════════════════════
foot_y = MARGIN + 6*mm
foot_h = 18*mm
grad(c, MARGIN, foot_y, W - 2*MARGIN, foot_h, GREEN_D, hc("388E3C"), steps=12)
c.roundRect(MARGIN, foot_y, W-2*MARGIN, foot_h, 7, fill=0, stroke=0)
c.setFont(FB, 14); c.setFillColor(white)
c.drawCentredString(W/2, foot_y + foot_h - 11*mm,
"🌱 स्वस्थ गाँव, सुखी जीवन — सद्वृत्त अपनाओ, निरोगी जीवन पाओ! 🌱")
c.setFont(F, 8); c.setFillColor(hc("C8E6C9"))
c.drawCentredString(W/2, foot_y + foot_h - 17.5*mm,
"महाराणा प्रताप आयुर्वेदिक मेडिकल कॉलेज एवं हॉस्पिटल | MPGI | "
"AYURGRAMA 3.0 | NCISM — आयुषे सर्वलोकानाम् | ॥ सद्वचनमनुछेयानाम् ॥")
c.save()
print(f"✅ Saved: {OUTPUT}")
print(f"Size: {os.path.getsize(OUTPUT)/1024:.1f} KB")
Run the script to generate the complete one-page poster
Download Sadvritta_ALL_Points_OnePoster.pdf for a clean, complete single-page reference poster