<commit_before>from django.contrib.syndication.views import Feed
from django.utils.feedgenerator import Atom1Feed, Rss201rev2Feed
from wiblog.formatting import mdToHTML, summarize
from wiblog.models import Post, Tag


# RSS Feed Class
class PostFeedRSS(Feed):
	feed_type = Rss201rev2Feed
	title = "<NAME> - Fragmented Development"
	link = "blog/feeds/rss"
	description = '''
<NAME> thoughts about web development, technology, Free software and
other miscellaneous topics.
'''

	
	# Get the posts present in this feed
	def items(self):
		# Filter out un-published posts. Should specify tag here as well?
		posts = Post.objects.filter(status='PUB').order_by('date')

		# Format posts for the feed
		for post in posts:
			post.body = mdToHTML(post.body)

		return posts


	def item_title(self, item):
		# Use the post title for the feed item title
		return item.title


	def item_description(self, item):
		# Use the post body for the feed item "description"
		return item.body


# Atom Feed Class
class PostFeedAtom(PostFeedRSS):
	feed_type = Atom1Feed
	link = "blog/feeds/atom"
	subtitle = PostFeedRSS.description<commit_msg>Feed Corrections: Sort Order, Remove Unneeded Include<commit_after>from django.contrib.syndication.views import Feed
from django.utils.feedgenerator import Atom1Feed, Rss201rev2Feed
from wiblog.formatting import mdToHTML
from wiblog.models import Post, Tag


# RSS Feed Class
class PostFeedRSS(Feed):
	feed_type = Rss201rev2Feed
	title = "<NAME> - Fragmented Development"
	link = "blog/feeds/rss"
	description = '''
<NAME> thoughts about web development, technology, Free software and
other miscellaneous topics.
'''

	
	# Get the posts present in this feed
	def items(self):
		# Filter out un-published posts. Should specify tag here as well?
		posts = Post.objects.filter(status='PUB').order_by('-date')

		# Format posts for the feed
		for post in posts:
			post.body = mdToHTML(post.body)

		return posts


	def item_title(self, item):
		# Use the post title for the feed item title
		return item.title


	def item_description(self, item):
		# Use the post body for the feed item "description"
		return item.body


# Atom Feed Class
class PostFeedAtom(PostFeedRSS):
	feed_type = Atom1Feed
	link = "blog/feeds/atom"
	subtitle = PostFeedRSS.description
{'fraction_non_alphanumeric': 0.08428446005267778, 'fraction_numerical': 0.00877963125548727, 'mean_word_length': 4.491566265060241, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5063300', 'n_tokens_mistral': 764, 'n_tokens_neox': 697, 'n_words': 240}