drasil-printers-0.1.10.0: A framework for code and document generation for scientific software - Printers SubPackage
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.Drasil.Printers

Synopsis

HTML

Printer

genHTML :: String -> Document -> Doc Source #

Generate an HTML document from a Drasil Document.

Helpers

makeCSS :: Document -> Doc Source #

Generates the CSS selectors necessary for a document.

Markdown

Printer

makeMd :: [Doc] -> Doc Source #

Combines a list of sentences into a final Doc, also appends end note.

Section Printers

introInfo :: String -> [String] -> Maybe String -> Maybe String -> Doc Source #

Example title, authors, and maybe purpose section.

verInfo :: String -> String -> Doc Source #

Language version section.

unsupOS :: Maybe String -> Doc Source #

Invalid Operating Systems section, does not display unless atleast 1 invalid OS.

regularSec :: Doc -> Doc -> Doc Source #

Constructs regular section section from header and message.

instDoc :: [String] -> String -> (String, String) -> Doc Source #

Instruction section, contains 4 paragraphs, Running, Building, Input-Output and Config Files. The Config file section is only displayed if there are configuration files.

extLibSec :: [(String, String)] -> [String] -> Doc Source #

External Libraries section. The inputs are a list of name and version pairs and a list of the corresponding version numbers, these are first combined into a list of triplets, and then each printed on a new line.

endNote :: Int -> [String] -> Doc Source #

End section.

whatInfo :: Maybe String -> Maybe String -> Doc Source #

What section in generated README file, displays description and scope if not empty

Plain

Types

data SingleLine Source #

Data is either linear or not.

Constructors

OneLine 
MultiLine 

Functions

sentenceDoc :: SingleLine -> Spec -> Doc Source #

Create sentences for a document in Doc format.

exprDoc :: SingleLine -> Expr -> Doc Source #

Create expressions for a document in Doc format.

codeExprDoc :: SingleLine -> Expr -> Doc Source #

Create code expressions for a document in Doc format. assumes someone has already makde the code expression into an expression

symbolDoc :: Symbol -> Doc Source #

Create symbols for a document in Doc format.

unitDoc :: SingleLine -> USymb -> Doc Source #

Helper for printing units in Doc format.

showSymb :: Symbol -> String Source #

Helper for printing Symbols

showHasSymbImpl :: HasSymbol x => x -> String Source #

Helper for printing a HasSymbol in Implementation Stage

TeX

genTeX :: Document -> ShowTableOfContents -> PrintingInformation -> Doc Source #

Generates a LaTeX document.

Jupyter

genJupyterLessonPlan :: Document -> Doc Source #

Build the general Jupyter Notebook document.

genJupyterSRS :: Document -> Doc Source #

Build an SRS document in JSON format.

Markdown

genMDBook :: Project -> [(Filename, Doc)] Source #

Generate a mdBook SRS

makeBook :: Document -> PrintingInformation -> Doc Source #

Prints the .toml config file for mdBook.

makeRequirements :: PrintingInformation -> Doc Source #

Prints the .csv file mapping the original filepaths of assets to the location mdBook uses.

Log

printAllDebugInfo :: PrintingInformation -> UIDMap -> UIDMap -> [Doc] Source #

Gathers all printing functions and creates the debugging tables from them.

Printing Information and Options

data PrintingInformation Source #

Printing information contains a database, a stage, and a printing configuration.

Instances

Instances details
HasPrintingOptions PrintingInformation Source #

Finds the notation used for the PrintingConfiguration within the PrintingInformation.

Instance details

Defined in Language.Drasil.Printing.PrintingInformation

piSys :: ChunkDB -> Map UID Reference -> Stage -> PrintingConfiguration -> PrintingInformation Source #

Builds a document's printing information based on the system information.

class HasPrintingOptions c where Source #

Able to be printed.

Methods

getSetting :: Lens' c Notation Source #

Holds the printing notation.

data Notation Source #

Notation can be scientific or for engineering.

Constructors

Scientific 
Engineering 

defaultConfiguration :: PrintingConfiguration Source #

Default configuration is for engineering.

plainConfiguration :: PrintingConfiguration Source #

Simple printing configuration is scientific.