Skip to content

Commit 80e7004

Browse files
committed
Some usability features
1 parent 02e6273 commit 80e7004

3 files changed

Lines changed: 22 additions & 0 deletions

File tree

‎examples/clean_demo_platform.py‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
from pathlib import Path
2+
3+
import osw.params as prm
4+
from osw.express import OswExpress
5+
6+
osw_obj = OswExpress(
7+
domain="demo.open-semantic-lab.org", cred_filepath=Path("accounts.pwd.yaml")
8+
)
9+
orgs = osw_obj.site.semantic_search(
10+
prm.SearchParam(
11+
query="[[HasType::Category:OSW1969007d5acf40539642877659a02c23]]", debug=False
12+
)
13+
)
14+
persons = osw_obj.site.semantic_search(
15+
prm.SearchParam(
16+
query="[[HasType::Category:OSW44deaa5b806d41a2a88594f562b110e9]]", debug=False
17+
)
18+
)
19+
osw_obj.site.delete_page(orgs + persons)

‎src/osw/express.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ def __repr__(self):
7171
def __eq__(self, other):
7272
if isinstance(other, CredentialsFpDefault):
7373
return self.default == other.default
74+
elif isinstance(other, DownloadDirDefault):
75+
return self.default == other.default
7476
return False
7577

7678
@property

‎src/osw/wtsite.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -639,6 +639,7 @@ def delete_page(
639639
if comment:
640640
param.comment = comment
641641
pages = []
642+
print("Getting pages to delete ...")
642643
for page in param.page:
643644
if isinstance(page, str):
644645
pages.append(WtPage(self, title=page, do_init=True))

0 commit comments

Comments
 (0)