From e9cea897d97e2c63b40ebc44d95f737b46efab8c Mon Sep 17 00:00:00 2001 From: tholzheim Date: Thu, 31 Mar 2022 00:31:41 +0200 Subject: [PATCH] added debug param to WikiPage --- requirements.txt | 2 +- setup.py | 2 +- tests/test_wikiPage.py | 2 +- wikifile/wikiPage.py | 4 +++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/requirements.txt b/requirements.txt index 7668973..b2f4c33 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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 diff --git a/setup.py b/setup.py index 1dc85a7..22d674d 100644 --- a/setup.py +++ b/setup.py @@ -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', diff --git a/tests/test_wikiPage.py b/tests/test_wikiPage.py index 3b066a9..2ee5298 100644 --- a/tests/test_wikiPage.py +++ b/tests/test_wikiPage.py @@ -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) \ No newline at end of file + self.assertNotIn('startdate', pageRecord) diff --git a/wikifile/wikiPage.py b/wikifile/wikiPage.py index 8e6cd86..58188b9 100644 --- a/wikifile/wikiPage.py +++ b/wikifile/wikiPage.py @@ -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)