Created
October 5, 2010 14:35
-
-
Save JayCuthrell/611658 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# grab a copy | |
[bradybunch]$ git clone git://github.com/petewarden/geodict.git | |
Initialized empty Git repository in /Users/marsha/Marsha/marsha/geodict/.git/ | |
remote: Counting objects: 21, done. | |
remote: Compressing objects: 100% (20/20), done. | |
remote: Total 21 (delta 4), reused 0 (delta 0) | |
Receiving objects: 100% (21/21), 31.21 MiB | 1.28 MiB/s, done. | |
Resolving deltas: 100% (4/4), done. | |
# set up our RHEL/CentOS environment | |
[bradybunch]$ sudo yum install MySQL-python python-json | |
# edit for your MySQL database settings | |
[bradybunch]$ vi geodict/geodict_config.py | |
# create your MySQL database | |
[bradybunch]$ sudo mysqladmin create geodict -p | |
# fill up your MySQL database | |
[bradybunch]$ cd geodict | |
[bradybunch]$ ./populate_database.py | |
# wait for the donuts to be done... | |
[bradybunch]$ mysql geodict -p -e "show tables" | |
Enter password: | |
+-------------------+ | |
| Tables_in_geodict | | |
+-------------------+ | |
| cities | | |
| countries | | |
| regions | | |
+-------------------+ | |
# Now, let's test this in our own environment | |
[bradybunch]$ curl -s -L "http://www.readwriteweb.com/about/" | ./geodict.py | |
Oregon, USA | |
Oregon, USA | |
Georgia | |
Tempe, Arizona | |
Arizona | |
Berkeley, California | |
UK | |
Missoula, MT | |
Hilton Head Island, SC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment