Log in

No account? Create an account

Sun, Apr. 20th, 2008, 09:32 am
Listening to Internet radio on the Wii and regular expressions

I recently managed to get my Wii to talk to the internet and I've had a lot of fun browsing YouTube videos on it. I do have one problem though. I'd like to listen to internet radio from this site. It would be very handy when I'm doing dishes, for instance. The Wii uses Opera as its browser, but it doesn't have a plugin that will understand the protocols used. Is there a flash-based workaround for this, or can I get plugins for Opera on the Wii? The trick is I really need to use the site I linked to above because then it won't eat into our download quota.

Now I'm going to pretend to be a techrat and ask about regular expressions. You needn't read further unless you're a unix guru or morbidly curious.

In hacking at shell scripts to automate making Roophilia PicLens-compatible, I learnt a lot about the unix find command, but not enough apparently. Can anyone explain why this works:

find . -iregex ".*\.jpe?g$" -print

but this doesn't:

find . -iregex ".*\.html?$" -print

I'm guessing it has something to do with the ? butting up against the $, but why should that upset it and what's the workaround? I'm using Mac OS 10.4 and a bash shell but that shouldn't make any difference.

Also, does anyone know of a GUI front end for find? I don't mind if it's only for X11, as long as someone's ported it to Mac OS X.

EDIT: Please disregard what I said above about jpe?g working. I'm full of it. savant_da_rat correctly pointed out that neither will work on Darwin because it's based on BSD which uses basic regular expressions by default. Who said unix was complicated!

Sat, Apr. 19th, 2008 11:59 pm (UTC)

would you recomend the wii then?

Sun, Apr. 20th, 2008 12:06 am (UTC)

Erm... That all depends on what you want it for. It's great for party games, I highly recommend it for that. As a web TV solution, it's not really optimised for that, as I think my question above illustrates. A Mac Mini with a bluetooth combined keyboard/mouse would be very cool. If you're a serious gamer you obviously want a PS3 or XBox 360.

Sun, Apr. 20th, 2008 12:12 am (UTC)

got one of those already...a mac I mean! Yeah, I kinda like the 360's online capabilities over the Wii, but the cutesy graphics on the Wii attact me also as some 360 games look too complex for me..


Sun, Apr. 20th, 2008 12:04 am (UTC)

What is this "download quota" I keep hearing Aussies talk about? They actually limit the amount you can download? Is this a limit that is easy to reach? Sounds pretty lame :-(

Sun, Apr. 20th, 2008 12:11 am (UTC)

Oh no! I'm scaring Twig off moving to Australia. Must act quickly to allay his concerns or his weasel will kill me!

A lot of ISPs do, but you can get unlimited quotas, at fairly decent rates if you bundle telephony in it as well I'm told. I've been thinking we should do that ourselves. As for whether it's easy to hit, that all depends on your net usage patterns. We have 20GB/month and had no problems at all, until Broc's boyfriend moved in, who seems to use it very heavily. (This isn't intended as a cheapshot at Ice, just a statement of fact.)

You can get larger quotas than that, or unlimited if you prefer. Just talk to your weasel about it.

Edited at 2008-04-20 12:13 am (UTC)

Sun, Apr. 20th, 2008 12:17 am (UTC)

Ah, 20gb isn't bad, if i's per month. I could go through that pretty easily with bittorrent, but that's not a must :-p

Sun, Apr. 20th, 2008 02:23 am (UTC)

Thats about what my quota is by myself, i can use up 15gb pretty easily, so it works. I usually go for a 40-50gb plan when theres two geeks in a household though :) and besides, it just shapes to 64k for regular ADSL, or 256k for ADSL2+ after that point in most instances, its almost never an issue.

Sun, Apr. 20th, 2008 12:21 am (UTC)

I think the reason for these limits is because of the size of the pipe (the internet is a series of pipes) to America. Plus, maybe our ISP market isn't as competitive as yours. :/

Sun, Apr. 20th, 2008 12:53 am (UTC)

Ooooh. Whats yer friend code ^^

Sun, Apr. 20th, 2008 05:35 am (UTC)

I'll get back to you. I'll do an LJ post when I work it out.

Sun, Apr. 20th, 2008 02:23 pm (UTC)

Okies ^^ *huggles a rat*

Sun, Apr. 20th, 2008 02:10 am (UTC)

ralesk@eretnek:~/test$ touch bollocks.htm
ralesk@eretnek:~/test$ touch index.html
ralesk@eretnek:~/test$ find . -iregex ".*\.html?$" -print

Works for me on an ubuntu bash.

(Deleted comment)

Sun, Apr. 20th, 2008 04:40 am (UTC)

Moral of the story being that you should almost always be using -E. Or -P.

Sun, Apr. 20th, 2008 05:39 am (UTC)

Oh yes! You definitely get a cookie! Remind me at AC next year and I'll give you one. And I'm afraid you caught me. It turns out jpe?g doesn't work either. I was misremembering, and for that I beg pardon.

You're quite right; both work with the -E flag but not without. As always, you're a genius!
(Deleted comment)

Sun, Apr. 20th, 2008 07:06 pm (UTC)

If you want to looking at my piclens script:
My LJ post on that
my php code to do that

a couple notes if you want to use this script are in the comments.
if you want I could e-mail you them and the headers until I get the svn server working correctly.

Mon, Apr. 21st, 2008 09:54 am (UTC)

Thank you, and I'm sure your PHP code is better written and more flexible than what I've written, but I got the job done with my shell script, and I can see what I need to do to use it to keep my website up to date.