3 import "http://www.simantics.org/Help-1.0" as HELP
5 importJava "org.simantics.help.core.HelpUtils" where
6 createHelpLibrary :: Resource -> <WriteGraph, Proc> Resource
7 createHelpTutorial :: Resource -> String -> <WriteGraph, Proc> Resource
8 clearHelpTocCache :: () -> <Proc> ()
9 saveHelpFileContents :: Resource -> String -> <WriteGraph, Proc> ()
10 readHelpFileContents :: Resource -> <ReadGraph, Proc> String
11 markdownToHtml :: Resource -> <ReadGraph, Proc> String
12 getHelpBrowserUrl :: () -> URL
14 createHelpLibraryAction :: Resource -> <Proc> ()
15 createHelpLibraryAction parent = do
16 syncWrite (\() -> createHelpLibrary parent)
19 createHelpTutorialAction :: Resource -> <Proc> ()
20 createHelpTutorialAction parent = do
21 tutorialFiles = syncRead (\x -> objectsWithType parent L0.ConsistsOf HELP.TutorialFile)
22 fileName = if length tutorialFiles == 0
25 "Tutorial " + (show (length tutorialFiles))
26 syncWrite (\() -> createHelpTutorial parent fileName)