-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request
Description
Task Description:
The task is to update the list of missing templates on Wikipedia based on the database report. The main steps are as follows:
- Fetch a list containing more than 1000 templates from the database.
- Use Pywikibot to check the existence of each template on Arabic Wikipedia:
- Each template in the list is checked to see if it already exists on Wikipedia.
- Existing templates are excluded from the report.
- After checking, only 1000 non-existing templates will be displayed in the final report.
Example code for verification:
import pywikibot
# Set up the Wikipedia site
site = pywikibot.Site('ar', 'wikipedia')
def check_template_existence(template_name):
"""Check if a template exists on Wikipedia."""
template_page = pywikibot.Page(site, f"Template:{template_name}")
return template_page.exists()
# List of templates to check
template_list = ["Template1", "Template2", "Template3"]
non_existing_templates = []
for template in template_list:
if not check_template_existence(template):
non_existing_templates.append(template)
# Display non-existing templates
print("Non-existing templates:", non_existing_templates)
Additional Notes:
- Data must first be fetched from the database and then checked using Pywikibot.
- The final list is limited to displaying 1000 non-existing templates only.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request
Type
Projects
Status
In Progress