Forum:Bracket list shortcuts?
Forums: | Index → Yu-Gi-Oh! Wiki Community Discussion → Bracket list shortcuts? Please sign your comments with ~~~~. See Help:Signatures and Help:Talk pages for further information. | Post |
I am wondering if there are any shortcuts to appending entire lists with brackets and asterisk bullet points. I have thought about writing a program, but my skills are a little rusty there.--Azul120 (talk • contribs) 16:38, September 25, 2011 (UTC)
- I'm not sure just what you're referring to; could you point to an example? (are you perhaps referring to the lists of sets on card pages?) 「ディノ奴千?!」? · ☎ Dinoguy1000 22:59, September 25, 2011 (UTC)
- I still don't know what you're talking about (you seem to be talking about something other than what I mentioned above, though); it would help me a lot if you just linked to an example. 「ディノ奴千?!」? · ☎ Dinoguy1000 03:58, September 26, 2011 (UTC)
- Here's an example of one of the pages: Test of Luck. I mean, I can do it line by line, but a quicker method would be preferable. --04:13, September 26, 2011 (UTC)Azul120 (talk • contribs)
- Okay, now I see what you mean. No, there's no template to automatically format lists of cards into bulleted, linked lists; any such template would have more overhead (both from an editor perspective and a server perspective) then simply using the list and link wikimarkup. Advanced text editors such as Notepad++ offer search-and-replace functionality which would allow you to almost completely automate such edits, though (regrettably, it's not possible in Windows Notepad, since its search-and-replace function does not allow finding or inserting newlines), and if you know how to use regexes, there are a myriad of online tools that could also be used. 「ディノ奴千?!」? · ☎ Dinoguy1000 04:28, September 26, 2011 (UTC)
- Pretty much, yes. Despite my prior disparaging of it, Windows Notepad is actually a pretty good place to start cutting your teeth on how search-and-replace generally works: here it is simply called "Replace...", and can be found under the "Edit" menu (or, if you're a keyboard jockey, you can just hit CTRL + H to open the replace interface). I actually use this tool a lot to perform certain edits, since it's very simple and straightforward, and Windows Notepad is a very low-footprint program that opens very quickly. 「ディノ奴千?!」? · ☎ Dinoguy1000 05:33, September 26, 2011 (UTC)
- Aah, okay. So then, are you needing any help with more advanced replaces or something? 「ディノ奴千?!」? · ☎ Dinoguy1000 05:46, September 26, 2011 (UTC)
- If you view the source code of the page, you can replace the
<p>
and</p>
tags with* [[
and]]
respectively. Depending on your browser, you can probably view the source code from the tools or view menu or simply hitting Ctrl + U. Unfortunately MediaWiki puts the line breaks in a weird position, so you'll still need to adjust the line breaks manually after your find and replace. -- Deltaneos (talk) 23:20, September 26, 2011 (UTC)
- If you view the source code of the page, you can replace the
- Actually this can be done using arraymap. Put
{{subst:#arraymap:
before the list and|\n\n|$$$|* [[$$$]]|\n}}
after the list. It will automatically convert it to a bulleted list when you save the page. e.g.
- Actually this can be done using arraymap. Put
{{subst:#arraymap: Blowback Dragon Dark Master - Zorc Dice Jar Gatling Dragon Snipe Hunter |\n\n |$$$ |* [[$$$]] |\n }}
- becomes...
* [[Blowback Dragon]] * [[Dark Master - Zorc]] * [[Dice Jar]] * [[Gatling Dragon]] * [[Snipe Hunter]]
- Right, I didn't even think of substitution. =P I'll have to keep that in mind to see if I can better automate other types of cleanup in the future. 「ディノ奴千?!」? · ☎ Dinoguy1000 19:43, September 27, 2011 (UTC)