Skip to content

Commit

Permalink
Merge branch 'master' of github.com:tholzheim/wikirender
Browse files Browse the repository at this point in the history
# Conflicts:
#	setup.py
  • Loading branch information
tholzheim committed Jun 23, 2021
2 parents 1ec5670 + 3e78f6e commit a234b0e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions wikifile/wikiFileManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,16 @@ def convertWikiFilesToLOD(self, wikiFiles: list, wikiSonName: str):
header(list): Header for CSV File
pageDicts(List of Dics): List of Dicts of pages
'''
lod = {}
lod = []
for wikifile in wikiFiles:
if isinstance(wikifile, WikiFile):
values = wikifile.extract_template(wikiSonName)
if values is None:
values = {}
pageTitle = wikifile.getPageTitle()
if pageTitle is not None:
lod[pageTitle] = values
if pageTitle is not None and len(values)>0:
values['pageTitle']= pageTitle
lod.append(values)
return lod

def pagesListtoDict(self, data: list, titleKey: str = "pageTitle") -> dict:
Expand Down Expand Up @@ -151,7 +152,7 @@ def pushWikiFilesToWiki(self, wiki_files: list):
def getUpdatedPages(self, records: dict, wikiSon: str) -> list:
"""
Updates the wikiPages with the given values by applying the values to the WikiSon object matching the given wikiSon name.
The update is applied by creating a WikiFile object from the page contnent in the wiki.
The update is applied by creating a WikiFile object from the page content in the wiki.
The changes are then applied in the WikiFile object.
Note: At this point the changes are not applied to the wiki. Do do so use pushWikiFilesToWiki()
Expand Down

0 comments on commit a234b0e

Please sign in to comment.