Skip to content

MarkdownCheatSheets

Module that generates Cheat Sheets in Markdown format.

A cheat sheet is a synthetic view of something, of objects with a lots of properties. In this case, for example PlateMinimumAreaMdCS show input data, calculations and output in synthetic manner.

This module mirrors latexCheatSheets.py but outputs Markdown instead of LaTeX.

Classes list:

1. BeamMinimumAreaMdCS
2. ConcreteMaterialMdCS
3. PlateMinimumAreaMdCS
4. RebarMaterialMdCS

BeamMinimumAreaMdCS

Bases: MarkdownFragmentsBuilder

Markdown cheat sheet builder for beam minimum area per NTC2018.

Examples:

fragBuilder = markdownCheatSheets.BeamMinimumAreaMdCS(
    markdownTemplatePath=markdownTemplatePath,
    data=data
)

frag = fragBuilder.buildFragment()

reporter = MarkdownReporter(markdownTemplatePath)
reporter.linkFragments(ReportTemplateEnum.MD_ENG_CAL, [frag])
reporter.compileDocument(path=str(tmp_path), fileName="report", output_format="html")

ConcreteMaterialMdCS

Bases: MarkdownFragmentsBuilder

Markdown cheat sheet builder for concrete material properties.

Examples:

fragBuilder = markdownCheatSheets.ConcreteMaterialMdCS(
    markdownTemplatePath=markdownTemplatePath,
    data=data
)

frag_title = MarkdownFragment()
frag_title.add(line="## Concrete Material Properties")
frag = fragBuilder.buildFragment()

reporter = MarkdownReporter(markdownTemplatePath)
reporter.linkFragments(ReportTemplateEnum.MD_ENG_CAL, [frag_title, frag])
reporter.compileDocument(path=str(tmp_path), fileName="report", output_format="html")

PlateMinimumAreaMdCS

Bases: MarkdownFragmentsBuilder

Markdown cheat sheet builder for plate minimum area per EC2.

The class builds a fragment report starting from PlateMinimumArea class. The class needs a MarkdownReporter class in report module to build real html/md file.

Examples:

fragBuilder = markdownCheatSheets.PlateMinimumAreaMdCS(
    markdownTemplatePath=markdownTemplatePath,
    data=data
)

frag_title = MarkdownFragment()
frag_title.add(line="## Area minima delle piastre secondo EC2")
frag = fragBuilder.buildFragment()

reporter = MarkdownReporter(markdownTemplatePath)
reporter.linkFragments(ReportTemplateEnum.MD_ENG_CAL, [frag_title, frag])
reporter.compileDocument(path=str(tmp_path), fileName="report", output_format="html")

RebarMaterialMdCS

Bases: MarkdownFragmentsBuilder

Markdown cheat sheet builder for rebar steel material properties.

Examples:

fragBuilder = markdownCheatSheets.RebarMaterialMdCS(
    markdownTemplatePath=markdownTemplatePath,
    data=data
)

frag = fragBuilder.buildFragment()

reporter = MarkdownReporter(markdownTemplatePath)
reporter.linkFragments(ReportTemplateEnum.MD_ENG_CAL, [frag])
reporter.compileDocument(path=str(tmp_path), fileName="report", output_format="html")