Difference between revisions of "Workdocumentation 2021-02-07"

From OPENRESEARCH th copy Wiki
Jump to navigation Jump to search
(Created page with "<source lang='php'> def testGenerateHelpPage(self): smw,wikiclient=self.getSMW() if smw is not None: wikiAction=WikiAction(smw) lambda...")
 
 
Line 33: Line 33:
 
         for row in rows:
 
         for row in rows:
 
</source>
 
</source>
 +
[[Category:Workdocumentation]]

Latest revision as of 11:23, 10 March 2021

 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: