Impressed with how easy it is to use wget at the command line.
So cron scripts are done, everything is put in MySQL just fine, now working to match our titles, with the titles from tribune. We use the stars master title ID for our titles, but tribune has their own very special ID. The tool it quick, just searches on the title itself and the year, and gives likely matches to the user. The user checks the boxes of the ones to associate with each other, saves to our property database.
Not sure exactly what to do about ones that don't match.. in theory they should be in our database. Probably just put a text field so the user can manually add the stars master title id (we call it the smid).
Team Stargate is up. It has garnered the exact reaction I expected. Curses to marketing folk, you give me a bad name :( We're so often forced to create the interface for half baked ideas, but it really gets frustrating when we bear the brunt. Especially since they are not even employee's .. we get the bad name, they have the bad ideas.. WTF!!
BFN
Wednesday, September 26, 2007
Thursday, September 13, 2007
Import delimited file into DB
At first I was a lil worried about how I was going to make this happen at the command line. I am very comfortable with the command line, but it's been a while since I've used perl or other suitable languages. I had _no idea_ how I could possibly get a delimited file from the command line (in a script run as a cron) into Oracle, so I set that aside, and opted for MySQL.
First I wrote a script in perl. Just a quickie, to make sure i'd be able to ftp down the file, and insert it into MySQL. No luck.. none of the ability to connect to MySQL. *snap*.
Route two was to try and use the LOAD DATA LOCAL INFILE commands in MySQL.. I couldn't seem to get it working at the command line.. no idea why, but I then went down another path.
Route three I found that PHP on the servers was CLI version! WOOT! Since PHP and I are most firmly aquainted, I wrote a quick script, also trying the LOAD DATA path. Some luck, but wasn't doing everything I wanted.
Final Route is just a good old read file and an explode, followed by a loop with an insert statement. Easy as pie.
Now I think I might have to use Oracle after all. Don't tell my boss ;)
BFN!
First I wrote a script in perl. Just a quickie, to make sure i'd be able to ftp down the file, and insert it into MySQL. No luck.. none of the ability to connect to MySQL. *snap*.
Route two was to try and use the LOAD DATA LOCAL INFILE commands in MySQL.. I couldn't seem to get it working at the command line.. no idea why, but I then went down another path.
Route three I found that PHP on the servers was CLI version! WOOT! Since PHP and I are most firmly aquainted, I wrote a quick script, also trying the LOAD DATA path. Some luck, but wasn't doing everything I wanted.
Final Route is just a good old read file and an explode, followed by a loop with an insert statement. Easy as pie.
Now I think I might have to use Oracle after all. Don't tell my boss ;)
BFN!
Monday, September 10, 2007
Great photos!
My friend Matt took a trip to Europe and took some great photo's!
Here is the link to the goodness: http://web.mac.com/mattmaggard/Europe_in_the_Fall/Europe.html
Aren't they great!
BFN
Here is the link to the goodness: http://web.mac.com/mattmaggard/Europe_in_the_Fall/Europe.html
Aren't they great!
BFN
Friday, September 7, 2007
Remote content
Sadly the blog fell by the "i'm busy" wayside this week.
It didn't help that I didn't do anything particularly interesting.. .. ..
Only one this was moderately interesting. On the site, we have terms of use, and a privacy policy. Other sites within the realm use the same one, but previously someone just emailed them the content, and they repurposed it for their site. This was great.. until we updated them recently, and found many of the satellite sites are now out of date.
I created a version without a header, or footer, or styles. I've put the files in an easily accessible place, and have supplied the other sites with some simple code.
I wrote some pretty functions and stuff to go around it, but the code basically was this:
$this->data = join('',file($url));
Woot!
BFN
It didn't help that I didn't do anything particularly interesting.. .. ..
Only one this was moderately interesting. On the site, we have terms of use, and a privacy policy. Other sites within the realm use the same one, but previously someone just emailed them the content, and they repurposed it for their site. This was great.. until we updated them recently, and found many of the satellite sites are now out of date.
I created a version without a header, or footer, or styles. I've put the files in an easily accessible place, and have supplied the other sites with some simple code.
I wrote some pretty functions and stuff to go around it, but the code basically was this:
$this->data = join('',file($url));
Woot!
BFN
Subscribe to:
Posts (Atom)