Vendor guide: Calibri font, US carrier note, cleanup
- Set Calibri as explicit font on all runs via _run() helper - Added note that many large US carriers work with Canadian carriers and to ask about specific regulatory requirements - BCM One ownership for Flowroute - Cleaned up leftover manual font assignments Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
3bac30510e
commit
15cd006260
1 changed files with 48 additions and 52 deletions
|
|
@ -124,6 +124,25 @@ def generate_vendor_guide(
|
|||
return None
|
||||
|
||||
doc = Document()
|
||||
FONT = "Calibri"
|
||||
|
||||
# Set default font for entire document
|
||||
style = doc.styles["Normal"]
|
||||
style.font.name = FONT
|
||||
style.font.size = Pt(10)
|
||||
|
||||
def _run(paragraph, text, size=10, color=None, bold=False, italic=False, underline=False):
|
||||
"""Helper to add a consistently-fonted run."""
|
||||
r = paragraph.add_run(text)
|
||||
r.font.name = FONT
|
||||
r.font.size = Pt(size)
|
||||
if color:
|
||||
r.font.color.rgb = color
|
||||
r.font.bold = bold
|
||||
r.font.italic = italic
|
||||
if underline:
|
||||
r.font.underline = underline
|
||||
return r
|
||||
|
||||
# Page setup
|
||||
for section in doc.sections:
|
||||
|
|
@ -135,102 +154,79 @@ def generate_vendor_guide(
|
|||
# Title
|
||||
title = doc.add_paragraph()
|
||||
title.alignment = WD_ALIGN_PARAGRAPH.CENTER
|
||||
run = title.add_run("Canadian Wholesale Vendor Reference Guide")
|
||||
run.font.size = Pt(18)
|
||||
run.font.color.rgb = NAVY
|
||||
run.font.bold = True
|
||||
_run(title, "Canadian Wholesale Vendor Reference Guide", size=20, color=NAVY, bold=True)
|
||||
|
||||
# Subtitle
|
||||
sub = doc.add_paragraph()
|
||||
sub.alignment = WD_ALIGN_PARAGRAPH.CENTER
|
||||
sr = sub.add_run(f"Prepared for {entity_name}")
|
||||
sr.font.size = Pt(11)
|
||||
sr.font.color.rgb = GRAY
|
||||
_run(sub, f"Prepared for {entity_name}", size=11, color=GRAY)
|
||||
|
||||
date_p = doc.add_paragraph()
|
||||
date_p.alignment = WD_ALIGN_PARAGRAPH.CENTER
|
||||
dr = date_p.add_run(datetime.now().strftime("%B %Y"))
|
||||
dr.font.size = Pt(10)
|
||||
dr.font.color.rgb = GRAY
|
||||
_run(date_p, datetime.now().strftime("%B %Y"), size=10, color=GRAY)
|
||||
|
||||
# Intro
|
||||
doc.add_paragraph()
|
||||
intro = doc.add_paragraph()
|
||||
ir = intro.add_run(
|
||||
ir = _run(intro,
|
||||
"As a newly registered Canadian telecommunications service provider, you will need "
|
||||
"upstream wholesale partners to provide voice termination, DID numbers, SIP trunking, "
|
||||
"and potentially white-label UCaaS or broadband services. This guide lists vendors "
|
||||
"commonly used by Canadian telecom resellers."
|
||||
)
|
||||
ir.font.size = Pt(10)
|
||||
ir.font.color.rgb = RGBColor(0x37, 0x41, 0x51)
|
||||
|
||||
intro2 = doc.add_paragraph()
|
||||
ir2 = intro2.add_run(
|
||||
_run(intro2,
|
||||
"Many large US carriers and wholesale providers (e.g. Lumen, Bandwidth, Telnyx, Sinch) "
|
||||
"are willing to work with CRTC-registered Canadian carriers for cross-border voice and "
|
||||
"data services. If you have a specific US carrier you want to work with, contact them "
|
||||
"directly and ask about their requirements for onboarding a Canadian wholesale partner. "
|
||||
"Requirements vary by carrier \u2014 some require an RMD filing, others only need a CRTC "
|
||||
"registration letter and proof of incorporation.",
|
||||
size=10, color=RGBColor(0x37, 0x41, 0x51),
|
||||
)
|
||||
|
||||
intro3 = doc.add_paragraph()
|
||||
_run(intro3,
|
||||
"Performance West does not endorse or guarantee any of these vendors. This list is "
|
||||
"provided for reference only. You should evaluate each provider based on your specific "
|
||||
"business requirements, traffic volume, geographic coverage needs, and pricing."
|
||||
"business requirements, traffic volume, geographic coverage needs, and pricing.",
|
||||
size=9, color=GRAY, italic=True,
|
||||
)
|
||||
ir2.font.size = Pt(9)
|
||||
ir2.font.color.rgb = GRAY
|
||||
ir2.font.italic = True
|
||||
|
||||
# Vendors
|
||||
for vendor in VENDORS:
|
||||
doc.add_paragraph()
|
||||
|
||||
# Vendor name
|
||||
# Vendor name + location
|
||||
name_p = doc.add_paragraph()
|
||||
nr = name_p.add_run(vendor["name"])
|
||||
nr.font.size = Pt(13)
|
||||
nr.font.color.rgb = NAVY
|
||||
nr.font.bold = True
|
||||
|
||||
loc_r = name_p.add_run(f" — {vendor['location']}")
|
||||
loc_r.font.size = Pt(10)
|
||||
loc_r.font.color.rgb = GRAY
|
||||
_run(name_p, vendor["name"], size=14, color=NAVY, bold=True)
|
||||
_run(name_p, f" — {vendor['location']}", size=10, color=GRAY)
|
||||
|
||||
# Website
|
||||
web_p = doc.add_paragraph()
|
||||
wr = web_p.add_run(vendor["website"])
|
||||
wr.font.size = Pt(9)
|
||||
wr.font.color.rgb = RGBColor(0x1E, 0x40, 0xAF)
|
||||
wr.font.underline = True
|
||||
_run(web_p, vendor["website"], size=9, color=RGBColor(0x1E, 0x40, 0xAF), underline=True)
|
||||
|
||||
# Services
|
||||
svc_label = doc.add_paragraph()
|
||||
sl = svc_label.add_run("Services: ")
|
||||
sl.font.size = Pt(9)
|
||||
sl.font.bold = True
|
||||
sl.font.color.rgb = RGBColor(0x37, 0x41, 0x51)
|
||||
sv = svc_label.add_run(vendor["services"])
|
||||
sv.font.size = Pt(9)
|
||||
sv.font.color.rgb = RGBColor(0x37, 0x41, 0x51)
|
||||
_run(svc_label, "Services: ", size=9.5, color=RGBColor(0x37, 0x41, 0x51), bold=True)
|
||||
_run(svc_label, vendor["services"], size=9.5, color=RGBColor(0x37, 0x41, 0x51))
|
||||
|
||||
# Notes
|
||||
notes_p = doc.add_paragraph()
|
||||
nl = notes_p.add_run("Notes: ")
|
||||
nl.font.size = Pt(9)
|
||||
nl.font.bold = True
|
||||
nl.font.color.rgb = GRAY
|
||||
nn = notes_p.add_run(vendor["notes"])
|
||||
nn.font.size = Pt(9)
|
||||
nn.font.color.rgb = GRAY
|
||||
_run(notes_p, "Notes: ", size=9, color=GRAY, bold=True)
|
||||
_run(notes_p, vendor["notes"], size=9, color=GRAY)
|
||||
|
||||
# Footer disclaimer
|
||||
doc.add_paragraph()
|
||||
doc.add_paragraph()
|
||||
disc = doc.add_paragraph()
|
||||
disc_r = disc.add_run(
|
||||
_run(disc,
|
||||
"Document prepared by Performance West Inc., a regulatory compliance consulting firm. "
|
||||
"Performance West Inc. is not a law firm and this document does not constitute legal advice "
|
||||
"or legal representation. Vendor information is current as of the date shown above and "
|
||||
"may change without notice."
|
||||
"may change without notice.",
|
||||
size=7, color=RGBColor(0x99, 0x99, 0x99), italic=True,
|
||||
)
|
||||
disc_r.font.size = Pt(7)
|
||||
disc_r.font.color.rgb = RGBColor(0x99, 0x99, 0x99)
|
||||
disc_r.font.italic = True
|
||||
|
||||
# Save
|
||||
out = Path(output_path)
|
||||
out.parent.mkdir(parents=True, exist_ok=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue