Archive for the ‘python’ Category

Bye bye twitter

Thursday, April 17th, 2008

bye bye twitter: for x in `./twitter_backup.py -U tabo -P ‘*******************’ | cut -d’ ‘ -f 1 | sort -r`; do ./twixer -D “$x”; done;

Release: Feedjack 0.9.12 - Django powered Feed aggregator

Tuesday, April 15th, 2008

A new version of Feedjack has been released: Feedjack 0.9.12.

Changes:

  • Feedjack is now django-unicode compliant
  • Using max_length instead of maxlength in models.py to prevent warnings in syncdb
  • Patched fjlib to use the new django refactored database backends
  • Disabling autoscaping for post contents in the included templates
  • Handling of feedparser returning an empty etag
  • Fixing encoding related problems in tag urls
  • Non-integer page parameters should be handled correctly

This is a make-feedjack-work-with-django-trunk release. Apologies if you had to hack through the code to use it, and thanks to everybody that published guides on how to make everything work, like this ticket from Paul Bissex, this full guide from Alex Kuo and this patch to make unicode tags work.

Share and enjoy.

Django Book

Saturday, December 29th, 2007

We interrupt these wonderful 6 months without posting in this blog to share the joy, directly from Django’s BFDLs, my christmas present to myself:

Got my django book

The Django Book! I bought it in Amazon and it was only 3 days late to Peru, not bad for christmas season.

I can’t wait to read this book. I did read the chapter previews in the site and they were very good. I’ll write a review of the book as soon as I finish reading it.

(btw, I’m sick of wordpress, it’s a buggy piece of ^*($#, is there a decent django powered blog with an import-from-wordpress feature?).

Me in Simpsons the Movie

Friday, July 27th, 2007

Thanks to Jaime Wong:

tabo & python

The “Chicha Simpsons” by Jaime Wong, featuring Antonio Ognio, Miguel Rabi, Cesar Villegas, Homer Simpson drinking chicha morada and yours truly (with a friendly Python).

Thanks a lot Jaime! I’m already using this as my avatar in pownce and in IM.

Release: Feedjack 0.9.10 - Django powered Feed aggregator

Sunday, July 1st, 2007

A new version of Feedjack has been released: Feedjack 0.9.10.

Changes:

  • Fixing CSS tags for styles 4 and 5
  • feedjack_update now strip()s tags before storing them
  • feedjack_update shows the feed number being processed
  • We no longer cache the tags in feedjack_update, it had encoding problems
    and makes the script safe to run more than one instance at the same time

I said that 0.9.9 would be the last release in the 0.9 branch. I lied. 0.9.10 is a maintenance/bugfix release. The 0.10 branch of feedjack is on the works.

Share and enjoy.

On Python vs Ruby

Thursday, April 26th, 2007

Taken from a Python up, Ruby down discussion in programming.reddit:

Ruby takes all the elegance and simplicity of Perl, and mixes it with the library support of Lisp

- foonly

Previously…

Release: Feedjack 0.9.9 - Django powered Feed aggregator

Sunday, February 4th, 2007

A new version of Feedjack has been released: Feedjack 0.9.9.

Changes:

  • Fixed i18n related bugs in the templates
  • Fixed a bug related to the –settings option in feedjack_update.py
  • The feeds per user, tag and user/tag are working again
  • You can choose between rss2 and atom in the feeds for user, tag and
    user/tag
  • The default /feed/ url now redirects to /feed/atom/ instead of
    /feed/rss/

You are encouraged to update to this version, it has all the acumulated bug fixes known at this moment (thanks Petar).

This will also be the last version of the 0.9 branch. The 0.10 branch (currently trunk) will have several modifications in the data model, so please be careful if you update your site via subversion. Just follow the right branch or install only official releases and you will be safe.

Also, if you are running a Feedjack site, please update your links to our new site: www.feedjack.org. You can also announce your site in the Feedjack mailing list so we can add a link in the project site.

Share and enjoy.

Release: Feedjack 0.9.8 - Feed aggregator

Thursday, November 16th, 2006

A new version of Feedjack has been released: Feedjack 0.9.8

Changes:

  • Internationalization (petar)
  • Fixed and infinite loop in feedjack_update.py (do’h!) (petar)
  • Added Serbian (Latin) translation (petar)
  • Updated the feedparser calls in feedjack_update.py (petar)
  • Added Spanish translation (predius)

Thanks to Petar Marić for all his hard work! This release is 90% his work :-)

Guido van Rossum and Django Redux

Friday, August 18th, 2006

Some moths ago I wrote about the BDFL considering the use of the Django web framework.

Cronologically it went like this:

Please Teach me Web Frameworks for Python! (2006-01-27)

Literally a cry for help. He didn’t quite like the magic in Django, considering he used a pre magic-removal version.

Web Framework Redux (2006-01-30)

Perhaps WSGI represents the “blank slate” approach; Rails/Django represent the wizard approach; I’m still looking for the ideal mix-and-match solution.

Django vs. Cheetah: 1-0 (2006-01-31)

Guido is beginning to like the Django templates.

Which Part of “No XML” Don’t You Understand?

This one is related to his previous post. Guido just think that the use of XML in a template engine is WRONG. I couldn’t agree more.

Django Gaining Steam (2006-5-4)

Guido talks about Jacob’s Django talk in the Bay Area and Jeff Croft’s Django for non-programmers (a great article).

Months after that, Guido got interviewed in FLOSS weekly (2006-08-04) and he declared:

Leo La Porte (LL): Python doesn’t have a native GUI, there is TCL/tk… is that an issue?

Guido van Rossum (GvR): It seems to be coming less and less of an issue because more and more people are doing everything over the web

LL: The web is an interface, yeah

GvR: So of course that doesn’t really solves the problem because then you have, as I say, more web frameworks than keywords in the language. My personal favorite and I expect that will remain personal favorite for a long time is something named Django.

LL: I was going to ask you about Django. There was just a … just somebody published some article, interesting I think it was in the Rails website testing Django, Rails and a Perl framework and Django was by far the fastest.

GvR: Interesting! I didn’t hear about that.

Chris di Bona (CdB): How do you measure something like a web framework?

LL: Well they set a simple site and they used web testing applications to create lots of transactions and measure transactions and Django was like significally faster. So tell us about Django.

GvR: I am a very satisfied user of a very small part of Django. Django is sort of, I would call it probably a second generation web framework in Python where first generation would be things like Zope and Twisted. Django was originally started I think two guys who work for, believe it or not, a newspaper in Kansas. Not a very glorious location.

CdB: Well, it’s funny because Zope and Plone came out of the (??) newspaper.

LL: Well you know why, they have to streamline production workflows, that’s a big deal for a newspaper

GvR: Maybe that’s the case. This paper in Kansas decided that they wanted to set a local website with information for people in their town that was very responsive to the audience. They wanted to publish things very quickly but also not just add new articles to the site which everybody can do, but change the site completly, add new ideas, new features to the site, add new applications. They came up with endless number of examples, for example publish the sports, like the local sports results of the little league complete with hyperlinks to the teams and photos and all sort of interesting stuff. And they wanted to be able to roll that out very quickly and so I think they did that for maybe two years, and the two guys who did it and working with a bunch of editor who where providing the content, as they were doing that they realized that they needed a framework and they sort of grew a framework out of their first application. As they (??) what kind of things their editors were constantly asking them to them change to the site, they developed more flexibility in all those areas. And at some point they said let’s open source it and they got support from the newspaper. And then a very interesting thing hapenned. I suppose the newspaper is still using Django in some form (they are, and in fact they are selling the CMS they build). I think both of the original developers are no longer working there and they started Django the Open Source Project and what I found really great about that is I talked to those guys a couple of times and see them give presententations and I’ve seen how they work, and they really get open source. And they have a good license, but in my view even more important is the whole process, the way they work with the user community, the way they answer, they find a ballance between chaos and democracy and anarchy and sort of between Cathedral and Bazaar. They let lots of users add new features and provide ideas without losing the original thought and flexibility of the framework and I can think they are really doing a fantastic job at making Django a better product that goes way beyond what that original Kansas newspaper needed.

(now they talk about the Django vs Rails benchmark and how Django is an order of magnitude faster than Rails…)

LL: I will have to take a look at Django, because that’s pretty impressive.

GvR: Absolutely, I highly recommend it.

And yesterday (2006-08-17), at least two sources (Titus Brown and The Third Bit) are talking about what the BDFL said in SciPy 2006:

  • Django is the web framework.
  • It won’t be included in the standard library because of different development cycles, but will (should?) be as “standard” as PIL or NumPy
  • He hopes that Django and TurboGears will converge

There is a discussion about this on reddit.

What do you guys think?

Feedjack got a new home

Sunday, July 30th, 2006

Things have been moving in the Feedjack front. There are new planets using it, like Debian Perú, Planet SCM and Planet Python@TW, but also apps that use use feedjack on the background like Ian Holman’s Economy Chat and VC Chat.

Also in the news: Feedjack just went into the FreeBSD ports, and I hope to see more Django apps get in there soon.

About the new home, Feedjack is now hosted in www.feedjack.org, and there are some new services too (thanks to Google):

I’m planning to work again on Feedjack very soon, in the meantime don’t forget to report bugs and send your suggestions to the issue tracker.

Django 0.95 released

Sunday, July 30th, 2006

Finally, Django 0.95 has been released (digg it here). Some of the new features and changes are:

  • Django now uses a more consistent and natural filtering interface for retrieving objects from the database.
  • User-defined models, functions and constants now appear in the module namespace they were defined in. (Previously everything was magically transferred to the django.models.* namespace.)
  • Some optional applications, such as the FlatPage, Sites and Redirects apps, have been decoupled and moved into django.contrib. If you don’t want to use these applications, you no longer have to install their database tables.
  • Django now has support for managing database transactions.
  • We’ve added the ability to write custom authentication and authorization backends for authenticating users against alternate systems, such as LDAP.
  • We’ve made it easier to add custom table-level functions to models, through a new “Manager” API.
  • It’s now possible to use Django without a database.
  • It’s now more explicit and natural to override save() and delete() methods on models, rather than needing to hook into the pre_save() and post_save() method hooks.
  • Individual pieces of the framework now can be configured without requiring the setting of an environment variable. This permits use of, for example, the Django templating system inside other applications.
  • More and more parts of the framework have been internationalized, as we’ve expanded internationalization (i18n) support. The Django codebase, including code and templates, has now been translated, at least in part, into 31 languages. From Arabic to Chinese to Hungarian to Welsh, it is now possible to use Django’s admin site in your native language.

You can also read the full release notes.

Release: Feedjack - A Django+Python Powered Feed Aggregator

Saturday, May 27th, 2006

Update: 0.9.7 released.

Some months ago I wrote about Feedjack, a Django powered Feed agregator. Finally I have decent templates to release it.

You can read all the details or directly download it.

The basic features are (taken from the readme since I’m that lazy):

Like the Planet feed aggregator:

  • It downloads feeds and aggregate their contents in a single site
  • The new aggregated site has a feed of its own (atom and rss)
  • It uses Mark Pilgrim’s excelent FeedParser
  • The subscriber list can be exported as OPML and FOAF

But FeedJack also has some advantages:

  • It handles historical data, you can read old posts
  • It parses a lot more info, including post categories
  • It generates pages/feeds with posts of a certain category (example)
  • It generates pages/feeds with posts from a certain subscriber (example)
  • It generates pages/feeds with posts of a certain category from a certain subcriber (example)
  • A cloud tag/folksonomy (hype 2.0 compliant) for every page and every subscriber
  • It uses Django templates
  • The administration is done via web (using Django’s kickass autogenerated and magical admin site), and can handle multiple planets.
  • Extensive use of django’s internal cache engine. Most of the time you will have no database hits when serving pages.

Originally written to be used in ChichaPlanet, it is handling now a lot more planets in the same instance:

Share and enjoy.

Django has removed the magic (Great News)

Monday, May 1st, 2006

Just some minutes ago, Adrian Holovaty announced that Django’s magical removal branch has been merged to trunk. This means that now the mythical Django-without-the-magic is now the official development version.

We have been using the MR branch in Aureal for almost two months now. The last pre-magic-removal projects were migrated to MR the last week, since we could see that it was very stable. The merging of today just confirms this.

But what does Magic-Removal really mean?

It means mainly removing all the magic modules from django’s models. Also the way the ORM works is even better, and the programmer can do things that couldn’t be possible in pre-MR Django. Sadly, all these changes are backwards incompatible, but I can assure you that migrating a project is very simple, and it’s worth doing it considering the benefits you’ll get.

The Framework is a lot more Pythonic than it was before.

Remember the BDFL’s gripes about Django?

Similarly, I’m not keen on their object-relational mapping approach. There’s too much magic based on name correspondence, and the automatically generated APIs feel a bit unpythonic.

I hope he and all the people that didn’t like all the magic in Django can take another look at the framework, since it is all gone for good now.

Guido van Rossum and Python Web Frameworks

Friday, January 27th, 2006

This will be a _very_short post.

Guido van Rossum is considering the use of Django (among other python web frameworks) to develop a project in Google. He is having some minor gripes with it:

  • The templating language is not pythonic: This is IMHO a Good Thing. It enforces separation of code and presentation, and is an ideal way for designers to work directly in the templates (most designers are not programmers).
  • Too much magic: Guido should check the Removing The Magic page in the wiki about the magic-removal branch. The branch is available in subversion in http://code.djangoproject.com/svn/django/branches/magic-removal

Back to work now.

Update: Jacob Kaplan-Moss wrote an excelent piece: why django.

Ellington - The Django Powered CMS

Thursday, January 19th, 2006

Looking in django’s del.icio.us page this morning, and I found out that Lawrence Journal-World finally made a website for Ellington, the Django framework powered CMS they wrote for sites like lawrence.com, LJWorld.com and KUSports.com.

The site itself is a little short on details. There are no demos, tours or pdf overviews, but there isn’t any marketroid babble neither, which is a Good Thing.

Ellington is Django’s killer app right now. While not opensource it demonstrates what can be done with the framework: professional, scalable and production-ready web applications.

Django powered chicha planet with feedjack

Tuesday, December 13th, 2005

Update: Feedjack has been released!

Some nights ago I wrote a little Planet replacement in Django called FeedJack. There is still no source code available but I’ll release it as open source as soon as I polish it a little and write docs (if a software has no docs, it doesn’t exist).

You can see it in action in ChichaPlanet, probably one of the first “planets” after Planet Gnome and Planet Debian. It has some features in common with PlanetPlanet:

  • It downloads feeds and aggregate their contents in a single site
  • The new aggregated site has a feed of its own
  • It uses Mark Pilgrim’s excelent FeedParser

But FeedJack also has some advantages:

  • It handles historical data, you can read old posts
  • It parses a lot more info than PlanetPlanet, including post categories
  • It generates pages with posts of a certain category
  • A cloud tag/folksonomy (hype 2.0 compliant)
  • It uses Django templates

(more…)

Django, Or why I chose it over turbogears and ruby on rails

Tuesday, October 11th, 2005

NOTE: I posted an updated review about django, some of the shortcomings I point in this post are no longer there. Django gets better every day.

I have been into web development for years, and let me tell you, I never liked it too much. I’d rather be coding backends or things that just work in a server without human intervention. I find writing forms and validations in PHP (my prefered web development tool for years) tedious and boring. It is also “unnatural” (although not impossible) to have true separation of logic and presentation in PHP, it is a quirky, messy language.

Since I was already using Python for virtually everything but web development, I decided to give it a try.

The world of web development in python was like a jungle, there was Zope and lots of different little tools with a small user base and little documentation. I decided to give Zope2 a try but it is extremely complex and overdesigned, it felt like Java. Avoid Zope and Java for small/medium web development, it is like cracking a nut with a sledgehammer.

(more…)

More and more changes

Monday, September 27th, 2004

I am in my new job now, the Lima Chamber of Commerce and it is great. I am working with my good friend Jorge, and my new boss is very open to try new solutions and Free Software. For instance, he is quite impressed by the power of regular expressions and how they can save time.

My first tasks here were the development of a PHP site and fixing the EXTREMELY messy code of the existing apps. Also modifying some (ew!) COBOL apps to generate some reports. COBOL is EVIL. And lucky me, I’m in charge of a big cobol2python project here. Nobody likes cobol it seems :-)

On the business side, aurealsys is going well, we are in the process of getting our labs running :-)

And finally, ULIX, the LUG I formed with breno in our University is going very well. We have lots of very active members, a lab with 6 sparcs and a cluster running in there (debian powered of course).

And also, happy birthday my friend. Some day we will have another 2-day-long hack-a-thon, but NOT YET :-)

PS: the blog motto changed, this time it is not job-related, this one is to stay :-)

PCWorld and SuperDebian

Wednesday, September 1st, 2004

I had an interview today for PCWorld Peru. They are preparing a special about developers in free software platforms and I was interviewed for my work in Americatel Peru. It was a very nice interview, but my secret identity was discovered, SuperDebian:

tabo in PCWorld - SuperDebian

Thanks Christian for the interview, and thanks Victor for allowing this to happen :-)

(and yes, I need a haircut)