Jump to content

User:GhostInTheMachine/SDlinkBuilder

From Wikipedia, the free encyclopedia

GhostInTheMachineTalkAllHelpMiscModulesOtherLayoutPhotosProjectsScriptsTidyingTidyingSDTODOUBXWIP2024-08-11 12:47:54

Purpose

[edit]

This script helps you to create a Wikipedia page that is a list of pages with their current short descriptions.

The script does not alter any article at all. It just creates wiki text for you. To "work", you have to paste this wiki text into a page somewhere.

Use

[edit]

This script may be used on any page in any name space.

It collects all of the wiki links from the current page, filters out links to some of the namespaces and then displays wiki text for a sorted list of the remaining links.

The wiki text may then be pasted into a sandbox page or just viewed as a preview in the page editor.

Each link is wrapped in a template that outputs the current short description of the article in the link.

This makes it easy to spot articles with no short description.

By building this list from a category page, the script also helps to spot any articles where the short description does not follow the same pattern as the rest of the articles in the category.

Just work down the list and open each incorrect article in a new tab ...

For examples of the pages created, see my SD work pages: SD SD2 SD3 SD4

Prerequisites

[edit]

None.

Installing

[edit]

Add the following line to your common.js file.

{{subst:Lusc|User:GhostInTheMachine/SDlinkBuilder.js}}

Depending on which skin is configured, this will add an extra tab or an extra menu item.

  • Vector — adds "SDlinks" option to the "More" menu
  • Modern / Monobook — adds "sdlinks" tab after the "history" and "watch" tabs
  • Timeless — adds "SDlinks" options to the Page tools menu
  • MinervaNeue — does not add the SDlinks option at all

If you do not see the new option, then refresh the page. If that fails – flush the browser cache.

Alternatives

[edit]

I wrote this script partly as a learning exercise in writing a user script. It works and does what it says on the tin, but there are, of course, alternative tools for assisting with short descriptions.

Fork

[edit]

Hi! I forked this script at User:Qwerfjkl/scripts/getLinks, but it's annoying to copy on mobile, so I added some code to add a copy button. [1] I just thought I'd notify you in case you wanted to add this to your own script. In any case, happy editing! ― Qwerfjkltalk 22:42, 22 January 2022 (UTC)

Possible improvements

[edit]
  • Create the list in a blank new window, so that the original page is not disturbed
  • Add a Save option to write the list to a specific user sub-page
  • Filter the list to remove articles that are known to not need a SD
  • Add {{Infobox Wikipedia user script}}?

See also

[edit]