| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Language.Drasil.Printers
Synopsis
- genHTML :: String -> Document -> Doc
- makeCSS :: Document -> Doc
- makeMd :: [Doc] -> Doc
- introInfo :: String -> [String] -> Maybe String -> Maybe String -> Doc
- verInfo :: String -> String -> Doc
- unsupOS :: Maybe String -> Doc
- regularSec :: Doc -> Doc -> Doc
- instDoc :: [String] -> String -> (String, String) -> Doc
- extLibSec :: [(String, String)] -> [String] -> Doc
- endNote :: Int -> [String] -> Doc
- whatInfo :: Maybe String -> Maybe String -> Doc
- data SingleLine
- sentenceDoc :: SingleLine -> Spec -> Doc
- exprDoc :: SingleLine -> Expr -> Doc
- codeExprDoc :: SingleLine -> Expr -> Doc
- symbolDoc :: Symbol -> Doc
- unitDoc :: SingleLine -> USymb -> Doc
- showSymb :: Symbol -> String
- showHasSymbImpl :: HasSymbol x => x -> String
- genTeX :: Document -> ShowTableOfContents -> PrintingInformation -> Doc
- genJupyterLessonPlan :: Document -> Doc
- genJupyterSRS :: Document -> Doc
- genMDBook :: Project -> [(Filename, Doc)]
- makeBook :: Document -> PrintingInformation -> Doc
- makeRequirements :: PrintingInformation -> Doc
- printAllDebugInfo :: PrintingInformation -> UIDMap -> UIDMap -> [Doc]
- data PrintingInformation
- piSys :: ChunkDB -> Map UID Reference -> Stage -> PrintingConfiguration -> PrintingInformation
- class HasPrintingOptions c where
- getSetting :: Lens' c Notation
- data Notation
- defaultConfiguration :: PrintingConfiguration
- plainConfiguration :: PrintingConfiguration
HTML
Printer
Helpers
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.
unsupOS :: Maybe String -> Doc Source #
Invalid Operating Systems section, does not display unless atleast 1 invalid OS.
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.
whatInfo :: Maybe String -> Maybe String -> Doc Source #
What section in generated README file, displays description and scope if not empty
Plain
Types
Functions
sentenceDoc :: SingleLine -> Spec -> Doc Source #
Create sentences 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
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
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
| HasPrintingOptions PrintingInformation Source # | Finds the notation used for the |
Defined in Language.Drasil.Printing.PrintingInformation Methods getSetting :: Lens' PrintingInformation Notation Source # | |
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.
Instances
| HasPrintingOptions PrintingConfiguration Source # | Finds the notation used for the |
Defined in Language.Drasil.Printing.PrintingInformation Methods getSetting :: Lens' PrintingConfiguration Notation Source # | |
| HasPrintingOptions PrintingInformation Source # | Finds the notation used for the |
Defined in Language.Drasil.Printing.PrintingInformation Methods getSetting :: Lens' PrintingInformation 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.