Jump to content

User:Mandarax/DYKHookLength

From Wikipedia, the free encyclopedia



This tool takes the name of a DYK nomination template (Did you know nominations/xxx), Prep (Did you know/Preparation area x), Queue (Did you know/Queue/x), or other page with hooks (such as Wikipedia talk:Did you know) as a parameter, and displays any hooks it finds, and their lengths.

To create a link, use, for example: [https://en.wikipedia.org/wiki/Special:ExpandTemplates?withCSS=MediaWiki:HidefirstHeading.css&wpInput={{URLencode:{{User:Mandarax/DYKHookLength{{!}}Did you know nominations/xxx}}}} link]

This works on active DYK nomination templates, Preps, and Queues, but it will not work on a closed nomination page. It recognizes up to 10 hooks beginning with "... that" and ending with "?". Any hook which includes an additional "?" is not handled correctly. The ellipsis and the space following it are not counted, nor is any (pictured), but any additional text is counted, so for (example pictured), the 8 characters of "example " are counted. Other terminology, such as (illustrated), is not dealt with here, and may be manually subtracted accordingly. For hooks with more than one bold link, see WP:DYK200; this rule is applied inconsistently, and the adjustment is best determined by a human rather than an automated process.