This repository has been archived on 2026-02-12. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
swift-duct-calc/Sources/PdfClient/Request+markdown.swift

43 lines
1.0 KiB
Swift

import ManualDCore
extension PdfClient.Request {
func toMarkdown() -> String {
var retval = """
# Duct Calc
**Name:** \(project.name)
**Address:** \(project.streetAddress)
\(project.city), \(project.state) \(project.zipCode)
## Equipment
| | Value |
|-----------------|---------------------------------|
| Static Pressure | \(equipmentInfo.staticPressure) |
| Heating CFM | \(equipmentInfo.heatingCFM) |
| Cooling CFM | \(equipmentInfo.coolingCFM) |
## Friction Rate
| | Value |
|-----------------|---------------------------------|
"""
for row in componentLosses {
retval = """
\(retval)
\(componentLossRow(row))
"""
}
return retval
}
func componentLossRow(_ row: ComponentPressureLoss) -> String {
return """
| \(row.name) | \(row.value) |
"""
}
}