Jump to content

User talk:Quadell: Difference between revisions

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Content deleted Content added
various replies
No edit summary
Line 127: Line 127:


:I replied on [[User talk:NickEvans82|your talk page]]. &ndash; [[User:Quadell|Quadell]] <sup>([[User_talk:Quadell|talk]]) ([[Special:Random|random]])</sup> 12:41, 2 July 2008 (UTC)
:I replied on [[User talk:NickEvans82|your talk page]]. &ndash; [[User:Quadell|Quadell]] <sup>([[User_talk:Quadell|talk]]) ([[Special:Random|random]])</sup> 12:41, 2 July 2008 (UTC)

Dear Quadell, many thanks for replying quickly and being so helpful. All the best, Nick
[[Special:Contributions/77.75.234.15|77.75.234.15]] ([[User talk:77.75.234.15|talk]]) 10:00, 3 July 2008 (UTC)

Revision as of 10:00, 3 July 2008

Always remember: it's the most important encyclopedia ever. . . but it's still just an encyclopedia. All the best, – Quadell (talk) (random) 02:45, 27 March 2008 (UTC)[reply]

Converting bare URLs

I compliment you on your efforts to eliminate URLS as inbedded references, but be aware that bare URLs are normally given a title for listing in the references section. FWiW Bzuk (talk) 16:27, 29 June 2008 (UTC).[reply]

Thank you, and yes, you're right. I'm currently working on a bot to auto-produce titles for bare external links, much like way DumZiBoT does. (It'll also convert bare URLs to refs, the way I've been doing with AWB.) All the best, – Quadell (talk) (random) 18:37, 29 June 2008 (UTC)[reply]

Also, AWB seems to mess up external links inside references in a rather ugly way. --Tgr (talk) 17:46, 29 June 2008 (UTC)[reply]

Yeah, I know, ugh. I've put in safeguards to try to prevent that from happening, but they're not foolproof. Thanks for cleaning up after me. I plan to make my bot much more careful about that sort of thing. All the best, – Quadell (talk) (random) 18:37, 29 June 2008 (UTC)[reply]

Allow me to make a request, should you get the bot up and running: have it add both page title and domain name to the references it generates. DumZiBoT only does page titles, which doesn't tell you nearly as much about the source as page + source would. Using {{cite web}}'s formatting would probably be best (even if you don't use cite web itself):

Page title. full.sitename.com.

--Father Goose (talk) 05:01, 1 July 2008 (UTC)[reply]

So you would convert

...to something like

...? Or, with the template,

  • "CityBeat Fringe Coverage 2008: Fringe Festival Wrap". blogs.citybeat.com. Retrieved 2008-07-01.

...? Or I could get the title from the base url and use it, as

...Of course, that would look silly with the longer titles, such as

The previous certainly looks cleaner as

What do you think? – Quadell (talk) (random) 13:28, 1 July 2008 (UTC)[reply]

Either of the first two would probably be best. Using the page title from the base URL will probably get you a lot of "front page"s and other oddities. (What the heck is "Porkopolis"?) Sticking to the page title and the site it's from should give the most predictable and useful-at-a-glance results.--Father Goose (talk) 03:32, 2 July 2008 (UTC)[reply]

Can you undelete the original version please? :) I'm pretty sure Commons will nuke it since it's pd-us but not in country of origin. -Nard 20:41, 29 June 2008 (UTC)[reply]

I'm afraid I don't think it's PD in the U.S. either. If it was first published in the U.S., then it's probably PD, but I don't see any evidence of that. It was probably first published in Czechoslovakia or Austria, so PD-1964 would not apply. All the best, – Quadell (talk) (random) 21:55, 29 June 2008 (UTC)[reply]
Darn URAA. -Nard 20:36, 30 June 2008 (UTC)[reply]
I know, right? I wish they'd fix that. But I suspect any "fixes" Congress would do would only make it worse. :-( – Quadell (talk) (random) 13:14, 1 July 2008 (UTC)[reply]

regexps

Thanks for your help the other day. Im still having problems, with solving problems im running into. I understand the script now thanks to your help If you can't remember what i was trying to do, see Wikipedia_talk:AutoWikiBrowser#Find_and_replace_feature

Ive discovered that there is a different type of rating system that is somtimes used.

instead of the (mark/10) its {{rating-10|mark/}}

so for example a rating of 2 is

{{rating-10|2\}}

I've managed to work out the regular expression for it and it works fine but we run into a problem. Heres the regular expression .*\* *\[\[Mark Prindle\]\]\ {{rating-10|1\}}.*

and i repeat it for every single posible rating so for example 2/10 would be

.*\* *\[\[Mark Prindle\]\]\ {{rating-10|2\}}.*

The problem is if there is another rating on the article that uses the '10|(mark)' format. and it then reacts to that line aswell as the line i want it to.

so say there is this line before i run the script. *[[All Music Guide]] {{rating-5|2}} [http://www.allmusic.com/cg/amg.dll?p=amg&sql=10:gxkzikn6bb59 link] once i run it, it does this to it.

*[[All Music Guide]] {{rating-5|

So the script see's the |2 and because its in my regular expression it acts on the rest of the line. I just want it to ignore the line unless the text Mark Prindle is in it.

Do you understand what i mean??

If it's too much for you just let me know, but if you can help i'd really appreciate it. I think it must just be a character or 2 that i cant figure out. Thanks so much for your time

Cheers Printer222 (talk) 11:40, 30 June 2008 (UTC)[reply]

Well, first off, it's useful to know that \d means any digit, 0 through 9. So instead of saying
.*\* *\[\[Mark Prindle\]\] \(6/10\).*
...and such for each number, 1 through 9, you could just do
.*\* *\[\[Mark Prindle\]\] \(\d/10\).*
...with a \d instead of the number. That won't work for 10, though, since 10 is two digits. But you could do
.*\* *\[\[Mark Prindle\]\] \(\d+/10\).*
...since \d+ means one or more digits. That ought to save you some time.
Now, about your question, your problem is that the characters {, }, and | have special meanings in regular expressions. If you want to look for those actual characters, you have to use \{, \}, and \|. So your search term should be:
.*\* *\[\[Mark Prindle\]\]\ \{\{rating-10\|\d+\}\}.*
That should fix it for you. All the best, – Quadell (talk) (random) 12:53, 30 June 2008 (UTC)[reply]
P.S. I see that JD554 mentioned the {{rating|*|10}} format. For this, you'd want to use:
.*\* *\[\[Mark Prindle\]\]\ \{\{rating\|\d+\|10\}\}.*
Make sense? – Quadell (talk) (random) 12:56, 30 June 2008 (UTC)[reply]

Yes that all made sense, thanks. But as i was just running the bot manually to enusure that it would run smothly automaticly i've come accross yet another issue. I don't know why i took this task on. I didn't realise it was going to be this difficult and then when i discovered i had to use regular expressions i thought that i could get my head around it. I understand every thing your doing, but cant seem to solve my own problems.

You know how the script is .*\* *\[\[Mark Prindle\]\]\, because i thought that Mark Prindle was always going to be like [[Mark Prindle]] but ive realised its not and there are some cases where its simply Mark Prindle. ive tried all sorts of things using the testing function but just cant figure it out. I have a felling that you completly take out the [] and place it within {} instead. and then have a \ between Mark and prindle. But im probably completly wrong So i thought that instead of wasting my time, trying to figure it out, i'd ask you since you seem to be an expert!

I've learnt a lesson. Never assume a bot task is simple, and then never take on a task that you *think* you should be able to figure out, especially if it includes regex (it reminds me of doing complicated maths problems, trying to figure out what to do next).

Thanks so much for your help. Printer222 (talk) 14:15, 30 June 2008 (UTC)[reply]

It is exactly like a complicated math problem. :-) That's why I love regular expressions.
Okay, so basically the square brackets are optional. A questionmark ? means that the previous character is optional. So instead of
.*\* *\[\[Mark Prindle\]\]
You can use
.*\* *\[?\[?Mark Prindle\]?\]?
...which means that each square bracket is optional. Of course this will match for [[Mark Prindle or [Mark Prindle] as well, but this probably won't ever happen, so you don't have to worry about it. – Quadell (talk) (random) 17:25, 30 June 2008 (UTC)[reply]

Thank you so much for all of your help with these regular expressions. The bot has just finished its trial and i can't see how there is any way that any more issues can come up. If it wasn't for your expert knowledge i wouldnt have been able to do it. Thanks again, have a great day :). Printer222 (talk) 16:50, 1 July 2008 (UTC)[reply]

You've made my day! – Quadell (talk) (random) 12:41, 2 July 2008 (UTC)[reply]

Welcome back!

Welcome back! And with a vengeance, I see. :-) Jayjg (talk) 02:44, 2 July 2008 (UTC)[reply]

Thanks! But, eh, vengeance is the LORD's, as they say. I'll settle for just having fun. :-) – Quadell (talk) (random) 12:41, 2 July 2008 (UTC)[reply]

Image question

Dear Quadell, I am trying to contact you about the image you posted called Image:Lynching-of-lige-daniels.jpg. I am designing a book jacket and would like if possible to get a higher resolution scan. Are you able to help? Sorry – I'm not an experienced Wiki-person! NickEvans82 (talk) 11:12, 2 July 2008 (UTC)[reply]

I replied on your talk page. – Quadell (talk) (random) 12:41, 2 July 2008 (UTC)[reply]

Dear Quadell, many thanks for replying quickly and being so helpful. All the best, Nick 77.75.234.15 (talk) 10:00, 3 July 2008 (UTC)[reply]