Commons:Requests for comment/Technical needs survey/"Building block" tool to select files

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
Previous proposal Overview page Next proposal

"Building block" tool to select files

[edit]

Description of the Problem

[edit]
  • Problem description: We have several tools for Commons maintenance that, as part of their action, select files or file pages (and in some cases, where it makes sense, category pages) to be acted upon. Each currently has its own selection mechanism. Each provides methods of selection that would be useful in the others.

Tools involved include at least [feel free to edit]:

  • VFC:
    • Can select from a category? Yes
    • Can select from a search result? Yes
    • Can select subcategory pages to be acted upon? No, even though at times it would make sense (e.g. to notify for a mass CfD.)
    • Can select file pages to be acted upon? Yes
    • Further remarks: can be a bit slow to load files for selection (which it does in batches of 100). Has some good methods to hover and see information about a file. Easy to open any given file in a new window during selection.
  • Cat-a-lot:
    • Can select from a category? Yes
    • Can select from a search result? Yes
    • Can select subcategory pages to be acted upon? Yes
    • Can select file pages to be acted upon? Yes
    • Further remarks: Uses the regular cat page loading to allow files/subcats to be chosen, which is a lot quicker to load than VFC, but does not allow the hovering for information; also means you can only act on the content of one page at a time (200 files).
  • massrename:
    • Can select from a category? Yes
    • Can select from a search result? No, and this would certainly make sense
    • Can select subcategory pages to be acted upon? No, and this would certainly make sense
    • Can select file pages to be acted upon? Not really. Acts on all filenames that match the regex, and there is no convenient way to say "except these." In practice, you can use VFC or Cat-a-lot to add a temporary maintenance category to the files you want to act on, then act on them with massrename, then use VFC or Cat-a-lot to remove the temporary maintenance category
    • Further remarks: Provides a regex-based selection of files that would be nice to be able to combine with other methods of selection.
  • AWB:
    • Can select from a category? Yes
    • Can select from a search result? Yes
    • Can select subcategory pages to be acted upon? No, and this would certainly make sense
    • Can select file pages to be acted upon? Yes, but not visually. Acts on all pagenames that match the regex, and there is no convenient way to say "except these," without using the list management features or deleting pages from the list. In practice, you can use AWB, VFC, or Cat-a-lot to add a temporary maintenance category to the pages you want to act on, then act on them with AWB, then use AWB, VFC, or Cat-a-lot to remove the temporary maintenance category
    • External tool, maintained on English Wikipedia. Runs on the local computer using Windows Vista and later. Very powerful using No Limits Plugin, so right to use it on Commons must be requested at COM:RFR#AutoWikiBrowser access, and rights to use it most effectively on Commons must be requested at COM:BRFA (to run unattended in bot mode) and COM:RFA (to delete files in Admin mode).
  • Others?
  • Proposal type: feature request
  • Proposed solution:

We could have a common "building block" or component that would embrace all of the current methods of selection. Tools could then be re-implemented to take advantage of that. Or, each of the existing selection mechanisms could be abstracted, with a clean interface providing a list of selected files, allowing "mix and match" for selection method and what tool you are using.

  • Phabricator ticket:
  • Further remarks:

Not all methods would necessarily make sense for all tools, so there needs to be some ability to turn features on and off when using the building block.

Discussion

[edit]

Proposed by - Jmabel ! talk 01:02, 4 January 2024 (UTC)[reply]

i think, cat-a-lot can be understood as being capable of "selecting from a search result". you can do that on a special:search page.
this building block mechanism would be really useful. it could be used for new tools like to licence review files from the same batch. RZuo (talk) 06:53, 4 January 2024 (UTC)[reply]
Corrected Cat-a-lot + search. - Jmabel ! talk 20:06, 4 January 2024 (UTC)[reply]

Do I understand the proposal correct that you want some kind of JavaScript library for easy development of tools? Basically Pywikibot for the web browser. GPSLeo (talk) 17:15, 15 January 2024 (UTC)[reply]

@GPSLeo: That would be helpful for those who cannot yet understand Python.   — 🇺🇦Jeff G. please ping or talk to me🇺🇦 10:49, 17 January 2024 (UTC)[reply]

Votes

[edit]