# Path: feedjack/views.py
# def ctx_get(ctx, k):
# def cache_etag(request, *argz, **kwz):
# def cache_last_modified(request, *argz, **kwz):
# def initview(request, response_cache=True):
# 	def get(self, request, *args, **kwz):
# def blogroll(request, btype):
# def foaf(request):
# def opml(request):
# def buildfeed(request, feedclass, **criterias):
# def _buildfeed(request, feedclass, view_data, **criterias):
# def rssfeed(request, **criterias):
# def atomfeed(request, **criterias):
# def mainview(request, **criterias):
# def _mainview(request, view_data, **criterias):
# class RedirectForSite(RedirectView):


from django.conf.urls import patterns
from feedjack import views
from types import StringTypes, NoneType
import itertools as it, operator as op, functools as ft
# -*- coding: utf-8 -*-




specs = dict(feed=('feed', r'\d+'), tag=r'[^/]+', since=r'[^/]+', asc=None)
specs_deprecated = dict(user=('feed', r'\d+'), tag=r'[^/]+')

urljoin = lambda pieces: '/'.join(it.imap(op.methodcaller('strip', '/'), pieces))

def specs_sets(tpl, specs, make_redirects=False):
	if isinstance(specs, dict): specs = specs.items()
	for spec_set in it.chain.from_iterable(
			it.permutations(specs, n) for n in xrange(len(specs), 0, -1) ):
		url = list()
		for spec, pat in spec_set:
			if not isinstance(pat, (StringTypes, NoneType)): pat_spec, pat = pat
			else: pat_spec = spec
			pat = '{0}/(?P<{1}>{2})'.format(spec, pat_spec, pat)\
				if pat is not None else '(?P<{0}>{1})'.format(pat_spec, spec)
			if make_redirects: pat = (pat, '{0}/%({1})s'.format(spec, pat_spec))
			url.append(pat)
		yield tpl.format(urljoin(url)) if not make_redirects else\
			( tpl.format(urljoin(it.imap(op.itemgetter(0), url))),
				urljoin(it.imap(op.itemgetter(1), url)) )



# Path: feedjack/views.py
# def ctx_get(ctx, k):
# def cache_etag(request, *argz, **kwz):
# def cache_last_modified(request, *argz, **kwz):
# def initview(request, response_cache=True):
# 	def get(self, request, *args, **kwz):
# def blogroll(request, btype):
# def foaf(request):
# def opml(request):
# def buildfeed(request, feedclass, **criterias):
# def _buildfeed(request, feedclass, view_data, **criterias):
# def rssfeed(request, **criterias):
# def atomfeed(request, **criterias):
# def mainview(request, **criterias):
# def _mainview(request, view_data, **criterias):
# class RedirectForSite(RedirectView):


# Path: feedjack/urls.py
from django.conf.urls import patterns
from feedjack import views
from types import StringTypes, NoneType
import itertools as it, operator as op, functools as ft

# -*- coding: utf-8 -*-




specs = dict(feed=('feed', r'\d+'), tag=r'[^/]+', since=r'[^/]+', asc=None)
specs_deprecated = dict(user=('feed', r'\d+'), tag=r'[^/]+')

urljoin = lambda pieces: '/'.join(it.imap(op.methodcaller('strip', '/'), pieces))

def specs_sets(tpl, specs, make_redirects=False):
	if isinstance(specs, dict): specs = specs.items()
	for spec_set in it.chain.from_iterable(
			it.permutations(specs, n) for n in xrange(len(specs), 0, -1) ):
		url = list()
		for spec, pat in spec_set:
			if not isinstance(pat, (StringTypes, NoneType)): pat_spec, pat = pat
			else: pat_spec = spec
			pat = '{0}/(?P<{1}>{2})'.format(spec, pat_spec, pat)\
				if pat is not None else '(?P<{0}>{1})'.format(pat_spec, spec)
			if make_redirects: pat = (pat, '{0}/%({1})s'.format(spec, pat_spec))
			url.append(pat)
		yield tpl.format(urljoin(url)) if not make_redirects else\
			( tpl.format(urljoin(it.imap(op.itemgetter(0), url))),
				urljoin(it.imap(op.itemgetter(1), url)) )



urlpatterns = list()