Re: micro blogging from nokia tablets
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, 8 Jan 2008 19:53:13 -0800 Jayesh Salvi [EMAIL PROTECTED] wrote: Hey Daniel, I looked at the maemo-wordpy source code. It is pretty big for me to go through and patch. Comparatively the blogger.com specific code is extremely tiny. In fact I will paste in this email the source code that will get it working. It is so small, because the GData library is packaged separately. I have created the .deb installable for it and you can find it herehttp://www.altcanvas.com/packages/gdata-python_1.0.10.1.deb [CODE] The above example will just post on blog. If you want to do other things like list all posts, comments, etc., then you can take a look at this filehttp://gdata-python-client.googlecode.com/svn/trunk/samples/blogger/BloggerExample.py Hope that helps. Let me know if you need any other help. Jayesh Thank you very much. It's working :) Now I need some magic way of uploading images to blogger since it seems the API doesn't support it. And it's a must. Regards. - -- Daniel Martin Yerga http://yerga.net -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFHhPRacnvB1T3xmfMRAgBqAJ9JToCVuAeppJwrQv92vAez2r4/zwCfc8no lfaYDKdrir6MCoy+4s/S3Cc= =OSrx -END PGP SIGNATURE- ___ maemo-users mailing list maemo-users@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-users
Re: micro blogging from nokia tablets
2008/1/9, Jayesh Salvi [EMAIL PROTECTED]: As far as Maemo-blogger is concerned (the one I have originally posted on my blog), it can run on any nokia tablet that has python2.5 . I myself have only n770. I am not sure about maemo-wordpy. I'm running maemo-wordpy on a 770, without any problem. But AFAIK maemo-blogger doesn't work with New Blogger Accounts... I've tried and didn't work... ___ maemo-users mailing list maemo-users@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-users
Re: micro blogging from nokia tablets
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Mon, 7 Jan 2008 22:26:26 -0800 Jayesh Salvi [EMAIL PROTECTED] wrote: Thanks. maemo-wordpy looks like a great software. Maybe I should make a patch for it to add blogger.com backend. Thanks. I had thought to add support for other blogging systems, among them blogger.com, in future versions. But if you can do a patch for blogger it will be welcome, of course. In the SVN is the most updated version it still has some bugs. It has only few comments, so if you have some question you don't hesitate to do it. The SVN version needs flickrapi, for some flickr options, but commenting these lines it can work without flickrapi (except the flickr part). Also in chinook it needs python-gtkhtml that it's in the garage (https://garage.maemo.org/projects/python-gtkhtml2/) or in the extras-devel repository. Best Regards. - -- Daniel Martin Yerga http://yerga.net -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFHg59PcnvB1T3xmfMRAlwNAJ4hXzjLhPiOgEnJ0z2dfuKCjNgR/QCfQPfs DJ1Jr0mZamtocCJnjRDZ1yo= =6n8l -END PGP SIGNATURE- ___ maemo-users mailing list maemo-users@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-users
Re: micro blogging from nokia tablets
2008/1/8, Jayesh Salvi [EMAIL PROTECTED]: Thanks. maemo-wordpy looks like a great software. Maybe I should make a patch for it to add blogger.com backend. That sounds great, but what about 770's users?...Will this also be available for us? There's no Blogger client for 770. Maemo-blog only works with old version of Blogger... So that I had to open a new account in WordPress... BTW: Muchas gracias, Daniel, for your nice code ;) ___ maemo-users mailing list maemo-users@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-users
Re: micro blogging from nokia tablets
On 1/8/08, Daniel Martin Yerga [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Mon, 7 Jan 2008 22:26:26 -0800 Jayesh Salvi [EMAIL PROTECTED] wrote: Thanks. maemo-wordpy looks like a great software. Maybe I should make a patch for it to add blogger.com backend. Thanks. I had thought to add support for other blogging systems, among them blogger.com, in future versions. But if you can do a patch for blogger it will be welcome, of course. In the SVN is the most updated version it still has some bugs. It has only few comments, so if you have some question you don't hesitate to do it. Hey Daniel, I looked at the maemo-wordpy source code. It is pretty big for me to go through and patch. Comparatively the blogger.com specific code is extremely tiny. In fact I will paste in this email the source code that will get it working. It is so small, because the GData library is packaged separately. I have created the .deb installable for it and you can find it herehttp://www.altcanvas.com/packages/gdata-python_1.0.10.1.deb Assuming that above library is installed all you need is following class definition: try: from xml.etree import ElementTree # for Python 2.5 users except: from elementtree import ElementTree from gdata import service import gdata import atom class Blogger: def __init__(self, email, password): Creates a GDataService and provides ClientLogin auth details to it. The email and password are required arguments for ClientLogin. The 'source' defined below is an arbitrary string, but should be used to reference your name or the name of your organization, the app name and version, with '-' between each of the three values. # Authenticate using ClientLogin. self.service = service.GDataService(email, password) self.service.source = 'Blogger_Python_Sample-1.0' self.service.service = 'blogger' self.service.server = 'www.blogger.com' self.service.ProgrammaticLogin() # Get the blog ID for the first blog. feed = self.service.Get('/feeds/default/blogs') self_link = feed.entry[0].GetSelfLink() if self_link: self.blog_id = self_link.href.split('/')[-1] def CreatePost(self, title, content, author_name, is_draft): This method creates a new post on a blog. The new post can be stored as a draft or published based on the value of the is_draft parameter. The method creates an GDataEntry for the new post using the title, content, author_name and is_draft parameters. With is_draft, True saves the post as a draft, while False publishes the post. Then it uses the given GDataService to insert the new post. If the insertion is successful, the added post (GDataEntry) will be returned. # Create the entry to insert. entry = gdata.GDataEntry() entry.author.append(atom.Author(atom.Name(text=author_name))) entry.title = atom.Title(title_type='xhtml', text=title) entry.content = atom.Content(content_type='html', text=content) if is_draft: control = atom.Control() control.draft = atom.Draft(text='yes') entry.control = control # Ask the service to insert the new entry. return self.service.Post(entry, '/feeds/' + self.blog_id + '/posts/default') if __name__ == '__main__': blogger = Blogger(username,password) content = 'Here goes the blog's content' title = 'Title' post = blogger.CreatePost(title,content,username,is_draft=False) if post: print post.title.text = The above example will just post on blog. If you want to do other things like list all posts, comments, etc., then you can take a look at this filehttp://gdata-python-client.googlecode.com/svn/trunk/samples/blogger/BloggerExample.py Hope that helps. Let me know if you need any other help. Jayesh The SVN version needs flickrapi, for some flickr options, but commenting these lines it can work without flickrapi (except the flickr part). Also in chinook it needs python-gtkhtml that it's in the garage (https://garage.maemo.org/projects/python-gtkhtml2/) or in the extras-devel repository. Best Regards. - -- Daniel Martin Yerga http://yerga.net -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFHg59PcnvB1T3xmfMRAlwNAJ4hXzjLhPiOgEnJ0z2dfuKCjNgR/QCfQPfs DJ1Jr0mZamtocCJnjRDZ1yo= =6n8l -END PGP SIGNATURE- -- --- Jayesh ___ maemo-users mailing list maemo-users@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-users
Re: micro blogging from nokia tablets
On 1/8/08, sebastian maemo [EMAIL PROTECTED] wrote: 2008/1/8, Jayesh Salvi [EMAIL PROTECTED]: Thanks. maemo-wordpy looks like a great software. Maybe I should make a patch for it to add blogger.com backend. That sounds great, but what about 770's users?...Will this also be available for us? There's no Blogger client for 770. Maemo-blog only works with old version of Blogger... So that I had to open a new account in WordPress... BTW: Muchas gracias, Daniel, for your nice code ;) As far as Maemo-blogger is concerned (the one I have originally posted on my blog), it can run on any nokia tablet that has python2.5. I myself have only n770. I am not sure about maemo-wordpy. -- --- Jayesh ___ maemo-users mailing list maemo-users@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-users
Re: micro blogging from nokia tablets
*I've used very easily and fast: maemo-wordpy which connects to Wordpress Blogs* 2008/1/7, Jayesh Salvi [EMAIL PROTECTED]: Hi, I am not sure if there is already a blogging client that runs on maemo. But today I managed to build one from some existings apps and libraries. If you are interested, take a look. http://jyro.blogspot.com/2008/01/blog-from-nokia-tablets.html ... any feedback is appreciated. Thanks, -- --- Jayesh ___ maemo-users mailing list maemo-users@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-users ___ maemo-users mailing list maemo-users@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-users
Re: micro blogging from nokia tablets
Thanks. maemo-wordpy looks like a great software. Maybe I should make a patch for it to add blogger.com backend. On 1/7/08, sebastian maemo [EMAIL PROTECTED] wrote: *I've used very easily and fast: maemo-wordpy which connects to Wordpress Blogs* 2008/1/7, Jayesh Salvi [EMAIL PROTECTED]: Hi, I am not sure if there is already a blogging client that runs on maemo. But today I managed to build one from some existings apps and libraries. If you are interested, take a look. http://jyro.blogspot.com/2008/01/blog-from-nokia-tablets.html ... any feedback is appreciated. Thanks, -- --- Jayesh ___ maemo-users mailing list maemo-users@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-users -- --- Jayesh ___ maemo-users mailing list maemo-users@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-users