Jump to content

User:John of Reading/AWB settings/Pages using infoboxes with thumbnail images

From Wikipedia, the free encyclopedia

These settings help to deal with Category:Pages using infoboxes with thumbnail images.

John Doe
John Doe
John Doe
Born
John Doe

Rules 1 to 5 try to identify an image-like parameter followed by a [[File:...|thumb|...]] construction that isn't too unusual - no alt text; size, if specified, is between 200 and 259 pixels; caption, if present, contains no templates or wikilinks that might confuse the regular expressions.

Rule 1 fires when there is no caption, leaving only parameter = image name. This is usually good, but fails when [[File:...|thumb|...]] is followed by something else, such as second image.

Rule 2 tries to guess when a caption can safely be ignored. Typically the image is at the top of the infobox just underneath the name of the person, school or company, so captions such as "John Doe", "Logo of FooBar plc" or "SomeVille High School Logo" can probably be dropped. My "John Doe" example, at right, is not that unusual.

Rule 3 looks ahead for a blank caption-like parameter, and moves the caption there. This is often correct, but there is no guarantee that the rule has found the correct parameter name.

Rule 4 moves the caption to a following caption-like parameter so that the two captions can be merged by hand. The guideline is at MOS:CAPTION.

Rule 5 moves the caption to a new caption parameter. There is no guarantee that this is the correct parameter name, or that there isn't another parameter of this name somewhere else in the infobox.

Rule 6 tries to draw attention to cases where rules 1 to 5 are inadequate or have decided not to trigger, ready for manual copyediting.

These rules often help towards a correct edit, but there is usually more to do. In particular, if there is an image size-like parameter, it was being ignored before the edit and should probably be removed. I have been checking both the diff and the preview.

<?xml version="1.0" encoding="utf-8"?>
<AutoWikiBrowserPreferences xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xml:space="preserve" Version="5.8.5.1">
  <Project>wikipedia</Project>
  <LanguageCode>en</LanguageCode>
  <CustomProject />
  <Protocol>http://</Protocol>
  <LoginDomain />
  <List>
    <ListSource>Pages using infoboxes with thumbnail images</ListSource>
    <SelectedProvider>CategoryListProvider</SelectedProvider>
    <ArticleList />
  </List>
  <FindAndReplace>
    <Enabled>true</Enabled>
    <IgnoreSomeText>false</IgnoreSomeText>
    <IgnoreMoreText>false</IgnoreMoreText>
    <AppendSummary>false</AppendSummary>
    <Replacements>
      <Replacement>
        <Find>(\|\s*(?:cover|image|image_comm|image_file|image_skyline|img|logo|logofile|picture\d?|screenshot|signature|static_image)\s*=\s*)\[\[(?:file|image)\:([^\[\]\|]+)\|(?=[^\[\]]*\b(?:thumb|thumbnail)\b)(\||\s|left|right|center|centre|none|2[012345]\d\s*px|thumb|thumbnail)+\]\] *</Find>
        <Replace>$1$2</Replace>
        <Comment>(1) No caption inside [[File:...]]</Comment>
        <IsRegex>true</IsRegex>
        <Enabled>true</Enabled>
        <Minor>false</Minor>
        <BeforeOrAfter>false</BeforeOrAfter>
        <RegularExpressionOptions>IgnoreCase</RegularExpressionOptions>
      </Replacement>
      <Replacement>
        <Find>(\|\s*(?:cover|image|image_comm|image_file|image_skyline|img|logo|logofile|picture\d?|screenshot|signature|static_image)\s*=\s*)\[\[(?:file|image)\:([^\[\]\|]+)\|(?=[^\[\]]*\b(?:thumb|thumbnail)\b)(\||\s|left|right|center|centre|none|2[012345]\d\s*px|thumb|thumbnail|''|'''|\&lt;center\&gt;|\&lt;\/center\&gt;|\.|Caption|Logo|of|Photo|Photograph|%%pagename%%)+\]\] *</Find>
        <Replace>$1$2</Replace>
        <Comment>(2) Trivial caption inside [[File:...]], ignore it</Comment>
        <IsRegex>true</IsRegex>
        <Enabled>true</Enabled>
        <Minor>false</Minor>
        <BeforeOrAfter>false</BeforeOrAfter>
        <RegularExpressionOptions>IgnoreCase</RegularExpressionOptions>
      </Replacement>
      <Replacement>
        <Find>(\|\s*(?:cover|image|image_comm|image_file|image_skyline|img|logo|logofile|picture\d?|screenshot|signature|static_image)\s*=\s*)\[\[(?:file|image)\:([^\[\]\|]+)\|(?=[^\[\]]*\b(?:thumb|thumbnail)\b)(?:\||\s|left|right|center|centre|none|2[012345]\d\s*px|thumb|thumbnail)*([^\|\[\]]+)\]\]((?s:.){0,200}\|\s*(?:caption|image_caption|image_comm_caption|logo_caption|picture_caption)\s*=)(?=\s*(\||\}\}))</Find>
        <Replace>$1$2$4$3</Replace>
        <Comment>(3) Move caption1 to following blank caption2</Comment>
        <IsRegex>true</IsRegex>
        <Enabled>true</Enabled>
        <Minor>false</Minor>
        <BeforeOrAfter>false</BeforeOrAfter>
        <RegularExpressionOptions>IgnoreCase</RegularExpressionOptions>
      </Replacement>
      <Replacement>
        <Find>(\|\s*(?:cover|image|image_comm|image_file|image_skyline|img|logo|logofile|picture\d?|screenshot|signature|static_image)\s*=\s*)\[\[(?:file|image)\:([^\[\]\|]+)\|(?=[^\[\]]*\b(?:thumb|thumbnail)\b)(?:\||\s|left|right|center|centre|none|2[012345]\d\s*px|thumb|thumbnail)*([^\|\[\]]+)\]\]((?s:.){0,200}\|\s*(?:caption|image_caption|image_comm_caption|logo_caption|picture_caption)\s*=)</Find>
        <Replace>$1$2$4$3 MERGE</Replace>
        <Comment>(4) Prepend caption1 to following caption2</Comment>
        <IsRegex>true</IsRegex>
        <Enabled>true</Enabled>
        <Minor>false</Minor>
        <BeforeOrAfter>false</BeforeOrAfter>
        <RegularExpressionOptions>IgnoreCase</RegularExpressionOptions>
      </Replacement>
      <Replacement>
        <Find>(\|\s*(?:cover|image|image_comm|image_file|image_skyline|img|logo|logofile|picture\d?|screenshot|signature|static_image)\s*=\s*)\[\[(?:file|image)\:([^\[\]\|]+)\|(?=[^\[\]]*\b(?:thumb|thumbnail)\b)(?:\||\s|left|right|center|centre|none|2[012345]\d\s*px|thumb|thumbnail)*([^\|\[\]]+)\]\]</Find>
        <Replace>$1$2 | caption = $3</Replace>
        <Comment>(5) Try adding a following "caption" parameter</Comment>
        <IsRegex>true</IsRegex>
        <Enabled>true</Enabled>
        <Minor>false</Minor>
        <BeforeOrAfter>false</BeforeOrAfter>
        <RegularExpressionOptions>IgnoreCase</RegularExpressionOptions>
      </Replacement>
      <Replacement>
        <Find>(\w\s*=\s*\[\[(?:file|image)\:[^\[\]]+\|\s*)(?:thumb|thumbnail)(\s*(\||\]\]))</Find>
        <Replace>$1**THUMB**$2</Replace>
        <Comment>(6) Just highlight the keyword</Comment>
        <IsRegex>true</IsRegex>
        <Enabled>true</Enabled>
        <Minor>false</Minor>
        <BeforeOrAfter>false</BeforeOrAfter>
        <RegularExpressionOptions>IgnoreCase</RegularExpressionOptions>
      </Replacement>
    </Replacements>
    <AdvancedReps />
    <SubstTemplates />
    <IncludeComments>false</IncludeComments>
    <ExpandRecursively>true</ExpandRecursively>
    <IgnoreUnformatted>false</IgnoreUnformatted>
  </FindAndReplace>
  <Editprefs>
    <GeneralFixes>false</GeneralFixes>
    <Tagger>false</Tagger>
    <Unicodify>false</Unicodify>
    <Recategorisation>0</Recategorisation>
    <NewCategory />
    <NewCategory2 />
    <ReImage>0</ReImage>
    <ImageFind />
    <Replace />
    <SkipIfNoCatChange>false</SkipIfNoCatChange>
    <RemoveSortKey>false</RemoveSortKey>
    <SkipIfNoImgChange>false</SkipIfNoImgChange>
    <AppendText>false</AppendText>
    <AppendTextMetaDataSort>false</AppendTextMetaDataSort>
    <Append>true</Append>
    <Text />
    <Newlines>2</Newlines>
    <AutoDelay>10</AutoDelay>
    <BotMaxEdits>0</BotMaxEdits>
    <SupressTag>false</SupressTag>
    <RegexTypoFix>false</RegexTypoFix>
  </Editprefs>
  <General>
    <AutoSaveEdit>
      <Enabled>false</Enabled>
      <SavePeriod>30</SavePeriod>
      <SaveFile />
    </AutoSaveEdit>
    <SelectedSummary>Removed the extra frame from the infobox image</SelectedSummary>
    <Summaries>
      <string>Removed the extra frame from the infobox image</string>
      <string>Removed the extra frame from the infobox image, removed redundant caption;</string>
    </Summaries>
    <PasteMore>
      <string />
      <string />
      <string />
      <string />
      <string />
      <string />
      <string />
      <string />
      <string />
      <string />
    </PasteMore>
    <FindText>dice</FindText>
    <FindRegex>false</FindRegex>
    <FindCaseSensitive>false</FindCaseSensitive>
    <WordWrap>true</WordWrap>
    <ToolBarEnabled>false</ToolBarEnabled>
    <BypassRedirect>true</BypassRedirect>
    <AutoSaveSettings>true</AutoSaveSettings>
    <noSectionEditSummary>false</noSectionEditSummary>
    <restrictDefaultsortAddition>true</restrictDefaultsortAddition>
    <restrictOrphanTagging>true</restrictOrphanTagging>
    <noMOSComplianceFixes>false</noMOSComplianceFixes>
    <syntaxHighlightEditBox>false</syntaxHighlightEditBox>
    <highlightAllFind>true</highlightAllFind>
    <PreParseMode>false</PreParseMode>
    <NoAutoChanges>false</NoAutoChanges>
    <OnLoadAction>0</OnLoadAction>
    <DiffInBotMode>false</DiffInBotMode>
    <Minor>false</Minor>
    <AddToWatchlist>2</AddToWatchlist>
    <TimerEnabled>false</TimerEnabled>
    <SortListAlphabetically>true</SortListAlphabetically>
    <AddIgnoredToLog>false</AddIgnoredToLog>
    <EditToolbarEnabled>false</EditToolbarEnabled>
    <filterNonMainSpace>false</filterNonMainSpace>
    <AutoFilterDuplicates>true</AutoFilterDuplicates>
    <FocusAtEndOfEditBox>false</FocusAtEndOfEditBox>
    <scrollToUnbalancedBrackets>true</scrollToUnbalancedBrackets>
    <TextBoxSize>10</TextBoxSize>
    <TextBoxFont>Courier New</TextBoxFont>
    <LowThreadPriority>false</LowThreadPriority>
    <Beep>false</Beep>
    <Flash>false</Flash>
    <Minimize>false</Minimize>
    <LockSummary>false</LockSummary>
    <SaveArticleList>true</SaveArticleList>
    <SuppressUsingAWB>false</SuppressUsingAWB>
    <AddUsingAWBToActionSummaries>false</AddUsingAWBToActionSummaries>
    <IgnoreNoBots>false</IgnoreNoBots>
    <ClearPageListOnProjectChange>false</ClearPageListOnProjectChange>
    <SortInterWikiOrder>true</SortInterWikiOrder>
    <ReplaceReferenceTags>true</ReplaceReferenceTags>
    <LoggingEnabled>true</LoggingEnabled>
    <AlertPreferences />
  </General>
  <SkipOptions>
    <SkipNonexistent>true</SkipNonexistent>
    <Skipexistent>false</Skipexistent>
    <SkipDontCare>false</SkipDontCare>
    <SkipWhenNoChanges>false</SkipWhenNoChanges>
    <SkipSpamFilterBlocked>false</SkipSpamFilterBlocked>
    <SkipInuse>true</SkipInuse>
    <SkipWhenOnlyWhitespaceChanged>false</SkipWhenOnlyWhitespaceChanged>
    <SkipOnlyGeneralFixChanges>true</SkipOnlyGeneralFixChanges>
    <SkipOnlyMinorGeneralFixChanges>false</SkipOnlyMinorGeneralFixChanges>
    <SkipOnlyCosmetic>false</SkipOnlyCosmetic>
    <SkipOnlyCasingChanged>false</SkipOnlyCasingChanged>
    <SkipIfRedirect>true</SkipIfRedirect>
    <SkipIfNoAlerts>false</SkipIfNoAlerts>
    <SkipDoes>false</SkipDoes>
    <SkipDoesText />
    <SkipDoesRegex>true</SkipDoesRegex>
    <SkipDoesCaseSensitive>false</SkipDoesCaseSensitive>
    <SkipDoesAfterProcessing>false</SkipDoesAfterProcessing>
    <SkipDoesNot>false</SkipDoesNot>
    <SkipDoesNotText />
    <SkipDoesNotRegex>false</SkipDoesNotRegex>
    <SkipDoesNotCaseSensitive>false</SkipDoesNotCaseSensitive>
    <SkipDoesNotAfterProcessing>false</SkipDoesNotAfterProcessing>
    <SkipNoFindAndReplace>false</SkipNoFindAndReplace>
    <SkipMinorFindAndReplace>false</SkipMinorFindAndReplace>
    <SkipNoRegexTypoFix>false</SkipNoRegexTypoFix>
    <SkipNoDisambiguation>false</SkipNoDisambiguation>
    <SkipNoLinksOnPage>false</SkipNoLinksOnPage>
    <GeneralSkipList />
  </SkipOptions>
  <Module>
    <Enabled>false</Enabled>
    <Language>C# 3.5</Language>
    <Code>        public string ProcessArticle(string ArticleText, string ArticleTitle, int wikiNamespace, out string Summary, out bool Skip)
        {
            Skip = false;
            Summary = "test";
            ArticleText = "test \r\n\r\n" + ArticleText;
            return ArticleText;
        }</Code>
  </Module>
  <ExternalProgram>
    <Enabled>false</Enabled>
    <Skip>false</Skip>
    <Program />
    <Parameters />
    <PassAsFile>true</PassAsFile>
    <OutputFile />
  </ExternalProgram>
  <Disambiguation>
    <Enabled>false</Enabled>
    <Link />
    <Variants />
    <ContextChars>20</ContextChars>
  </Disambiguation>
  <Special>
    <namespaceValues />
    <remDupes>true</remDupes>
    <sortAZ>true</sortAZ>
    <filterTitlesThatContain>false</filterTitlesThatContain>
    <filterTitlesThatContainText />
    <filterTitlesThatDontContain>false</filterTitlesThatDontContain>
    <filterTitlesThatDontContainText>/</filterTitlesThatDontContainText>
    <areRegex>false</areRegex>
    <opType>0</opType>
    <remove />
  </Special>
  <Tool>
    <ListComparerUseCurrentArticleList>0</ListComparerUseCurrentArticleList>
    <ListSplitterUseCurrentArticleList>0</ListSplitterUseCurrentArticleList>
    <DatabaseScannerUseCurrentArticleList>0</DatabaseScannerUseCurrentArticleList>
  </Tool>
  <Plugin />
</AutoWikiBrowserPreferences>