Talk:Templates: Difference between revisions
From Clavis Canonum
Latest comment: 15 November 2023 by Christof Rolker in topic Kery template and ReplaceText
(→Kery template and ReplaceText: Reply) |
(→Kery template and ReplaceText: Reply) |
||
Line 16: | Line 16: | ||
::Thanks so much. Oddly, "Recent Changes" reports only some of the changes, and does not report the use of ReplaceText; but that's not important. Also thanks for feedback on pinging, we don't really need it anyhow. (I mainly used it out of habit.) [[User:Christof Rolker|Christof Rolker]] ([[User talk:Christof Rolker|talk]]) 16:21, 15 November 2023 (CET) | ::Thanks so much. Oddly, "Recent Changes" reports only some of the changes, and does not report the use of ReplaceText; but that's not important. Also thanks for feedback on pinging, we don't really need it anyhow. (I mainly used it out of habit.) [[User:Christof Rolker|Christof Rolker]] ([[User talk:Christof Rolker|talk]]) 16:21, 15 November 2023 (CET) | ||
:::Yes, I didn't tick the box for "Announce these edits via Special:RecentChanges and watchlists" when replacing, the only changes visible on RecentChanges are those I did manually. [[User:SStark|SStark]] ([[User talk:SStark|talk]]) 16:33, 15 November 2023 (CET) | :::Yes, I didn't tick the box for "Announce these edits via Special:RecentChanges and watchlists" when replacing, the only changes visible on RecentChanges are those I did manually. [[User:SStark|SStark]] ([[User talk:SStark|talk]]) 16:33, 15 November 2023 (CET) | ||
:Note to self: For two-digit page numbers the ReplaecText command looks like this "\{\{Author\|Kéry\}\}, Canonical Collections[,|] pp\. ([0-9][0-9])–" to "{{Author|Kéry}}, Collections p. {{Kery|$1}". No need to announce changes via Special:RecentChanges but then again, it does no harm. [[User:Christof Rolker|Christof Rolker]] ([[User talk:Christof Rolker|talk]]) 17:31, 15 November 2023 (CET) |
Revision as of 17:31, 15 November 2023
Kery template and ReplaceText
Now we have Lotte's volume online and @Clemens at the speed of lights provided a template, I'd love to see links from the descriptions to the book. Using regular expressions with the Special Page "Replace Text" should do the trick. Specifically, it should be easy to auto-replace any occurence of
{{Author|Kéry}}, Collections p. n
with {{Author|Kéry}}, Collections p. {{Kery|n}}
.
In practice, one has to reckon with some variation:
{{Author|Kéry}}, Collections p. n
{{Author|Kéry}}, Canonical collections, p. n
{{Author|Kéry}}, Collections, p. n
{{Author|Kéry}}, Collections pp. n
All these expressions should be replaced by "{{Author|Kéry}}, Collections p. {{Kery|n}}
. There also will be page ranges ("pp. 123-134"), but linking the first page of any page range is enough.
@Sophie Stark, can you have a look? Thanks in advance, Christof Rolker (talk) 20:37, 14 November 2023 (CET)
- Done. But I feel like the pinging-function doesn't properly work. I only saw this comment by chance, I didn't get any sort of mail despite having confirmed my mail-address. SStark (talk) 16:09, 15 November 2023 (CET)
- Thanks so much. Oddly, "Recent Changes" reports only some of the changes, and does not report the use of ReplaceText; but that's not important. Also thanks for feedback on pinging, we don't really need it anyhow. (I mainly used it out of habit.) Christof Rolker (talk) 16:21, 15 November 2023 (CET)
- Note to self: For two-digit page numbers the ReplaecText command looks like this "\{\{Author\|Kéry\}\}, Canonical Collections[,|] pp\. ([0-9][0-9])–" to "Kéry, Collections p. {{Kery|$1}". No need to announce changes via Special:RecentChanges but then again, it does no harm. Christof Rolker (talk) 17:31, 15 November 2023 (CET)