Recent Topics

1 May 27, 2005 21:20    

i need to learn python really quick.. so i decided to do something fun while i was learning it..

the idea is this:

using one of those free numbers where like k2.com that emails you any voicemails you get on their system, take those audiofiles and insert them as a blog entry(the url to the audio file), so you can have an audio blog. sounds fun, and you could do it from anywhere.

i have everything written and working EXCEPT the part that actually inserts the entry into the the blog.

initially, i tried just inserting a record into the evo_posts table, but when i do that, the new entries don't show up. i am guessing that b2e is probably building the pages when it posts.

next.. i tried sending an email as per the doco, but i am getting this error:
Pinging Blo.gs...

MySQL error!

You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1(Errno=1064)

Your query:
SELECT * FROM evo_blogs WHERE blog_ID =

next.. i thought i might have to use i python rendtion of the blogger api.. but, i thought i would ask you cats first..

any ideas why methods 1 or 2 won't work?

thanks!

2 May 31, 2005 18:11

1 doesn't work because you're not linking to a category.

It goes like this, barring any special settings, when you display a blog:
Select a blog (select * from evo_blogs where blog_ID = $blog)
Grab the categories associated with that blog (inner join evo_categories on cat_blog_ID = blog_ID)
Grab the posts associated with those categories (inner join evo_postcats on postcat_cat_ID = cat_id inner join evo_posts on post_ID = postcat_post_ID)

You're creating an entry in the evo_posts table, but NOT in the evo_postcats table, so there's no categories associated with the post.

3 May 31, 2005 22:06

thanks so much!

i tried that, and it worked great..

thanks again!

4 Sep 21, 2005 21:41

So where's the code?

5 Sep 26, 2005 22:11

i ended up going back and just using post via email...

you can see an example of this in action at:

www.confessomatic.com

i got one of those free k7.net voicemail numbers, and wrote a python script to scan it for a new entry, and send that via email to the blog..

it works really well..

if you call that number and leave a confession, it goes up in a few mintues...

6 Sep 26, 2005 22:41

sergio_101 wrote:

[...]wrote a python script to scan it for a new entry, and send that via email to the blog..

Care to post your script? (Or send via PM?)

7 Sep 26, 2005 22:51

yeah, i can do that..

let me clean it up a bit first.. so it doesn't have all the passwords for everything in there..

be warned..

this was my very first python script.. i had to learn python in a week, so i wrote this script to learn it..

so, it looks horrible..

but it works!


Form is loading...