Jump to content

User:Abyssal/Multi image converter

From Wikipedia, the free encyclopedia

I need some bulk cosmetic improvements to my implementation of the multiple image template.

2 images

[edit]
  1. Find all the multiple image templates with only two images.
  2. remove the existing width rows for each image.
  3. insert "| total_width = 248" between the beginning of the template and the first image.
  4. insert "| footer = " just before the end of the template
  5. copy the caption of the first image in the footer section
  6. insert the text "Left:" just before the caption.
  7. insert a period at the end of the caption.
  8. copy the file name of the first image and paste it into a <!-- comment --> between the "Left:" and the text of the caption.
  9. repeat the process with the second image but labeling it "Right:" instead of left.
  10. remove all the "width" and caption rows for individual images

Example 2 image input

[edit]
Mounted fossilized skeleton of the Pleistocene-Holocene bovid Bootherium bombifrons, or Harlan's musk ox.
Modern mounted skeleton of Canis lupus, the grey wolf, to scale with a fossilized skeleton of the Pleistocene wolf Canis dirus, or dire wolf

Example 2 image output

[edit]
Left: Mounted fossilized skeleton of the Pleistocene-Holocene bovid Bootherium bombifrons, or Harlan's musk ox.. Right: Modern mounted skeleton of Canis lupus, the grey wolf, to scale with a fossilized skeleton of the Pleistocene wolf Canis dirus, or dire wolf.




spacer

3 images

[edit]
  1. Find all the multiple image templates with three images.
  2. remove the existing width rows for each image.
  3. insert "| total_width = 330" between the beginning of the template and the first image.
  4. insert "| footer = " just before the end of the template
  5. copy the caption of the first image in the footer section
  6. insert the text "Left:" just before the caption.
  7. insert a period at the end of the caption.
  8. copy the file name of the first image and paste it into a <!-- comment --> between the "Left:" and the text of the caption.
  9. repeat the process with the second and third image but labeling them "Middle:" and "Right:" instead of left.
  10. remove all the "width" and caption rows for individual images

Example 3 image input

[edit]
Life restoration of a Mammut americanum, or American mastodon
Fossilized claws and phalanges found in Haynes Cave, Monroe County; the type specimen of the grount sloth Megalonyx jeffersonii. This species is recognized as West Virginia's state fossil.
Mounted fossilized skeleton of M. jeffersonii

Example 3 image output

[edit]
Left: Life restoration of a Mammut americanum, or American mastodon. Middle: Fossilized claws and phalanges found in Haynes Cave, Monroe County; the type specimen of the grount sloth Megalonyx jeffersonii. This species is recognized as West Virginia's state fossil. Right: Mounted fossilized skeleton of M. jeffersonii.

Modification to the original image caption operation

[edit]

Can you make it able to read and correct the captions when they're after the commented out file name? Abyssal (talk) 16:04, 4 April 2019 (UTC)