Skip to content

Commit

Permalink
Added twitpic provider
Browse files Browse the repository at this point in the history
  • Loading branch information
Shamail Tayyab committed Nov 1, 2012
1 parent 726ed02 commit da274e3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/fallenthrone/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from jinja2 import TemplateNotFound
import middlewares
import mongoengine
import os
import os, sys

ENV = os.environ.get ("MODE", "DEVELOPMENT")
print "Loading %s..." % (ENV)
Expand Down
6 changes: 6 additions & 0 deletions src/fallenthrone/lib/providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ class ImageServiceProvider (object):
def __init__ (self):
pass

def twitpic (self, url, parsed):
return {
"image": "http://twitpic.com/show/full%s" % (parsed.path),
"thumbnail": "http://twitpic.com/show/mini%s" % (parsed.path),
}

def instagram (self, url, parsed):
return self.instagr (url, parsed)

Expand Down
3 changes: 3 additions & 0 deletions src/fallenthrone/templates/album.jade
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@ extends master
block maincontents
div.user
p #{handle}
- for img in images
a(href=img['image'])
img(src=img['thumbnail'])

0 comments on commit da274e3

Please sign in to comment.