summaryrefslogtreecommitdiff
path: root/proposals.py
diff options
context:
space:
mode:
Diffstat (limited to 'proposals.py')
-rwxr-xr-xproposals.py28
1 files changed, 8 insertions, 20 deletions
diff --git a/proposals.py b/proposals.py
index 37e8ead..157e727 100755
--- a/proposals.py
+++ b/proposals.py
@@ -12,25 +12,6 @@ osmwiki = pywikiapi.Site(OSMWIKI_ENDPOINT)
# https://wiki.openstreetmap.org/w/index.php?title=Template:Proposal_page&action=edit
-CATEGORIES = (
- 'Category:Proposed features under way',
- 'Category:Proposals without post-vote cleanup',
- 'Category:Active features',
- 'Category:Inactive features',
-)
-
-
-def find_proposals():
- for cat in CATEGORIES:
- yield from osmwiki.query_pages(
- generator='categorymembers',
- gcmtitle=cat,
- gcmlimit='max',
- prop='revisions',
- rvprop='content',
- rvslots='main',
- )
-
def get_template_val(tpl, name):
param = tpl.get(name, None)
@@ -74,7 +55,14 @@ def is_stub(doc):
return False
-for page in find_proposals():
+for page in osmwiki.query_pages(
+ generator='embeddedin',
+ geititle='Template:Proposal Page',
+ geilimit='max',
+ prop='revisions',
+ rvprop='content',
+ rvslots='main',
+):
page_title = page['title']
text = page['revisions'][0]['slots']['main']['content']
doc = mwparserfromhell.parse(text)