salbahra: I uploaded a bash script to obtain the woeid from Yahoo. it can be found here:
Pass in an argument with the string that you want to search for. For example:
> ./get_woeid.sh "Washington, DC"
2514815 Washington, DC
> ./get_woeid.sh "12345"
12762240 Schenectady, NY 12345
> ./get_woeid.sh "Disneyworld"
23686031 Walt Disney World Resort
> ./get_woeid.sh "Beijing"
It will return the woeid and the name of the matched location. They’re separated by a tab, so you can pipe it to cut -f 1 to get just the woeid.
I wouldn’t recommend calling this every time you want to query the weather. Rather, I would run it once to obtain the weoid and somehow save that along with the user-specified location. Yahoo limits the number of times this part of their API can be accessed.