Files
mpm-documentation-kit/_STANDARDS/templates/INS/build.py
T
Jason StedwellandClaude Opus 5.5 5b52636003 MPM Documentation Kit v1.3 (CW-034)
MPM Document Standard 1.3, mpmdoc build engine, templates for TN, INS, SOP,
BOM, SVY, TAP, DWG, TSB, PRO, SOW and WO (Chinese editions for TN and DWG),
glossary, MPM fonts and logos, and the mpm-technical-documents plugin 1.3.0.
Worked examples ship in the kit zip on Drive only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NWatTMmqmGatgHjDZvWs5b
2026-11-09 11:51:56 -06:00

69 lines
3.6 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""TEMPLATE — Installation Guide (INS). Copy this folder to <PROJECT>/source/ and fill it in.
Step-by-step physical installation for someone outside MPM (customer facilities, installer, field crew).
4–10 pages. See MPM_Document_Standard.md §9.1. Reference: INS-LT-15R-01 (LakeTran).
Order (do not reorder):
masthead (automatic) → Before you start → Process at a glance → Hardware + Tools
→ reference figure (template / drill schedule), optional → Walkthrough (one doc.step per step)
→ Final check → Revision history (automatic)
"""
import sys, pathlib
HERE = pathlib.Path(__file__).resolve().parent
sys.path.insert(0, str(next(p / "_STANDARDS" for p in HERE.parents if (p / "_STANDARDS").is_dir())))
from mpmdoc import Doc
from figs import FIGS
F = {k: f() for k, f in FIGS.items()}
doc = Doc(
number="INS-MPM-SUBJ-01", rev="0.1", date="2026-11-06",
customer=None, subject="Product",
title="Product Name:<br>Mount Type", # the outcome, not "Installation Guide"
lede="One sentence per phase of the job: mount it, wire it, hang it, lock it.",
meta=[("Audience", "Who does the work"), ("Mount type", "What it mounts to")],
slug="Customer_Product_Install",
history=[("0.1", "2026-11-06", "Initial draft.")],
)
doc.add(
# Safety, permits, who must do what, and anything to confirm BEFORE the first hole. Bold the critical fact.
doc.before_you_start([
"<b>Confirm the location and mounting height</b> with your MPM project contact before drilling.",
"<b>Wear eye protection and gloves.</b>",
"<b>Line-voltage wiring must be done by a qualified electrician</b> per NEC and local code.",
]),
doc.section("Process at a glance"),
doc.glance([("Mark<br>holes", "3 marks"), ("Drill", "Ø1/2\""), ("Mount<br>bracket", "3 bolts"),
("Wire", "8 splices"), ("Hang<br>&amp; test", "on bracket")]), # 4–8 tiles, ≤ 2 words + detail
'<div class="keep">' + doc.two(
doc.section("Hardware") + doc.table([("Item", ""), ("Spec", ""), ("Qty", "q")],
[["Bracket", '<span class="mono">107 × 465 mm</span>', "1"]], cls="tight"),
doc.section("Tools") + doc.table([("Tool", ""), ("Notes", "")], [["Drill", "Corded or 18 V+, low speed"]], cls="tight"),
ratio=(11, 9)) + "</div>",
doc.section("Walkthrough", new_page=True),
# One outcome per step. Kicker = the tool / part / place. 3–6 numbered actions. Say what success looks like.
doc.step(1, "Layout", "Mark the hole locations", doc.steps([
"Hold the bracket against the mounting face at the approved height.",
"Set a level on the bracket edge and adjust until it's <b>plumb</b>.",
"Mark through holes <b>A</b>, <b>B</b> and <b>C</b>.",
]) + doc.note("Check your marks", "A to C should measure <b>312 mm</b>."),
doc.figure(F["part"], "Caption: what the reader should see")), # side figure (35%)
doc.step(2, "12 V DC · WAGO 221", "Connect power", doc.steps([
"Confirm the breaker is <b>off</b>.",
"Splice <b>brown</b> to <b>red (+)</b> and <b>blue</b> to <b>black (−)</b>.",
]) + doc.note("Check polarity", "Reversing + and − can damage the sign.", tone="warn"),
doc.figure(F["part"], "Wide figures go below the text", style="width:45%;margin:0 auto"), wide=True), # wide=True for diagrams
doc.checklist("Final check", [
"Bracket plumb, all bolts tight",
"Every splice tug-tested",
"Sign powers up and every function works",
"Photo of the finished install sent to MPM",
]),
)
doc.build()