Skip to content

Commit

Permalink
added debug param to WikiPage
Browse files Browse the repository at this point in the history
  • Loading branch information
tholzheim committed Mar 30, 2022
1 parent a9536ff commit e9cea89
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ wikitextparser
# https://pypi.org/project/Jinja2/
jinja2
# https://pypi.org/project/pylodstorage/
pylodstorage>=0.1.10
pylodstorage>=0.2.0
# https://pypi.org/project/py-3rdparty-mediawiki/
py-3rdparty-mediawiki>=0.5.4
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

setup(
name='wikirender',
version='0.0.36',
version='0.0.37',
packages=['wikifile','templates','templates/macros', 'wikifile/resources/metamodel'],
classifiers=[
'Programming Language :: Python',
Expand Down
2 changes: 1 addition & 1 deletion tests/test_wikiPage.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ def test_updatePageWikiSON_delete(self):
self.pageUpdater.updatePageWikiSON(pageTitle, self.testWikiSonEntity, updateRecord)
pageRecord = self.pageUpdater.getWikiSonFromPage(pageTitle, self.testWikiSonEntity)
self.assertEqual(record['uuid'], pageRecord['uuid'])
self.assertNotIn('startdate', pageRecord)
self.assertNotIn('startdate', pageRecord)
4 changes: 3 additions & 1 deletion wikifile/wikiPage.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ class WikiPage:
Provides functionalities to update the WikiSON content of a page
"""

def __init__(self, wikiId:str):
def __init__(self, wikiId:str, debug:bool=False):
"""
Constructor
Args:
wikiId: id of the wiki
debug(bool): If True show debug messages
"""
self.debug=debug
self.wikiId = wikiId
self.wikiFileManager = WikiFileManager(sourceWikiId=self.wikiId, targetWikiId=self.wikiId)

Expand Down

0 comments on commit e9cea89

Please sign in to comment.