User talk:Haus/Archive 6

From Wikipedia, the free encyclopedia

Archive This is an archive of past discussions. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page.


Contents

Infobox migration

I noticed from USS Oregon (BB-3) that you did not remove {{newinfobox}} from the talk page when you converted the infobox with a script. Could this be programmed into it, so other editors don't have to manually remove that tag? -MBK004 17:31, 28 March 2008 (UTC)

My current understanding is that situation would be an exception rather than the rule. That is to say that if a page has {{Infobox Ship}}, its unlikely that its talk page would have {{newinfobox}}. But I'll look into it and see what's going on. In a worst-case scenario, I guess I could open my edit history in AWB and get rid of them that way. Cheers. HausTalk 17:38, 28 March 2008 (UTC)

Infobox migration - possibly use abbreviated code?

Hey Haus! I'm really impressed by your infobox migration plugin. I wanted to suggest that you perhaps consider using some of the abbreviated copy-and-paste code for the new ship infobox, rather than the entire thing. For example, using the entire code puts fields like "test depth" on USS George H. W. Bush (CVN-77), where they aren't applicable. Perhaps you could determine which fields to use by which category you're working through? Articles under Category:Battleships would never need fields like "test depth", while Category:Cruise ships would never need armor/armour. You could possibly also remove American/British English spelling fields as appropriate; HMS articles shouldn't have armor, honors, or draft, while USS ships shouldn't have armour, honours, or draught. There are already some suggested abbreviated selections of code on Template:Infobox Ship Begin/doc. TomTheHand (talk) 18:40, 29 March 2008 (UTC)

Hi Tom, thanks for the kind words. I'm kind of being guided by the KISS principle -- the more bells and whistles I add, especially in this early stage, the more likely it is that something bad could happen. On the other hand, I could see doing the kinds of mods you're talking about in another run with AWB. For example, load up the category Category:Aircraft carriers of the United States in AWB and remove armour, honours, draught, test depth, etc. Does that make sense? Cheers. HausTalk 18:57, 29 March 2008 (UTC)
p.s. I didn't realize you're a software guy. If you'd like to peruse code, just let me know. Cheers. HausTalk 19:00, 29 March 2008 (UTC)
That does make great sense. In fact, I may start doing that with AWB from now on! Yes, I am a software guy... haven't worked with Java in some years, but hey, programming is programming, and C# (the language I work with now) is a total Java ripoff anyway. I don't do any Wikipedia-related programming... the most I do is occasionally get the latest source for AWB, compile it, and if I find bugs, I'll sometimes hack around them myself. I also write some pretty nasty AWB regexes. I would love to see your code. I'll send you an e-mail, and if you'd like, you could reply back with the code attached or something. TomTheHand (talk) 22:42, 29 March 2008 (UTC)
Okie dokie, I'll see if I can get everything wrapped up into a non-explosive package tonight and launch it off to you. Cheers. HausTalk 00:42, 30 March 2008 (UTC)
OK, it should be in your inbox, I'll be back in the a.m. Cheers. HausTalk 02:51, 30 March 2008 (UTC)

USS Hawaii (SSN-776)

On USS Hawaii (SSN-776) the infobox changeover went haywire. I decided to leave as is for now rather than revert. Couldn't find the bug myself. --Brad (talk) 23:24, 30 March 2008 (UTC)

Thanks for the heads up, Brad. I fixed it -- a <ref> tag spanned a few lines and got chomped. Cheers. HausTalk 23:34, 30 March 2008 (UTC)
Sorry; here's another: USS Holton (DE-703) --Brad (talk) 11:50, 3 April 2008 (UTC)
No worries, it's all fixed. If you find any others, please don't hesitate to let me know. HausTalk 13:28, 3 April 2008 (UTC)

Infobox migration

Could you possibly work your magic on Template:Infobox Military Submarine or do I need to continue doing them manually? Thanks. Woody (talk) 19:20, 2 April 2008 (UTC)

I'm pretty sure we can come up with something better than doing it manually. I'm not really clear how some of the fields should translate, for example: flotillas, commanders, # of patrols, successes, fieldpost number. The branch and type fields might be obvious, but the little light-bulb isn't coming on over my head. If you could point me in the right direction on these, and maybe give me a link to a good page that you've converted?
I was kicking around an idea with Tom and Barek the other day that might be the right solution for this.
Cheers, HausTalk 19:43, 2 April 2008 (UTC)
Over at Wikipedia:WikiProject Military history/Infobox conversion#Infobox Military Submarine there is a good example of what needs to be done and what I used as the basis for my conversions. Diff of one.
flotillas went to part of= in the service record, commanders is the same parameter in the service record, # of patrols goes to operations, successes goes to victories, fieldpost goes to code=
Regards. Woody (talk) 19:52, 2 April 2008 (UTC)
Can you take a good hard look at this diff and see if you like where I put everything? The process I used is described at User:Haus/6 -- it seems pretty quick and painless. You're welcome to tweak the conversion template as you see fit or I can do changes for you. Cheers. HausTalk 20:24, 2 April 2008 (UTC)
That looks perfect. I just used it and worked brilliantly. I removed a few that parameters that really aren't neccessary (planes don't fit that well on subs ;) Excellent. I will do all of them tommorrow. (Time for bed here). Thanks again. Woody (talk) 22:18, 2 April 2008 (UTC)
Infobox ship

Per this diff it was nominated for TFD. The nomination is at Wikipedia:Templates for deletion/Log/2008 April 2#Template:Infobox Ship (you commented on it). For TfD there is no big sign saying it is up at TfD, there is a single sentence above the template, it is small because it is visible on all the pages where it is translcuded. Or did you mean a different template? Woody (talk) 16:28, 3 April 2008 (UTC)

You're right, of course. {{Ship table}} was the one I'd lost track of, and it's apparently gone anyway. So nothing to be done unless we want to resuscitate it just to lop off its head again. :) Cheers. HausTalk 16:42, 3 April 2008 (UTC)

cleanup/some conversions

Hello! I noticed that you're working through articles, doing unit conversions with {{convert}}. We usually prefer to use abbreviated units in infoboxes, so could you use the |abbr=on parameter in the future, and if it's not too much trouble, apply it to conversions you've already done? TomTheHand (talk) 18:52, 3 April 2008 (UTC)

Absolutely. Thanks for the heads up! HausTalk 19:01, 3 April 2008 (UTC)
I'm pretty sure I got the last of them. Cheers. HausTalk 19:29, 3 April 2008 (UTC)
Sorry, it looks like it's still happening! TomTheHand (talk) 20:58, 3 April 2008 (UTC)
Happened again, my AWB crashed and old settings reloaded. I'm already on it. HausTalk 21:03, 3 April 2008 (UTC)
Curious if you have a regex for this task? I'm currently using a set of 8 along the lines of:
[ ]*\|[ ]*Ship length[ =]*([0-9\.,]+)( |[ ])*(ft|feet|\'|\[\[foot \(length\)\|ft\]\]|\[\[Foot \(unit of length\)\|ft\]\])( |[ ])*([0-9\.,]+)( |[ ])*(inches|inch|in|\[\[inch\|in\]\]|\")(/| |[ ])*([\(]*[ 0-9\.,]+(\ )*(meters|metres|\[\[metre\|m\]\]|\[\[meter\|m\]\]|m)[\)]*)*[ ]*
HausTalk 21:35, 3 April 2008 (UTC)
I'm actually in the process of unit testing and rewriting all of my regexes. I haven't gotten to the ft/in ones yet. When I'm done, I'm going to let a few projects know, but if you want to check out the work-in-progress it's here. A lot of them have been extensively changed over the past two days and they haven't been thoroughly tested, so if you adopt any of them and run into false positives or false negatives I'd be grateful if you could let me know. I'll add them to my unit tests and fix the regexes to take care of them.
The thing is, there were some disputes in the past over using tons of templates. I don't know where that situation stands now, but I write my regexes to use {{convert}} when no metric conversion is present but leave plaintext conversions alone. I'm not suggesting that you need to do the same, just explaining why my regexes work the way they do. My regexes make the decision to abbreviate or not based on what the original text says, so they'll convert "6 ft 6 in" into "{{convert|6|ft|6|in|abbr=on}}" but they'll convert "6 feet 6 inches" into "{{convert|6|ft|6|in}}" and "6-foot-6-inch" into "{{convert|6|ft|6|in|adj=on}}". TomTheHand (talk) 22:32, 3 April 2008 (UTC)
Roger all. So you know where I'm coming from: my thought in doing this was to do it 1) for the inherent value, and 2) as a stepping-stone towards realizing Jimp's idea about parameters along the lines of "|Ship beam/m=17.5". That really seems the right way to go to me -- you have any thoughts? Cheers. HausTalk 22:39, 3 April 2008 (UTC)
I'm very much in favor of automatic unit conversions, but the ship dimension fields are not purely numeric. I want to be able to specify that a particular length is at the waterline, and I want to be able to provide both waterline and overall lengths if I've got that information available. I'd like to be able to provide drafts at different load conditions, or at least specify the load condition that the draft is taken at. I want to provide a submarine's surfaced and submerged speeds, or give a warship's speed both at completion and after some major refit. I need to be able to put ref tags into the infobox as well. I see Jimp's proposal as being too limiting; the fields should remain text so people can write whatever they want. TomTheHand (talk) 22:47, 3 April 2008 (UTC)
Well, you sold me at "ref tags." I do have a suspicion, wrt, for example, "submarine's surfaced and submerged speeds" that we're putting bananas in the baloney bin. Which is to say that trying to fit too many types of data into one field is an antipattern. Cheers. HausTalk 23:06, 3 April 2008 (UTC)
I disagree about the bananas :-) Take USS Billfish (SS-286) as an example. For submarines from WWII and before, surfaced speed was as important as submerged, so both need to be included in the article. I think using the same speed box for surfaced and submerged speeds works well. They fit nicely, and I tend to be pretty strongly against adding new fields to hold information that's just slightly different. I wouldn't want separate fields for guns, torpedoes, missiles, depth charges, and anti-submarine mortars, or for belt, deck, turret, bulkhead, and conning tower armor; I think such similar information is best confined to a single field and thoroughly described there.
Oh, by the way, my regexes for horsepower are buggy. They don't handle commas in numbers. I'll fix that tomorrow, since I just addressed it for nautical miles and have a solution in mind. In the meantime, please avoid 'em! TomTheHand (talk) 23:16, 3 April 2008 (UTC)

(Outdent) I have a few different suggestions on your above regex:

[ ]*\|[ ]*Ship length[ =]*([0-9\.,]+)( |[ ])*(ft|feet|\'|\[\[foot \(length\)\|ft\]\]|\[\[Foot \(unit of length\)\|ft\]\])( |[ ])*([0-9\.,]+)( |[ ])*(inches|inch|in|\[\[inch\|in\]\]|\")(/| |[ ])*([\(]*[ 0-9\.,]+(\ )*(meters|metres|\[\[metre\|m\]\]|\[\[meter\|m\]\]|m)[\)]*)*[ ]*

First, [ =]* will take any number of equal signs, which is probably undesirable, so I'd change it to this:

[ ]*\|[ ]*Ship length[ ]*=[ ]*([0-9\.,]+)( |[ ])*(ft|feet|\'|\[\[foot \(length\)\|ft\]\]|\[\[Foot \(unit of length\)\|ft\]\])( |[ ])*([0-9\.,]+)( |[ ])*(inches|inch|in|\[\[inch\|in\]\]|\")(/| |[ ])*([\(]*[ 0-9\.,]+(\ )*(meters|metres|\[\[metre\|m\]\]|\[\[meter\|m\]\]|m)[\)]*)*[ ]*

Second, you could avoid using different regexes for length, beam, etc by doing something like this:

[ ]*\|[ ]*Ship [a-z]{4,7}[ ]*=[ ]*([0-9\.,]+)( |[ ])*(ft|feet|\'|\[\[foot \(length\)\|ft\]\]|\[\[Foot \(unit of length\)\|ft\]\])( |[ ])*([0-9\.,]+)( |[ ])*(inches|inch|in|\[\[inch\|in\]\]|\")(/| |[ ])*([\(]*[ 0-9\.,]+(\ )*(meters|metres|\[\[metre\|m\]\]|\[\[meter\|m\]\]|m)[\)]*)*[ ]*

That would accept "Ship (any word from 4-7 letters long)", which might cut you down from 8 regexes to 1. You could play with those character lengths if you like. Yes, this would accept nonsense fields like "Ship foobar", but if any of those exist it can't hurt to perform unit conversions on them! It'd be possible to play with the foot, inch, and meter recognition and get them shorter, but they wouldn't actually function better, so go with what works!

Above, I mentioned that my horsepower regexes are buggy because they don't recognize commas, so they'd read "1,500 hp" as "500 hp". I see that your regex actually captures commas and feeds them to the convert template, which it unfortunately won't understand. I'm dealing with the problem by using two regexes: one to strip the commas out, and another to use convert on the new, comma-less numbers. If you're interested in seeing that, please check out User:TomTheHand/Unit_tests_for_AWB_regexes/Length, specifically the nautical mile conversions. If you've got a better way to tackle the problem, please tell me, because I feel like mine's not very elegant! TomTheHand (talk) 15:52, 4 April 2008 (UTC)

Good points about the equals sign and "Ship (any word from 4-7 letters long)". I'm about 1/2 way through a 5000-article sweep and hesitant to switch horses mid-stream. At least at the moment. It's pretty likely that I'll do a 9,000-article sweep right after (which will hopefully skip most of the articles), and I think I'll use these two suggestions at that point.
I did notice a lot of ship metrics being expressed with ,.' and space. I'm attempting to catch them by hand right now. It might be interesting to try that as "baby's first bot.," i.e. to enforce WP:MOSNUM on numbers in convert templates. Does pursuing something like that interest you? Cheers. HausTalk 16:12, 4 April 2008 (UTC)
Well, yes and no. I want to finish updating my regexes and making them available in my user space, and when I'm done I plan to post to WP:SHIPS and WP:MOSNUM about them, but I'm a little wary of a bot making mass edits on this subject. Some of the MOSNUM attitude worries me. For example, the English-speaking navies of the world primarily abbreviate nautical miles as nm, but because it's the symbol for nanometers, it's unacceptable, so Convert uses the much less common nmi. Similarly, the most common abbreviation for knots is kt, which can be confused with kilotons, so Convert uses the uncommon kn. Both uncommon abbreviations seem like original research to me; I get around it by having Convert leave nautical miles and knots unabbreviated.
Overall I feel like it's a bad idea for MOSNUM to mandate styles which don't match the primary real-world use. I realize that I should be following consensus, but I don't like the idea of applying the consensus of a group of mathematicians to projects which are primarily historical in nature and use historical units and abbreviations.
I'm having a pretty good time revisiting all of my regexes, because I'm learning a lot and greatly increasing their efficiency. As a next step, I may get into writing a module for AWB. I write C# for a living, and there are things that I've had to do in a really roundabout way exclusively in regexes that would be much quicker, easier, and more efficient if I could combine regexes and some C#. TomTheHand (talk) 17:30, 4 April 2008 (UTC)
Oh, by the way, I think you've inspired me to drop my "only use Convert if no plaintext conversion exists" attitude. I'll be rewriting my regexes to use Convert no matter what. TomTheHand (talk) 17:33, 4 April 2008 (UTC)
Woops, I didn't mean MOSNUM in its entirety -- just the bit about delimiters. Though, on reflection, convert doesn't take comma delimiters as input or give them as output. If you want a beta site for your AWB work, keep me in mind. HausTalk 18:01, 4 April 2008 (UTC)
Yeah, what I was getting at when I said I need two regexes is that MOSNUM specifies comma delimiters, so they should be present in articles, but Convert doesn't accept them (it does, however, display them in its output). As a result, I have to have one regex strip the commas, then another to feed the numbers into Convert. The final product then has commas because Convert provides them. TomTheHand (talk) 21:09, 4 April 2008 (UTC)
(outdent) FYI, noticed that "|Ship hold depth" needs something like "([a-z ]{4,11})" (p.s. Got tired of rewriting 8 regexes and took your advice. :/) (pps that also gets test depth)HausTalk 21:36, 4 April 2008 (UTC)

Peculiar request

um take look at math on the ship talk page.ANOMALY-117 (talk) 16:38, 4 April 2008 (UTC)

Infobox Migrations

The Template Barnstar
For stirling work in migrating all the old ship infoboxes to the new template Socrates2008 (Talk) 12:49, 5 April 2008 (UTC)
Thanks Socrates2008, that's a pleasant surprise to wake up to. :) HausTalk 13:57, 5 April 2008 (UTC)

Whitespace above navboxes

Hey Haus, do you think you could avoid removing the whitespace above the ship template navboxes? I deliberately put a linebreak above the template because the templates are too close to the text above, and your AWB edits seem to be removing it. Gatoclass (talk) 15:18, 5 April 2008 (UTC)

Can you point me to one so I can take a close look? I'll be happy to work around 'em, but the next guy that hits the page in AWB will likely remove them too. We might be able to solve that problem by putting in a <br>... Cheers. HausTalk 15:24, 5 April 2008 (UTC)
Is USS Leland E. Thomas (DE-420) and this edit an example of what you're talking about? HausTalk 15:31, 5 April 2008 (UTC)
Hey Gatoclass, I've got to split for a while, but I wanted to suggest a possible solution: if a <br> tag was added to the top of the nav templates, that would ensure it's maintained on all pages regardless of future AWB edits. Does that sound like a reasonable approach? Cheers. HausTalk 16:22, 5 April 2008 (UTC)
Yeah, I just realized that myself. Don't worry about it then :) Gatoclass (talk) 08:09, 6 April 2008 (UTC)

Mark {{convert}} changes/additions as minor?

Haus, I appreciate all of the work you've been doing on ship template conversions. But I have a question: Could you tag {{convert}} additions and/or changes as 'minor' edits? It helps a great deal on watchlist pages to be able to 'hide' minor edits to see what 'real' changes have occurred. Thanks in advance. — Bellhalla (talk) 13:07, 6 April 2008 (UTC)

No sooner said than done. Thanks for the feedback! HausTalk 13:08, 6 April 2008 (UTC)
Cool. Thanks! — Bellhalla (talk) 14:20, 6 April 2008 (UTC)

Cardiff

Thankyou so much Ryan4314 (talk) 16:09, 6 April 2008 (UTC)

BZ, shipmate. Next step: featured article. HausTalk 16:23, 6 April 2008 (UTC)
Yea I'm not stopping now ;) Ryan4314 (talk) 16:58, 6 April 2008 (UTC)
Cheers, can't believe I only made one spelling mistake lol, that's pretty good for me. Ryan4314 (talk) 19:43, 11 April 2008 (UTC)

Merci/Thank you

Milles mercis pour ta proposition qui j'espere permettra de résoudre une part importante du conflit existant. Cependant, je crains qu'il y ait encore des voix qui s'élèveront pour la présence de ce bandeau sur les aticles du style Eurocopter Panther.

Je vais transformer mes modèles sur la base du tien car je pense que cela permettra d'avancer sur une discution qui tourne en rond depuis trop longtemp.

Encore merci --Toubabmaster (talk) 15:26, 9 April 2008 (UTC)

(Translation by Haus) "Thanks very much for your proposeal, which I hope will solve a large part of this conflict. I'm afraid some people will object to the presence of even this new template on articles like Eurocopter Panther. I'll redesign my templates based on yours, because I think it will help us move forward in a discussion which has gone in circles for too long. Thanks again."
(Sorry for the delay in response -- I read French much more quickly than I can write it. I wish you the best of luck in your work and a speedy resolution to your troubles.)
Je vous prie d'excuser mon retard à répondre. Je lis beaucoup mieux le français que je ne l'écrire. Je vous souhaite bonne chance dans votre travail et à une résolution rapide de les problèmes. HausTalk 17:36, 9 April 2008 (UTC)

DYK for USS Mount Vernon (LSD-39)

Updated DYK query On 9 April 2008, Did you know? was updated with a fact from the article USS Mount Vernon (LSD-39), which you created or substantially expanded. If you know of another interesting fact from a recently created article, then please suggest it on the Did you know? talk page.

--BencherliteTalk 19:17, 9 April 2008 (UTC)

DYK

Updated DYK query On 10 April 2008, Did you know? was updated with a fact from the article Needlegun, which you created or substantially expanded. If you know of another interesting fact from a recently created article, then please suggest it on the Did you know? talk page.

--Bobet 16:46, 10 April 2008 (UTC)

Bypassing what links here (reply)

Thanks. I found that using ':' doesn't seem to work for articles as it does for Categories and Templates, so using the fully-resolved link would be the way to go, as you suggest. --User:Ceyockey (talk to me) 02:07, 15 April 2008 (UTC)

turning Captain into a dab page

The Working Man's Barnstar
Great work converting Captain into a dab page. --Gwguffey (talk) 02:16, 15 April 2008 (UTC)