Skip to content

ويكيبيديا:تقارير قاعدة البيانات/القوالب غير الموجودة حسب عدد وصلات اللغات/en #390

@loka1

Description

@loka1

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:

  1. Fetch a list containing more than 1000 templates from the database.
  2. 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.
  3. 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 workingenhancementNew feature or request

Type

No type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions