83 lines
5.4 KiB
Python
83 lines
5.4 KiB
Python
import io
|
||
|
||
p = "index.html"
|
||
s = open(p).read()
|
||
|
||
# 1. Add WA tab to VIEWS
|
||
old_views = 'const VIEWS=[["home","Suite"],["field","Field Guide"],["keys","Keys"],["house","22 Points"],["cards","Flashcards"],["exam","Exam"],["gloss","Glossary"]];'
|
||
new_views = 'const VIEWS=[["home","Suite"],["field","Field Guide"],["keys","Keys"],["house","22 Points"],["cards","Flashcards"],["exam","Exam"],["gloss","Glossary"],["wa","WA Cert"]];'
|
||
assert old_views in s, "VIEWS not found"
|
||
s = s.replace(old_views, new_views)
|
||
|
||
# 2. Add the WA section element after v-gloss
|
||
old_sec = '<section class="view" id="v-gloss"></section>'
|
||
new_sec = old_sec + '\n <section class="view" id="v-wa"></section>'
|
||
assert old_sec in s, "v-gloss section not found"
|
||
s = s.replace(old_sec, new_sec)
|
||
|
||
# 3. Build the WA view render block (factual WSDA content + original questions)
|
||
WA_RENDER = r'''
|
||
/* ---- WA CERTIFICATION ---- */
|
||
$('#v-wa').innerHTML=`
|
||
<section class="hero" style="padding-top:30px">
|
||
<div class="eyebrow">Washington State Department of Agriculture · agr.wa.gov</div>
|
||
<h1><span class="lo">The license itself,</span>Washington<br><em>Certification</em></h1>
|
||
<p class="lede">The WSU EM019 manual teaches you the <strong>pests</strong> — this is the <strong>paperwork</strong> that stands between you and the applicator's license. Everything below is the current WSDA requirement, in one place.</p>
|
||
</section>
|
||
|
||
<section class="section">
|
||
<div class="eyebrow">Who runs it</div>
|
||
<h2>Regulatory agency</h2>
|
||
<div class="facts">
|
||
${[["Agency","Washington State Department of Agriculture (WSDA)"],["Phone","(360) 902-2020"],["Website","agr.wa.gov"],["Address","Olympia, WA 98504"]].map(([k,v])=>`<div class="fact"><span>${k}</span><b>${v}</b></div>`).join('')}
|
||
</div>
|
||
</section>
|
||
|
||
<section class="section">
|
||
<div class="eyebrow">The exam</div>
|
||
<h2>Format, fees & renewal</h2>
|
||
<div class="facts">
|
||
${[["Questions","50–100 multiple choice"],["Time limit","120 minutes"],["Passing score","70%"],["Book","Closed book"],["Exam fee","$33"],["License fee","$73"],["Renewal fee","$73"],["Renewal period","5 years"],["Continuing education","40 CEUs per 5-year period"]].map(([k,v])=>`<div class="fact"><span>${k}</span><b>${v}</b></div>`).join('')}
|
||
</div>
|
||
</section>
|
||
|
||
<section class="section">
|
||
<div class="eyebrow">Licensed categories</div>
|
||
<h2>Seven categories — each needs its own exam</h2>
|
||
<div class="cards">
|
||
${["Agricultural","Ornamental & Turf","Structural","Right-of-Way","Aquatic","Forest","Public Health"].map((c,i)=>`<div class="card" style="cursor:default"><span class="num">0${i+1}</span><h3>${c}</h3><p>Separate category-specific exam, in addition to the core exam.</p></div>`).join('')}
|
||
</div>
|
||
</section>
|
||
|
||
<section class="section">
|
||
<div class="eyebrow">What the core exam tests</div>
|
||
<h2>Ten areas of knowledge</h2>
|
||
<div class="cards">
|
||
${[["Pesticide Safety","Handling, storage, formulations, and core safety principles."],["Label Reading","Signal words, directions for use, and legal requirements."],["Environmental Protection","Buffer zones, drift, groundwater, and endangered species."],["Laws & Regulations","FIFRA, WPS, recordkeeping, and certification requirements."],["Integrated Pest Management","Monitoring, thresholds, biological control, and IPM strategy."],["Toxicology","LD50, exposure routes, symptoms, and first aid."],["Application Equipment","Calibration, nozzles, sprayers, and drift management."],["PPE","Respirators, gloves, coveralls, and decontamination."],["Worker Protection Standard","WPS requirements, REIs, notifications, and employer obligations."],["Calibration & Math","GPA calculations, mixing ratios, and nozzle output."]].map(([t,d],i)=>`<div class="card" style="cursor:default"><span class="num">${String(i+1).padStart(2,'0')}</span><h3>${t}</h3><p>${d}</p></div>`).join('')}
|
||
</div>
|
||
</section>
|
||
|
||
<section class="section">
|
||
<div class="eyebrow">Study resources</div>
|
||
<h2>Where to go deeper</h2>
|
||
<div class="facts">
|
||
${[["Primary resource","Washington State University Extension — extension.wsu.edu"],["This suite","The EM019 manual, 13 chapters of it, is right here in the Field Guide"],["The drills","Flashcards and the practice exam above are your prep engine"]].map(([k,v])=>`<div class="fact"><span>${k}</span><b>${v}</b></div>`).join('')}
|
||
</div>
|
||
</section>
|
||
|
||
<section class="section">
|
||
<div class="eyebrow">Check yourself</div>
|
||
<h2>WA certification quick test</h2>
|
||
<p class="lede">Eight questions, straight from the same material — written here, not lifted from anywhere.</p>
|
||
<div class="facts" style="gap:18px">
|
||
${[["Which agency regulates pesticide use in Washington?","The Washington State Department of Agriculture (WSDA)."],["What federal law governs pesticide use nationwide?","FIFRA — the Federal Insecticide, Fungicide, and Rodenticide Act."],["What does the signal word DANGER mean?","Category I — highly toxic."],["How long do you keep RUP application records?","At least 2 years from the application date."],["Most common exposure route for an applicator?","Dermal — through the skin."],["What does the REI do?","Restricts re-entry into a treated area until residues drop to a safe level."],["First thing before mixing any pesticide?","Read the entire label."],["Poison Control number?","1-800-222-1222."]].map(([q,a],i)=>`<div class="fact"><span>Q${i+1}. ${q}</span><b>${a}</b></div>`).join('')}
|
||
</div>
|
||
</section>
|
||
`;
|
||
'''
|
||
|
||
s = s.rstrip() + '\n' + WA_RENDER + '\n'
|
||
|
||
open(p, 'w').write(s)
|
||
print(f"added WA Certification view; new size {len(s)}")
|