Files
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

45 lines
1.8 KiB
Python
Raw Permalink 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 — Bill of Materials (BOM). Copy this folder to <PROJECT>/source/ and fill it in.
A list of parts to pull, check and pack. Marked INTERNAL USE automatically. 1–2 pages.
See MPM_Document_Standard.md §9.4. Reference: BOM-OMT-HW-01 (Omnitrans).
Order: masthead (automatic) → item sections (doc.bom) → Draft items to confirm (while < 1.0)
→ sign-off → Revision history (automatic)
Unknown values are TBC (red), never guessed; every TBC appears in the 'items to confirm' note.
"""
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, TBC
doc = Doc(
number="BOM-MPM-SUBJ-01", rev="0.1", date="2026-11-06",
customer=None, subject="Project hardware",
title="What Is Being Packed",
lede="What the list covers and what to do with it (pull, check off, pack).",
meta=[("Customer", "Customer"), ("Prepared by", "Jason · MPM")],
slug="Customer_Short-Title_BOM",
history=[("0.1", "2026-11-06", "Initial draft.")],
)
doc.add(
# (item, specification, qty, uom[, part no.]) · group by category · subtotal per section
doc.bom([
("Fasteners", [
("Hex bolt, M8 × 30 mm", f"M8 × 1.25 · 30 mm L · hex head<br>Material/grade {TBC}", 150, "ea"),
("Flange nut, M8", "M8 × 1.25 · serrated flange", 150, "ea", "PN-0000"),
], "Fastener subtotal"),
("Consumables", [
("Sealing tape", f"Foil tape<br>Width × length {TBC}", 6, "roll"),
], "Consumables subtotal"),
]),
doc.note("Draft · items to confirm before release", [
"<b>Material and grade</b> for all fasteners.",
"<b>Tape size</b> (width × roll length).",
], tone="warn"),
doc.signoff(("Pulled by", "Checked by", "Date")),
)
doc.build()