Jump to content

Wikipedia:Database reports/Orphaned talk pages/Configuration

From Wikipedia, the free encyclopedia

orphanedtalks.py

[edit]
                                SELECT
                                                page_namespace,
                                                page_id,
                                                page_title,
                                                page_is_redirect,
                                                page_len
                                FROM
                                                page talkpage
                                WHERE
                                                talkpage.page_title NOT LIKE '%/%'
                                AND
                                                talkpage.page_namespace IN (1,11,15,101,119)
                                AND
                                                NOT EXISTS (
                                                                SELECT
                                                                                1
                                                                FROM
                                                                                page mainpage
                                                                WHERE
                                                                                mainpage.page_namespace=talkpage.page_namespace-1
                                                                AND
                                                                                mainpage.page_title=talkpage.page_title
                                                                )
                                AND
                                                NOT EXISTS (
                                                                SELECT
                                                                                1
                                                                FROM
                                                                                templatelinks
                                                                WHERE
                                                                                talkpage.page_id=tl_from
                                                                AND
                                                                                tl_title='G8-exempt'
                                                                )
                                LIMIT 1000

Complete source is available on github.

crontab

[edit]
00 05 * * * /usr/bin/jsub -N cron-tools.database-reports-2 -quiet python /data/project/database-reports/reports/database-reports/main.py en orphaned_talk