# Path: shiori/bookmark/feed_generator.py
# class LatestEntries(Feed):
#     """ Feed generator class """
#     title = 'Shiori new bookmarks'
#     link = '/shiori/'
#     description = 'Updates on changes and additions to Shiori.'
#     description_template = 'feeds/latest_title.html'
# 
#     def items(self):
#         """ Retrieve latest 5 bookmarks """
#         return Bookmark.objects.order_by('-registered_datetime')[:5]


from django.conf.urls import patterns, url
from shiori.bookmark.feed_generator import LatestEntries
# -*- coding: utf-8 -*-
""" routing of bookmark app """


urlpatterns = patterns('shiori.bookmark.views',
                       url(r'^$', 'index', name='index'),
                       url(r'^profile/$', 'profile'),
                       url(r'^add/$', 'add'),
                       url(r'^categories$', 'categories'),
                       url(r'^categories/(?P<category_id>[\w.]+)$',
                           'category'),
                       url(r'^tags$', 'tags'),
                       url(r'^tags/(?P<tag_id>[\w.]+)$', 'tag'),

# Path: shiori/bookmark/feed_generator.py
# class LatestEntries(Feed):
#     """ Feed generator class """
#     title = 'Shiori new bookmarks'
#     link = '/shiori/'
#     description = 'Updates on changes and additions to Shiori.'
#     description_template = 'feeds/latest_title.html'
# 
#     def items(self):
#         """ Retrieve latest 5 bookmarks """
#         return Bookmark.objects.order_by('-registered_datetime')[:5]


# Path: shiori/bookmark/urls.py
from django.conf.urls import patterns, url
from shiori.bookmark.feed_generator import LatestEntries

# -*- coding: utf-8 -*-
""" routing of bookmark app """


urlpatterns = patterns('shiori.bookmark.views',
                       url(r'^$', 'index', name='index'),
                       url(r'^profile/$', 'profile'),
                       url(r'^add/$', 'add'),
                       url(r'^categories$', 'categories'),
                       url(r'^categories/(?P<category_id>[\w.]+)$',
                           'category'),
                       url(r'^tags$', 'tags'),
                       url(r'^tags/(?P<tag_id>[\w.]+)$', 'tag'),

                       url(r'^feeds$', LatestEntries()),