예제 #1
0
 def blog_mod_all_entries(self, blog, all_entries):
     # Entries can now live in subdirs of entries_dir (each
     # subdir defines a category)
     return all_entries + [
         blog.entry_class(blog, os.path.join(subdir, name))
         for subdir in subdirs(blog.entries_dir)
         for name in blog.filter_entries(os.path.join(blog.entries_dir, subdir))
     ]
예제 #2
0
 def blog_mod_all_entries(self, blog, all_entries):
     # Entries can now live in subdirs of entries_dir (each
     # subdir defines a category)
     return all_entries + [
         blog.entry_class(blog, os.path.join(subdir, name))
         for subdir in subdirs(blog.entries_dir)
         for name in blog.filter_entries(
             os.path.join(blog.entries_dir, subdir))
     ]
예제 #3
0
    def blog_mod_sources(self, blog, sources):

        blog.category_names = set(subdirs(blog.entries_dir))

        blog.all_categories = [
            BlogCategory(blog, catname) for catname in blog.category_names
        ]

        blog.metadata.update(
            category_links=self.get_links(blog.all_categories))

        sources.extend((category, "html") for category in blog.all_categories)

        return sources
예제 #4
0
 def blog_mod_sources(self, blog, sources):
     
     blog.category_names = set(subdirs(blog.entries_dir))
     
     blog.all_categories = [
         BlogCategory(blog, catname)
         for catname in blog.category_names
     ]
     
     blog.metadata.update(
         category_links=self.get_links(blog.all_categories)
     )
     
     sources.extend(
         (category, "html")
         for category in blog.all_categories
     )
     
     return sources