Page MenuHomePhabricator

[Migrated] Have a settings find-and-replace feature
Open, LowPublic

Description

It would be nice if AWB had a feature for changing all user-entered string values with a find-and-replace feature. For example, when creating *CountyTN-geo-stub tags and populating them, I need to do the following:

  • Replace {{Tennessee-geo-stub}} with {{*CountyTN-geo-stub}}; this means that if multiple stub tags are present on the page, and {{Tennessee-geo-stub}} is one of them, then the new tag will replace it.
  • Append the page with {{*CountyTN-geo-stub}}; this means that the page wilol end up with the tag, even if {{Tennessee-geo-stub}} wasn't present on the page.

Of course, I have the county name in here twice (and some times, when dealing with similar issues, it could be a lot more), I would like to be able to change it once. @Od_Mishehu 14:07, 14 October 2014 (UTC)

Event Timeline

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

@Stevietheman 16:11, 14 October 2014 (UTC) wrote:
Have you considered using F&R to delete the first stub (whether it's there or not) and combine this with Append to add the new stub?

@Stevietheman 18:58, 14 October 2014 (UTC) wrote:
This works correctly when that stub tag is the last one; however, if there are other stub tags afterwords (such as https://en.wikipedia.org/wiki/Harrison Bay State Park), ther stub tags end up in the wrong order - I replace one stgub tag with an other, but it's in a different place.

How can stubs be in the wrong order? Is that another facet of stubs I've been missing?

@Redrose64 23:11, 14 October 2014 (UTC) wrote:
There is no prescribed order for stub templates. The only rule about their positioning (see https://en.wikipedia.org/wiki/MOS:LAYOUT or the doc page of any stub template) is that they be at the very end of the page, except that any interlanguage links that may still be present should be after the stubs.

@Stevietheman 00:00, 15 October 2014 (UTC) wrote:
That was my understanding. Thanks for confirming I hadn't lost my marbles (yet). :)

@Od_Mishehu 10:31, 15 October 2014 (UTC) wrote:
There may be no MOS reason that the stub tags already prewsent are in that order, but I want to make it easy to see what I'm doing; if the removed tag and the added tag are in the same place, that's musch easier. And some times I also add the template in question to the summary (in the form of {{[[template:Foo-stub|Foo-stub]]}}), which means that it's there 2 more times.

@Od_Mishehu 13:33, 19 October 2014 (UTC) wrote:
{{unindent}}And even for this task, the external tool I have been using to create the county geo-stub lists is no longer working, so I have an other use of the county name in the settings - in the list generator, where I use "Geography of * County, Tennessee".

@Tom.Reding 17:39, 17 March 2015 (UTC) wrote:
@Od Mishehu, you can also carefully perform a find & replace on the settings file, which is human-readable and intuitively structured. It's not exactly user-friendly, but it works.

@Od_Mishehu 19:03, 17 March 2015 (UTC) wrote:
I've been doing this; I want a more user-friendly solution. This would also make sure that I son't accidently mess up any of the mainingful strings (words like "true" and "false", the xml tag names, etc.)

Josve05a triaged this task as Low priority.Aug 23 2015, 1:01 PM
Josve05a added a subscriber: Josve05a.

There seems to be more talk about the arbitrary example used ({{stub}} sorting) than there is about the actual feature (creating settings find-and-replace functionality). Just sayin'.