background preloader

Feed

Facebook Twitter

Agreggator (web2py planet) A Web2py planet (aggregator) using feedparser and rss2 Based on the web2py interactive examples.

Agreggator (web2py planet)

In model db.py add a feed table containing feeds URLs: db.define_table("feed", Field("name"), Field("author"), Field("email", requires=IS_EMAIL()), Field("url", requires=IS_URL(), comment="RSS/Atom feed"), Field("link", requires=IS_URL(), comment="Blog href"), Field("general", "boolean", comment="Many categories (needs filters)"), ) In controller default.py, add a planet function to render a basic page (fetching feeds with feedparser): Remeber to create some feed (using the database appadmin), and then call planet function! Working examples can be found at: Writing a blog system on App Engine - Nick's Blog. Posted by Nick Johnson | Filed under tech, app-engine, coding, bloggart I'm going to spend the next few posts working through the process of writing a simple, robust and scalable blogging system for App Engine.

Writing a blog system on App Engine - Nick's Blog

This first post is going to be fairly dull, unfortunately, as it will serve to cover what our requirements and non-requirements are, and the general approach we're going to take to achieve those objectives. In other words: Lots of bullet points, and little to no code. Don't worry, it'll get more exciting soon. First, let's outline what we (or at least, I) expect out of a blogging system: Simple authoring. Not all of this is going to make it in, initially, since we're trying to keep things simple. Of course, we need to explicitly state our non-requirements, too: Comments. In order to meet these requirements, and in line with the App Engine strategy of "optimize for reads, not writes", we're going to take a "static serving" approach. We'll start with step 1 on Monday. Cool video from pycon. Consuming RSS feeds with PubSubHubbub - Nick's Blog. Posted by Nick Johnson | Filed under app-engine, python, xmpp, coding, pubsubhubbub, tech Frequently, it's necessary or useful to consume an Atom or RSS feed provided by another application.

Consuming RSS feeds with PubSubHubbub - Nick's Blog

Doing so, though, is rarely as simple as it seems: To do so robustly, you have to worry about polling frequency, downtime, badly formed feeds, multiple formats, timeouts, determining which items are new and other such issues, all of which distract from your original, seemingly simple goal of retrieving new updates from an Atom feed. You're not alone, either: Everyone ends up dealing with the same set of issues, and solving them in more or less the same manner. Wouldn't it be nice if there was a way to let someone else take care of all this hassle? As you've no doubt guessed, I'm about to tell you that there is. At this point, you may be wondering how this is useful if the feed you're consuming doesn't support PubSubHubbub.

First, sign up to superfeedr. Sending subscription requests Processing updates. Examples. Share Email Earn Facebook Twitter Google+ Lockerz Grab Delicious Digg Google Bookmarks MySpace StumbleUpon Reddit By Lockerz Home About Download Docs & Resources Support Contributors InfoWorld's 2012 Technology of the Year Award Winner web2py TM Examples simple | session | template | layout | form | database | cache | ajax | testing | streaming | xmlrpc | dal | crud | auth Simple Examples {*style:<i>Here are some working and complete examples that explain the basic syntax of the framework.

You can click on the web2py keywords (in the highlighted code!) Example 1 def hello1 (): return "Hello World" If the controller function returns a string, that is the body of the rendered page. Try it here: hello1 Example 2 def hello2 (): return T ( "Hello World" ) The function T() marks strings that need to be translated. Documentation [Universal Feed Parser] Write GAE rss Feed. 18 Aug, 2010 This tutorial shows how to make RSS feeds in Python for Google App Engine.

Write GAE rss Feed

This is actually really simple because I am using pre made library PyRSS2Gen. Manual RSS Feeds(basic stuff to work):Get the rss library and put PyRSS2Gen.py file in your project folder. I am using lib folder for all of my external libraries. Basic stuff to work: This is my file structure: //controllers/rss.py/libs/__init__.py/libs/PyRSS2Gen.py/app.yaml The init file in libs folder is necessary, otherwise the library won't work. This is my app.yaml file: application: project-nameversion: 1runtime: pythonapi_version: 1handlers:- url: /rss.xml script: controllers/rss.py- url: /static static_dir: static As you can see we will get our RSS code by going to This is the RSS code generator, rss.py: Source code viewer The simplest way to make this happen.

That's how you make RSS code in Google App Engine.