Workdocumentation 2021-02-07
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: