cmogstored dev/user discussion/issues/patches/etc
 help / color / mirror / code / Atom feed
From: Eric Wong <e@80x24.org>
To: cmogstored-public@bogomips.org
Cc: Eric Wong <e@80x24.org>
Subject: [PATCH] Rakefile: remove text-only part from the Atom feed
Date: Wed, 11 Nov 2015 01:41:36 +0000	[thread overview]
Message-ID: <20151111014136.29484-1-e@80x24.org> (raw)

The pre-formatted HTML is readable as raw XML, and feed readers
tend to have no problem rendering the HTML, so there's no point
in nearly doubling our bandwidth usage on the text-only part
given we're already serving XML.

While we're at it, disable XML indentation to avoid wasting space;
it doesn't significantly hamper readability, either.
---
 Rakefile | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/Rakefile b/Rakefile
index be3564b..bb1c22a 100644
--- a/Rakefile
+++ b/Rakefile
@@ -32,7 +32,7 @@ desc 'prints news as an Atom feed'
 task :news_atom do
   require 'builder' # gem install builder
   new_tags = tags[0,10]
-  x = Builder::XmlMarkup.new(:indent => 2)
+  x = Builder::XmlMarkup.new
   x.instruct! :xml, :encoding => 'UTF-8', :version => '1.0'
   x.feed(:xmlns => "http://www.w3.org/2005/Atom") do
     x.id "#{url_base}/NEWS.atom.xml"
@@ -53,8 +53,6 @@ task :news_atom do
         url = "#{cgit_url}/tag/?id=#{tag[:tag]}"
         x.link :rel => "alternate", :type => "text/html", :href =>url
         x.id url
-        message_only = tag[:body].split(/\n.+\(\d+\):\n {6}/).first.strip
-        x.content({:type =>:text}, message_only)
         x.content(:type =>:xhtml) { x.pre tag[:body] }
       end
     end
-- 
EW


                 reply	other threads:[~2015-11-11  1:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://yhbt.net/cmogstored/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151111014136.29484-1-e@80x24.org \
    --to=e@80x24.org \
    --cc=cmogstored-public@bogomips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhbt.net/cmogstored.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).