Workdocumentation 2021-02-07

From OPENRESEARCH th copy Wiki
Revision as of 11:23, 10 March 2021 by Wf (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
 def testGenerateHelpPage(self):
        smw,wikiclient=self.getSMW()
        if smw is not None:
            wikiAction=WikiAction(smw)
            lambdaAction=wikiAction.getLambdaAction('test generate HelpPages','DblpConfSeriesQuery','CreateHelpPageTest')
            # derive from List of Topic Query
            askQuery="""{{#ask: [[Concept:Topic]] [[Topic name::Event]]
|mainlabel=Topic
| ?Topic name = name
| ?Topic pluralName = pluralName
| ?Topic icon = icon
| ?Topic iconUrl = iconUrl
| ?Topic documentation = documentation
| ?Topic wikiDocumentation = wikiDocumentation
| ?Topic defaultstoremode = defaultstoremode
| ?Topic listLimit = listLimit
| ?Topic cargo = cargo
| ?Topic headerTabs = headerTabs
| ?Topic context = context
}}"""
            topicResults=smw.query(askQuery)
            topicInfo=topicResults['Concept:Event']
            rows=[topicInfo]
            context={"rows":rows,"smw":smw,"wikiclient":wikiclient}
            wikiclient.login()
            print(lambdaAction.code.text)
            #self.generateHelpPage(context)
            pass
        
    def generateHelpPage(self,context):
        rows=context["rows"]
        for row in rows: