[Migrated] Merge other uses template
Open, Needs TriagePublic

Description

Since AWB already merges {{for}} and {{about}}, would it make sense to also include {{other uses}} into this merging? I could come up with some logic if you're interested. @GoingBatty 06:39, 30 December 2013 (UTC)

Reguyla updated the task description. (Show Details)
Reguyla raised the priority of this task from to Needs Triage.
Reguyla added a project: AutoWikiBrowser.
Reguyla moved this task to Feature request (unsorted) on the AutoWikiBrowser board.

@Magioladitis 07:33, 30 December 2013 (UTC) wrote:
@GoingBatty I would be interested. What are the rules?

@GoingBatty 04:03, 31 December 2013 (UTC) wrote:
@Magioladitis - Here's a start on the logic, but it's too greedy (i.e. if {{tl|for}} has more than three parameters, such as https://en.wikipedia.org/wiki/Systematics:

<source lang="C">
      <Replacement>
        <Find>{{for\s*?\|(.*?)\|(.*?)\|(.*?)}}\s*{{other uses\s*\|(.*?)}}</Find>
        <Replace>{{about||$1|$2|and|$3|other uses|$4}}</Replace>
        <Comment />
        <IsRegex>true</IsRegex>
        <Enabled>true</Enabled>
        <Minor>false</Minor>
        <BeforeOrAfter>true</BeforeOrAfter>
        <RegularExpressionOptions>IgnoreCase</RegularExpressionOptions>
      </Replacement>
      <Replacement>
        <Find>{{for\s*?\|(.*?)\|(.*?)}}\s*{{other uses\s*\|(.*?)}}</Find>
        <Replace>{{about||$1|$2|other uses|$3}}</Replace>
        <Comment />
        <IsRegex>true</IsRegex>
        <Enabled>true</Enabled>
        <Minor>false</Minor>
        <BeforeOrAfter>true</BeforeOrAfter>
        <RegularExpressionOptions>IgnoreCase</RegularExpressionOptions>
      </Replacement>
      <Replacement>
        <Find>{{for\s*?\|(.*?)\|(.*?)\|(.*?)}}\s*{{other uses}}</Find>
        <Replace>{{about||$1|$2|and|$3|other uses}}</Replace>
        <Comment />
        <IsRegex>true</IsRegex>
        <Enabled>true</Enabled>
        <Minor>false</Minor>
        <BeforeOrAfter>true</BeforeOrAfter>
        <RegularExpressionOptions>IgnoreCase</RegularExpressionOptions>
      </Replacement>
      <Replacement>
        <Find>{{for\s*?\|(.*?)\|(.*?)}}\s*{{other uses}}</Find>
        <Replace>{{about||$1|$2|other uses}}</Replace>
        <Comment />
        <IsRegex>true</IsRegex>
        <Enabled>true</Enabled>
        <Minor>false</Minor>
        <BeforeOrAfter>true</BeforeOrAfter>
        <RegularExpressionOptions>IgnoreCase</RegularExpressionOptions>
      </Replacement>
      <Replacement>
        <Find>{{other uses\s*\|(.*?)}}\s*{{for\s*?\|(.*?)\|(.*?)\|(.*?)}}</Find>
        <Replace>{{about||$2|$3|and|$4|other uses|$1}}</Replace>
        <Comment />
        <IsRegex>true</IsRegex>
        <Enabled>true</Enabled>
        <Minor>false</Minor>
        <BeforeOrAfter>true</BeforeOrAfter>
        <RegularExpressionOptions>IgnoreCase</RegularExpressionOptions>
      </Replacement>
      <Replacement>
        <Find>{{other uses\s*\|(.*?)}}\s*{{for\s*?\|(.*?)\|(.*?)}}</Find>
        <Replace>{{about||$2|$3|other uses|$1}}</Replace>
        <Comment />
        <IsRegex>true</IsRegex>
        <Enabled>true</Enabled>
        <Minor>false</Minor>
        <BeforeOrAfter>true</BeforeOrAfter>
        <RegularExpressionOptions>IgnoreCase</RegularExpressionOptions>
      </Replacement>
      <Replacement>
        <Find>{{other uses}}\s*{{for\s*?\|(.*?)\|(.*?)\|(.*?)}}</Find>
        <Replace>{{about||$1|$2|and|$3|other uses}}</Replace>
        <Comment />
        <IsRegex>true</IsRegex>
        <Enabled>true</Enabled>
        <Minor>false</Minor>
        <BeforeOrAfter>true</BeforeOrAfter>
        <RegularExpressionOptions>IgnoreCase</RegularExpressionOptions>
      </Replacement>
      <Replacement>
        <Find>{{other uses}}\s*{{for\s*?\|(.*?)\|(.*?)}}</Find>
        <Replace>{{about||$1|$2|other uses}}</Replace>
        <Comment />
        <IsRegex>true</IsRegex>
        <Enabled>true</Enabled>
        <Minor>false</Minor>
        <BeforeOrAfter>true</BeforeOrAfter>
        <RegularExpressionOptions>IgnoreCase</RegularExpressionOptions>
      </Replacement>
      <Replacement>
        <Find>{{about\s*?\|(.*?)\|(.*?)\|(.*?)}}\s*{{other uses\s*\|(.*?)}}</Find>
        <Replace>{{about|$1|$2|$3|other uses|$4}}</Replace>
        <Comment />
        <IsRegex>true</IsRegex>
        <Enabled>true</Enabled>
        <Minor>false</Minor>
        <BeforeOrAfter>true</BeforeOrAfter>
        <RegularExpressionOptions>IgnoreCase</RegularExpressionOptions>
      </Replacement>
      <Replacement>
        <Find>{{about\s*?\|(.*?)\|(.*?)\|(.*?)}}\s*{{other uses}}</Find>
        <Replace>{{about|$1|$2|$3|other uses}}</Replace>
        <Comment />
        <IsRegex>true</IsRegex>
        <Enabled>true</Enabled>
        <Minor>false</Minor>
        <BeforeOrAfter>true</BeforeOrAfter>
        <RegularExpressionOptions>IgnoreCase</RegularExpressionOptions>
      </Replacement>
      <Replacement>
        <Find>{{other uses\s*\|(.*?)}}\s*{{about\s*?\|(.*?)\|(.*?)\|(.*?)}}</Find>
        <Replace>{{about|$2|$3|$4|other uses|$1}}</Replace>
        <Comment />
        <IsRegex>true</IsRegex>
        <Enabled>true</Enabled>
        <Minor>false</Minor>
        <BeforeOrAfter>true</BeforeOrAfter>
        <RegularExpressionOptions>IgnoreCase</RegularExpressionOptions>
      </Replacement>
      <Replacement>
        <Find>{{other uses}}\s*{{about\s*?\|(.*?)\|(.*?)\|(.*?)}}</Find>
        <Replace>{{about|$1|$2|$3|other uses}}</Replace>
        <Comment />
        <IsRegex>true</IsRegex>
        <Enabled>true</Enabled>
        <Minor>false</Minor>
        <BeforeOrAfter>true</BeforeOrAfter>
        <RegularExpressionOptions>IgnoreCase</RegularExpressionOptions>
      </Replacement>
</source>

Thanks for your consideration!

Dinoguy1000 updated the task description. (Show Details)May 28 2015, 8:43 AM
Dinoguy1000 set Security to None.
Popsicleface048 closed this task as Declined.Dec 13 2017, 11:10 PM
Reedy reopened this task as Open.Dec 13 2017, 11:12 PM