drasil-website-0.1.0.0: Using the Drasil generators to create Drasil's website
Safe HaskellSafe-Inferred
LanguageHaskell2010

Drasil.Website.Example

Description

Create the list of Generated Examples for the Drasil website.

Synopsis

Gather Example Information

First gather all information needed to create an example. This includes system information, descriptions, and choices. These will also be exported for use in CaseStudy.hs.

data Example Source #

Each Example gets placed in here.

Constructors

E 

Fields

allExampleSI :: [SystemInformation] Source #

Records example system information.

allExampleChoices :: [[Choices]] Source #

Records example choices. The order of the list must match up with that in allExampleSI, or the Case Studies Table will be incorrect.

allExamples :: [SystemInformation] -> [[Choices]] -> FilePath -> FilePath -> [Example] Source #

Combine system info, description, choices, and file paths into one nice package.

examples :: FilePath -> FilePath -> [Example] Source #

Calls allExamples on allExampleSI, allExampleDesc, and allExampleChoices. Can be considered a "default" version of allExamples.

Functions to create the list of examples

fullExList :: FilePath -> FilePath -> RawContent Source #

Create the full list of examples.

allExampleList :: [Example] -> [ItemType] Source #

Create each example point and call individualExList to do the rest.

individualExList :: Example -> [ItemType] Source #

Display the points for generated documents and call versionList to display the code.

versionList :: (Example -> Lang -> String -> Reference) -> Example -> [ItemType] Source #

Takes a function that gets the needed references (either references for the code or doxygen references) and the example to create the list out of. For examples that have more than one version of generated code (more than one set of choices) like Projectile, we generate the code and doxygen references for each.

showLang :: Lang -> String Source #

Show function to display program languages to user.

Examples Section Functions

exampleSec :: FilePath -> FilePath -> Section Source #

Example section function generator. Makes a list of examples and generated artifacts.

exampleTitle :: Sentence Source #

Example section title.

exampleIntro :: Sentence Source #

Example section introduction.

generatedCodeTitle :: String Source #

Example list titles.

generatedCodeDocsTitle :: String Source #

Example list titles.

Helper functions in getting References for SRS, code folders, and Doxygen

convertLang :: Lang -> String Source #

Similar to showLang, but for use within Drasil for Referencing and UIDs.

getCodeRef :: Example -> Lang -> String -> Reference Source #

Generate a reference towards the code folder. Uses getCodePath to find the code path.

getDoxRef :: Example -> Lang -> String -> Reference Source #

Similar to getCodeRef, but gets the doxygen references and uses getDoxRef instead.

getSRSRef :: FilePath -> String -> String -> Reference Source #

Make references for each of the generated SRS files.

getSRSPath :: FilePath -> String -> String -> FilePath Source #

Get the paths of where each reference exist for SRS files. Some example abbreviations have spaces, so we just filter those out. The suffix should only be either html or pdf.

getCodePath :: FilePath -> String -> String -> FilePath Source #

Uses repoRt path (codePath in this module).

Get the file paths for generated code and doxygen locations.

getDoxPath :: FilePath -> String -> String -> FilePath Source #

Uses exRt path (srsDoxPath in this module).

Get the file paths for generated code and doxygen locations.

exampleRefs :: FilePath -> FilePath -> [Reference] Source #

Gather all references used in making the Examples section.

getCodeRefDB :: Example -> [Reference] Source #

Helpers to pull code and doxygen references from an example. Creates a reference for every possible choice in every possible language.

getDoxRefDB :: Example -> [Reference] Source #

Helpers to pull code and doxygen references from an example. Creates a reference for every possible choice in every possible language.

getAbrv :: Example -> String Source #

Helper to pull the system name (abbreviation) from an Example.