Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

New html5 theme added #45

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Empty file modified README.textile
100644 → 100755
Empty file.
Empty file modified __init__.py
100644 → 100755
Empty file.
Empty file modified admin.py
100644 → 100755
Empty file.
16 changes: 15 additions & 1 deletion app.yaml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
application: bloggart-demo
application: john-turner
version: live
runtime: python
api_version: 1

#default_expiration: "365d"

derived_file_type:
- python_precompiled

inbound_services:
- warmup

skip_files: |
^(.*/)?(
(app\.yaml)|
Expand All @@ -12,6 +20,7 @@ skip_files: |
(#.*#)|
(.*~)|
(.*\.py[co])|
(\.DS_Store)
)$


Expand All @@ -27,10 +36,15 @@ handlers:
- url: /admin/.*
script: admin.py
login: admin

- url: /favicon.ico
static_files: themes/thinker/favicon.ico
upload: themes/thinker/favicon.ico

- url: /static/([^/]+)/(.*)
static_files: themes/\1/static/\2
upload: themes/[^/]+/static/.*

- url: /.*
script: static.py

Empty file modified app_blog.yaml
100644 → 100755
Empty file.
40 changes: 21 additions & 19 deletions config.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,36 +1,37 @@
# Name of the blog
blog_name = 'My Blog'
blog_name = 'John D. Turner'

# Your name (used for copyright info)
author_name = 'the author'
author_name = 'John Turner'

profile = 'http://www.facebook.com/johndturner'

# (Optional) slogan
slogan = 'This is my blog'
slogan = 'Web Developer. Forward Thinker.'

# The hostname this site will primarially serve off (used for Atom feeds)
host = 'localhost:8080'
host = 'www.johndturner.com'

# Selects the theme to use. Theme names correspond to directories under
# the 'themes' directory, containing templates and static content.
theme = 'default'
theme = 'thinker'

# Defines the URL organization to use for blog postings. Valid substitutions:
# slug - the identifier for the post, derived from the title
# year - the year the post was published in
# month - the month the post was published in
# day - the day the post was published in
post_path_format = '/%(year)d/%(month)02d/%(slug)s'
post_path_format = '/%(slug)s'

# A nested list of sidebar menus, for convenience. If this isn't versatile
# enough, you can edit themes/default/base.html instead.
sidebars = [
('Blogroll', [
'<a href="http://blog.notdot.net/">Nick Johnsonz</a>',
'<a href="http://www.billkatz.com/">Bill Katz</a>',
'<a href="http://www.codinghorror.com/blog/">Coding Horror</a>',
'<a href="http://craphound.com/">Craphound</a>',
'<a href="http://www.neopythonic.blogspot.com/">Neopythonic</a>',
'<a href="http://www.schneier.com/blog/">Schneier on Security</a>',
('Navigation', [
'<a href="/">Home</a>',
'<a href="http://www.facebook.com/johndturner">About Me</a>',
'<a href="/contact-me">Contact Me</a>',
'<a href="/stuff-i-use">Stuff I Use</a>',
'<a href="http://www.seedprod.com">My Company</a>',
]),
]

Expand All @@ -42,13 +43,13 @@

# To use disqus for comments, set this to the 'short name' of the disqus forum
# created for the purpose.
disqus_forum = None
disqus_forum = 'johndturner'

# Length (in words) of summaries, by default
summary_length = 200

# If you want to use Google Analytics, enter your 'web property id' here
analytics_id = None
analytics_id = 'UA-499993-7'

# If you want to use PubSubHubbub, supply the hub URL to use here.
hubbub_hub_url = 'http://pubsubhubbub.appspot.com/'
Expand All @@ -62,7 +63,7 @@
# an html file' method, then set the NAME of the file below.
# Note that you do not need to download the file provided - just enter its name
# here.
google_site_verification = None
google_site_verification = '8z-l9pmEKxAABF_w-0FeQRqDG8FiWiHCtepLIeWYERA'

# Default markup language for entry bodies (defaults to html).
default_markup = 'html'
Expand All @@ -79,10 +80,10 @@

# Defines where the user is defined in the rel="me" of your pages.
# This allows you to expand on your social graph.
rel_me = None
rel_me = 'http://www.google.com/profiles/johnnytee'

# For use a feed proxy like feedburne.google.com
feed_proxy = None
feed_proxy = 'http://feeds.feedburner.com/johndturner'

# To use Google Friends Connect.
# If you want use Google Friends Connect, go to http://www.google.com/friendconnect/
Expand All @@ -93,4 +94,5 @@

# To format the date of your post.
# http://docs.djangoproject.com/en/1.1/ref/templates/builtins/#now
date_format = "d F, Y"
date_format = "F d, Y"
iso_format = "Y-m-d\TH:i:s"
Empty file modified deferred.py
100644 → 100755
Empty file.
Empty file modified fix_path.py
100644 → 100755
Empty file.
24 changes: 15 additions & 9 deletions generators.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,10 @@ def generate_resource(cls, post, resource, action='post'):
template_vals['prev']=prev
if next is not None:
template_vals['next']=next
template_vals['post_id'] = post.key().id()
template_vals['canonical_url'] = 'http://' + config.host + post.path
rendered = utils.render_template("post.html", template_vals)
rendered = str(utils.oembed_replace(rendered,'post'))
static.set(post.path, rendered, config.html_mime_type)
generator_list.append(PostContentGenerator)

Expand All @@ -136,7 +139,10 @@ def generate_resource(cls, post, resource):
template_vals['prev']=prev
if next is not None:
template_vals['next']=next
template_vals['post_id'] = post.key().id()
template_vals['canonical_url'] = 'http://' + config.host + post.path
rendered = utils.render_template("post.html", template_vals)
rendered = str(utils.oembed_replace(rendered,'post'))
static.set(post.path, rendered, config.html_mime_type)
generator_list.append(PostPrevNextContentGenerator)

Expand Down Expand Up @@ -174,8 +180,10 @@ def generate_resource(cls, post, resource, pagenum=1, start_ts=None):
path_args = {
'resource': resource,
}
_get_path = lambda: \
cls.first_page_path if path_args['pagenum'] == 1 else cls.path
path_args['pagenum'] = pagenum - 1
prev_page = cls.path % path_args
prev_page = _get_path() % path_args
path_args['pagenum'] = pagenum + 1
next_page = cls.path % path_args
template_vals = {
Expand All @@ -184,14 +192,11 @@ def generate_resource(cls, post, resource, pagenum=1, start_ts=None):
'prev_page': prev_page if pagenum > 1 else None,
'next_page': next_page if more_posts else None,
}
rendered = utils.render_template("listing.html", template_vals)

path_args['pagenum'] = pagenum
static.set(cls.path % path_args, rendered, config.html_mime_type)
if pagenum == 1:
static.set(cls.first_page_path % path_args, rendered,
config.html_mime_type)

template_vals['canonical_url'] = 'http://' + config.host + _get_path() % path_args
rendered = utils.render_template("listing.html", template_vals)
rendered = str(utils.oembed_replace(rendered,'list'))
static.set(_get_path() % path_args, rendered, config.html_mime_type)
if more_posts:
deferred.defer(cls.generate_resource, None, resource, pagenum + 1,
posts[-2].published)
Expand Down Expand Up @@ -239,7 +244,7 @@ def get_etag(cls, post):
@classmethod
def generate_resource(cls, post, resource):
import models
q = models.BlogPost.all().order('-updated')
q = models.BlogPost.all().order('-published')
# Fetch the 10 most recently updated non-draft posts
posts = list(itertools.islice((x for x in q if x.path), 10))
now = datetime.datetime.now().replace(second=0, microsecond=0)
Expand All @@ -248,6 +253,7 @@ def generate_resource(cls, post, resource):
'updated': now,
}
rendered = utils.render_template("atom.xml", template_vals)
rendered = str(utils.oembed_replace(rendered,'atom'))
static.set('/feeds/atom.xml', rendered,
'application/atom+xml; charset=utf-8', indexed=False,
last_modified=now)
Expand Down
11 changes: 7 additions & 4 deletions handlers.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import datetime
import logging
import os

from google.appengine.ext import deferred
Expand Down Expand Up @@ -57,8 +56,9 @@ def render_to_response(self, template_name, template_vals=None, theme=None):

class AdminHandler(BaseHandler):
def get(self):
from generators import generator_list
offset = int(self.request.get('start', 0))
count = int(self.request.get('count', 20))
count = int(self.request.get('count', 100))
posts = models.BlogPost.all().order('-published').fetch(count, offset)
template_vals = {
'is_admin': True,
Expand All @@ -68,6 +68,7 @@ def get(self):
'prev_offset': max(0, offset - count),
'next_offset': offset + count,
'posts': posts,
'generators': [cls.__name__ for cls in generator_list],
}
self.render_to_response("index.html", template_vals)

Expand Down Expand Up @@ -129,7 +130,9 @@ def get(self, post):

class RegenerateHandler(BaseHandler):
def post(self):
generators = self.request.get_all("generators")

regen = post_deploy.PostRegenerator()
deferred.defer(regen.regenerate)
deferred.defer(post_deploy.post_deploy, post_deploy.BLOGGART_VERSION)
deferred.defer(regen.regenerate, classes=generators)
deferred.defer(post_deploy.try_post_deploy, force=True)
self.render_to_response("regenerating.html")
Empty file modified index.yaml
100644 → 100755
Empty file.
Empty file modified lib/docutils/__init__.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/_compat.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/_string_template_compat.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/core.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/docutils.conf
100644 → 100755
Empty file.
Empty file modified lib/docutils/examples.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/frontend.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/io.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/languages/__init__.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/languages/af.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/languages/ca.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/languages/cs.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/languages/de.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/languages/en.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/languages/eo.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/languages/es.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/languages/fi.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/languages/fr.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/languages/gl.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/languages/he.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/languages/it.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/languages/ja.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/languages/nl.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/languages/pl.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/languages/pt_br.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/languages/ru.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/languages/sk.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/languages/sv.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/languages/zh_cn.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/languages/zh_tw.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/nodes.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/__init__.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/null.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/__init__.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/directives/__init__.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/directives/admonitions.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/directives/body.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/directives/html.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/directives/images.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/directives/misc.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/directives/parts.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/directives/references.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/directives/tables.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/include/README.txt
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/include/isoamsa.txt
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/include/isoamsb.txt
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/include/isoamsc.txt
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/include/isoamsn.txt
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/include/isoamso.txt
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/include/isoamsr.txt
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/include/isobox.txt
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/include/isocyr1.txt
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/include/isocyr2.txt
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/include/isodia.txt
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/include/isogrk1.txt
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/include/isogrk2.txt
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/include/isogrk3.txt
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/include/isogrk4-wide.txt
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/include/isogrk4.txt
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/include/isolat1.txt
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/include/isolat2.txt
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/include/isomfrk-wide.txt
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/include/isomfrk.txt
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/include/isomopf-wide.txt
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/include/isomopf.txt
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/include/isomscr-wide.txt
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/include/isomscr.txt
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/include/isonum.txt
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/include/isopub.txt
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/include/isotech.txt
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/include/mmlalias.txt
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/include/mmlextra-wide.txt
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/include/mmlextra.txt
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/include/s5defs.txt
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/include/xhtml1-lat1.txt
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/include/xhtml1-special.txt
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/include/xhtml1-symbol.txt
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/languages/__init__.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/languages/af.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/languages/ca.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/languages/cs.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/languages/de.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/languages/en.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/languages/eo.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/languages/es.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/languages/fi.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/languages/fr.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/languages/gl.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/languages/he.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/languages/it.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/languages/ja.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/languages/nl.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/languages/pl.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/languages/pt_br.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/languages/ru.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/languages/sk.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/languages/sv.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/languages/zh_cn.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/languages/zh_tw.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/roles.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/states.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/parsers/rst/tableparser.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/readers/__init__.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/readers/doctree.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/readers/pep.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/readers/python/__init__.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/readers/python/moduleparser.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/readers/python/pynodes.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/readers/standalone.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/statemachine.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/transforms/__init__.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/transforms/components.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/transforms/frontmatter.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/transforms/misc.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/transforms/parts.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/transforms/peps.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/transforms/references.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/transforms/universal.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/transforms/writer_aux.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/urischemes.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/utils.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/writers/__init__.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/writers/docutils_xml.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/writers/html4css1/__init__.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/writers/html4css1/html4css1.css
100644 → 100755
Empty file.
Empty file modified lib/docutils/writers/html4css1/template.txt
100644 → 100755
Empty file.
Empty file modified lib/docutils/writers/latex2e/__init__.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/writers/latex2e/default.tex
100644 → 100755
Empty file.
Empty file modified lib/docutils/writers/latex2e/docutils-05-compat.sty
100644 → 100755
Empty file.
Empty file modified lib/docutils/writers/latex2e/titlepage.tex
100644 → 100755
Empty file.
Empty file modified lib/docutils/writers/manpage.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/writers/newlatex2e/__init__.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/writers/newlatex2e/base.tex
100644 → 100755
Empty file.
Empty file modified lib/docutils/writers/newlatex2e/notes.txt
100644 → 100755
Empty file.
Empty file modified lib/docutils/writers/newlatex2e/tests.txt
100644 → 100755
Empty file.
Empty file modified lib/docutils/writers/newlatex2e/unicode_map.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/writers/null.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/writers/odf_odt/__init__.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/writers/odf_odt/pygmentsformatter.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/writers/odf_odt/styles.odt
100644 → 100755
Empty file.
Empty file modified lib/docutils/writers/pep_html/__init__.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/writers/pep_html/pep.css
100644 → 100755
Empty file.
Empty file modified lib/docutils/writers/pep_html/template.txt
100644 → 100755
Empty file.
Empty file modified lib/docutils/writers/pseudoxml.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/writers/s5_html/__init__.py
100644 → 100755
Empty file.
Empty file modified lib/docutils/writers/s5_html/themes/README.txt
100644 → 100755
Empty file.
Empty file modified lib/docutils/writers/s5_html/themes/big-black/__base__
100644 → 100755
Empty file.
Empty file modified lib/docutils/writers/s5_html/themes/big-black/framing.css
100644 → 100755
Empty file.
Empty file modified lib/docutils/writers/s5_html/themes/big-black/pretty.css
100644 → 100755
Empty file.
Empty file modified lib/docutils/writers/s5_html/themes/big-white/framing.css
100644 → 100755
Empty file.
Empty file modified lib/docutils/writers/s5_html/themes/big-white/pretty.css
100644 → 100755
Empty file.
Empty file modified lib/docutils/writers/s5_html/themes/default/blank.gif
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified lib/docutils/writers/s5_html/themes/default/framing.css
100644 → 100755
Empty file.
Empty file modified lib/docutils/writers/s5_html/themes/default/iepngfix.htc
100644 → 100755
Empty file.
Empty file modified lib/docutils/writers/s5_html/themes/default/opera.css
100644 → 100755
Empty file.
Empty file modified lib/docutils/writers/s5_html/themes/default/outline.css
100644 → 100755
Empty file.
Empty file modified lib/docutils/writers/s5_html/themes/default/pretty.css
100644 → 100755
Empty file.
Empty file modified lib/docutils/writers/s5_html/themes/default/print.css
100644 → 100755
Empty file.
Empty file modified lib/docutils/writers/s5_html/themes/default/s5-core.css
100644 → 100755
Empty file.
Empty file modified lib/docutils/writers/s5_html/themes/default/slides.css
100644 → 100755
Empty file.
Empty file modified lib/docutils/writers/s5_html/themes/default/slides.js
100644 → 100755
Empty file.
Empty file modified lib/docutils/writers/s5_html/themes/medium-black/__base__
100644 → 100755
Empty file.
Empty file modified lib/docutils/writers/s5_html/themes/medium-black/pretty.css
100644 → 100755
Empty file.
Empty file modified lib/docutils/writers/s5_html/themes/medium-white/framing.css
100644 → 100755
Empty file.
Empty file modified lib/docutils/writers/s5_html/themes/medium-white/pretty.css
100644 → 100755
Empty file.
Empty file modified lib/docutils/writers/s5_html/themes/small-black/__base__
100644 → 100755
Empty file.
Empty file modified lib/docutils/writers/s5_html/themes/small-black/pretty.css
100644 → 100755
Empty file.
Empty file modified lib/docutils/writers/s5_html/themes/small-white/framing.css
100644 → 100755
Empty file.
Empty file modified lib/docutils/writers/s5_html/themes/small-white/pretty.css
100644 → 100755
Empty file.
48 changes: 48 additions & 0 deletions lib/embedly.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import re
import urllib
import urllib2

# JSON decoder
try:
import json
except ImportError:
try:
from django.utils import simplejson as json
except ImportError:
raise ImportError("Need a json decoder")

# Embed.ly Multi Provider API Endpoint
OEMBED_API_ENDPOINT = 'http://api.embed.ly/v1/api/oembed'

#generate from http://api.embed.ly/tools/generator. Do not use .*
embedly_re = re.compile("(.*youtube\.com/watch.*|.*\.youtube\.com/v/.*|youtu\.be/.*|.*\.youtube\.com/user/.*#.*|.*\.youtube\.com/.*#.*/.*|.*justin\.tv/.*|.*justin\.tv/.*/b/.*|www\.ustream\.tv/recorded/.*|www\.ustream\.tv/channel/.*|qik\.com/video/.*|qik\.com/.*|.*revision3\.com/.*|.*\.dailymotion\.com/video/.*|.*\.dailymotion\.com/.*/video/.*|www\.collegehumor\.com/video:.*|.*twitvid\.com/.*|www\.break\.com/.*/.*|vids\.myspace\.com/index\.cfm\?fuseaction=vids\.individual&videoid.*|www\.myspace\.com/index\.cfm\?fuseaction=.*&videoid.*|www\.metacafe\.com/watch/.*|blip\.tv/file/.*|.*\.blip\.tv/file/.*|video\.google\.com/videoplay\?.*|.*revver\.com/video/.*|video\.yahoo\.com/watch/.*/.*|video\.yahoo\.com/network/.*|.*viddler\.com/explore/.*/videos/.*|liveleak\.com/view\?.*|www\.liveleak\.com/view\?.*|animoto\.com/play/.*|dotsub\.com/view/.*|www\.overstream\.net/view\.php\?oid=.*|www\.livestream\.com/.*|www\.worldstarhiphop\.com/videos/video.*\.php\?v=.*|worldstarhiphop\.com/videos/video.*\.php\?v=.*|teachertube\.com/viewVideo\.php.*|teachertube\.com/viewVideo\.php.*|bambuser\.com/v/.*|bambuser\.com/channel/.*|bambuser\.com/channel/.*/broadcast/.*|.*yfrog\..*/.*|tweetphoto\.com/.*|www\.flickr\.com/photos/.*|.*twitpic\.com/.*|.*imgur\.com/.*|.*\.posterous\.com/.*|post\.ly/.*|twitgoo\.com/.*|i.*\.photobucket\.com/albums/.*|gi.*\.photobucket\.com/groups/.*|phodroid\.com/.*/.*/.*|www\.mobypicture\.com/user/.*/view/.*|moby\.to/.*|xkcd\.com/.*|www\.xkcd\.com/.*|www\.asofterworld\.com/index\.php\?id=.*|www\.qwantz\.com/index\.php\?comic=.*|23hq\.com/.*/photo/.*|www\.23hq\.com/.*/photo/.*|.*dribbble\.com/shots/.*|drbl\.in/.*|.*\.smugmug\.com/.*|.*\.smugmug\.com/.*#.*|emberapp\.com/.*/images/.*|emberapp\.com/.*/images/.*/sizes/.*|emberapp\.com/.*/collections/.*/.*|emberapp\.com/.*/categories/.*/.*/.*|embr\.it/.*|picasaweb\.google\.com.*/.*/.*#.*|picasaweb\.google\.com.*/lh/photo/.*|picasaweb\.google\.com.*/.*/.*|dailybooth\.com/.*/.*|brizzly\.com/pic/.*|pics\.brizzly\.com/.*\.jpg|img\.ly/.*|www\.facebook\.com/photo\.php.*|www\.tinypic\.com/view\.php.*|tinypic\.com/view\.php.*|www\.tinypic\.com/player\.php.*|tinypic\.com/player\.php.*|www\.tinypic\.com/r/.*/.*|tinypic\.com/r/.*/.*|.*\.tinypic\.com/.*\.jpg|.*\.tinypic\.com/.*\.png|meadd\.com/.*/.*|meadd\.com/.*|.*\.deviantart\.com/art/.*|.*\.deviantart\.com/gallery/.*|.*\.deviantart\.com/#/.*|fav\.me/.*|.*\.deviantart\.com|.*\.deviantart\.com/gallery|.*\.deviantart\.com/.*/.*\.jpg|.*\.deviantart\.com/.*/.*\.gif|.*\.deviantart\.net/.*/.*\.jpg|.*\.deviantart\.net/.*/.*\.gif|www\.whitehouse\.gov/photos-and-video/video/.*|www\.whitehouse\.gov/video/.*|wh\.gov/photos-and-video/video/.*|wh\.gov/video/.*|www\.hulu\.com/watch.*|www\.hulu\.com/w/.*|hulu\.com/watch.*|hulu\.com/w/.*|movieclips\.com/watch/.*/.*/|movieclips\.com/watch/.*/.*/.*/.*|.*crackle\.com/c/.*|www\.fancast\.com/.*/videos|www\.funnyordie\.com/videos/.*|www\.vimeo\.com/groups/.*/videos/.*|www\.vimeo\.com/.*|vimeo\.com/groups/.*/videos/.*|vimeo\.com/.*|www\.ted\.com/talks/.*\.html.*|www\.ted\.com/talks/lang/.*/.*\.html.*|www\.ted\.com/index\.php/talks/.*\.html.*|www\.ted\.com/index\.php/talks/lang/.*/.*\.html.*|.*omnisio\.com/.*|.*nfb\.ca/film/.*|www\.thedailyshow\.com/watch/.*|www\.thedailyshow\.com/full-episodes/.*|www\.thedailyshow\.com/collection/.*/.*/.*|movies\.yahoo\.com/movie/.*/video/.*|movies\.yahoo\.com/movie/.*/info|movies\.yahoo\.com/movie/.*/trailer|www\.colbertnation\.com/the-colbert-report-collections/.*|www\.colbertnation\.com/full-episodes/.*|www\.colbertnation\.com/the-colbert-report-videos/.*|www\.comedycentral\.com/videos/index\.jhtml\?.*|www\.theonion\.com/video/.*|theonion\.com/video/.*|wordpress\.tv/.*/.*/.*/.*/|www\.traileraddict\.com/trailer/.*|www\.traileraddict\.com/clip/.*|www\.traileraddict\.com/poster/.*|www\.escapistmagazine\.com/videos/.*|www\.trailerspy\.com/trailer/.*/.*|www\.trailerspy\.com/trailer/.*|www\.trailerspy\.com/view_video\.php.*|www\.atom\.com/.*/.*/|fora\.tv/.*/.*/.*/.*|www\.spike\.com/video/.*|www\.gametrailers\.com/video/.*|gametrailers\.com/video/.*|www\.koldcast\.tv/video/.*|www\.koldcast\.tv/#video:.*|www\.godtube\.com/featured/video/.*|www\.tangle\.com/view_video.*|soundcloud\.com/.*|soundcloud\.com/.*/.*|soundcloud\.com/.*/sets/.*|soundcloud\.com/groups/.*|www\\.last\\.fm/music/.*|www\\.last\\.fm/music/+videos/.*|www\\.last\\.fm/music/+images/.*|www\\.last\\.fm/music/.*/_/.*|www\\.last\\.fm/music/.*/.*|www\.mixcloud\.com/.*/.*/|espn\.go\.com/video/clip.*|espn\.go\.com/.*/story.*|cnbc\.com/id/.*|cbsnews\.com/video/watch/.*|www\.cnn\.com/video/.*|edition\.cnn\.com/video/.*|money\.cnn\.com/video/.*|today\.msnbc\.msn\.com/id/.*/vp/.*|www\.msnbc\.msn\.com/id/.*/vp/.*|www\.msnbc\.msn\.com/id/.*/ns/.*|today\.msnbc\.msn\.com/id/.*/ns/.*|multimedia\.foxsports\.com/m/video/.*/.*|msn\.foxsports\.com/video.*|.*amazon\..*/gp/product/.*|.*amazon\..*/.*/dp/.*|.*amazon\..*/dp/.*|.*amazon\..*/o/ASIN/.*|.*amazon\..*/gp/offer-listing/.*|.*amazon\..*/.*/ASIN/.*|.*amazon\..*/gp/product/images/.*|www\.amzn\.com/.*|amzn\.com/.*|www\.shopstyle\.com/browse.*|www\.shopstyle\.com/action/apiVisitRetailer.*|www\.shopstyle\.com/action/viewLook.*|gist\.github\.com/.*|twitter\.com/.*/status/.*|twitter\.com/.*/statuses/.*|www\.slideshare\.net/.*/.*|.*\.scribd\.com/doc/.*|screenr\.com/.*|polldaddy\.com/community/poll/.*|polldaddy\.com/poll/.*|answers\.polldaddy\.com/poll/.*|www\.5min\.com/Video/.*|www\.howcast\.com/videos/.*|www\.screencast\.com/.*/media/.*|screencast\.com/.*/media/.*|www\.screencast\.com/t/.*|screencast\.com/t/.*|issuu\.com/.*/docs/.*|www\.kickstarter\.com/projects/.*/.*|www\.scrapblog\.com/viewer/viewer\.aspx.*|my\.opera\.com/.*/albums/show\.dml\?id=.*|my\.opera\.com/.*/albums/showpic\.dml\?album=.*&picture=.*|tumblr\.com/.*|.*\.tumblr\.com/post/.*|www\.polleverywhere\.com/polls/.*|www\.polleverywhere\.com/multiple_choice_polls/.*|www\.polleverywhere\.com/free_text_polls/.*|.*\.status\.net/notice/.*|identi\.ca/notice/.*|shitmydadsays\.com/notice/.*)", re.I)

def get_multi(urls, **kwargs):
"""
Get Multiple oEmbed responses
"""

oembed_urls = []
for url in urls:
if embedly_re.search(url):
oembed_urls.append(urllib.quote('http://'+url))

query = urllib.urlencode(kwargs)

if query:
query += '&urls=%s' % ','.join(oembed_urls)
else:
query = 'urls=%s' % ','.join(oembed_urls)

# api endpoint url
fetch_url = "%s?%s" %(OEMBED_API_ENDPOINT,query)

try:
r = urllib2.urlopen(fetch_url).read()
objs = json.loads(r)
except urllib2.HTTPError, e:
return []
except urllib2.URLError:
return []

return objs
Empty file modified lib/markdown.py
100644 → 100755
Empty file.
Empty file modified lib/markdown_processor.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/__init__.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/cmdline.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/console.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/filter.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/filters/__init__.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/formatter.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/formatters/__init__.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/formatters/bbcode.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/formatters/html.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/formatters/img.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/formatters/latex.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/formatters/other.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/formatters/rtf.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/formatters/svg.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/formatters/terminal.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/formatters/terminal256.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/lexer.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/lexers/__init__.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/lexers/_clbuiltins.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/lexers/_luabuiltins.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/lexers/_mapping.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/lexers/_phpbuiltins.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/lexers/_vimbuiltins.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/lexers/agile.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/lexers/asm.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/lexers/compiled.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/lexers/dotnet.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/lexers/functional.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/lexers/math.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/lexers/other.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/lexers/parsers.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/lexers/special.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/lexers/templates.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/lexers/text.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/lexers/web.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/plugin.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/scanner.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/style.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/styles/__init__.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/styles/autumn.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/styles/borland.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/styles/bw.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/styles/colorful.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/styles/default.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/styles/emacs.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/styles/friendly.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/styles/fruity.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/styles/manni.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/styles/murphy.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/styles/native.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/styles/pastie.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/styles/perldoc.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/styles/tango.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/styles/trac.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/styles/vim.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/styles/vs.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/token.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/unistring.py
100644 → 100755
Empty file.
Empty file modified lib/pygments/util.py
100644 → 100755
Empty file.
Empty file modified lib/roman.py
100644 → 100755
Empty file.
Empty file modified lib/rst_directive.py
100644 → 100755
Empty file.
Empty file modified lib/textile.py
100644 → 100755
Empty file.
Empty file modified markup.py
100644 → 100755
Empty file.
Empty file modified migrate.py
100644 → 100755
Empty file.
Empty file modified models.py
100644 → 100755
Empty file.
Loading