about summary refs log tree commit homepage
path: root/lib/PublicInbox
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2014-05-04 01:38:16 +0000
committerEric Wong <e@80x24.org>2014-05-04 02:52:30 +0000
commitec1d0105e6f758ced83902b92b25df0c4b75613d (patch)
treec24a45495e743a6890feaa91db5893838e03fa7a /lib/PublicInbox
parenta1331e538ed8fff6e9554de553a2869954f54167 (diff)
downloadpublic-inbox-ec1d0105e6f758ced83902b92b25df0c4b75613d.tar.gz
Screen space is precious, and we do not need it in the abbreviated
view.
Diffstat (limited to 'lib/PublicInbox')
-rw-r--r--lib/PublicInbox/Feed.pm4
-rw-r--r--lib/PublicInbox/MDA.pm2
-rw-r--r--lib/PublicInbox/View.pm4
3 files changed, 7 insertions, 3 deletions
diff --git a/lib/PublicInbox/Feed.pm b/lib/PublicInbox/Feed.pm
index 12ac8a95..6996f374 100644
--- a/lib/PublicInbox/Feed.pm
+++ b/lib/PublicInbox/Feed.pm
@@ -9,8 +9,8 @@ use Date::Parse qw(strptime str2time);
 use PublicInbox::Hval;
 use PublicInbox::GitCatFile;
 use constant {
-        DATEFMT => '%Y-%m-%dT%H:%M:%SZ',
-        MAX_PER_PAGE => 25,
+        DATEFMT => '%Y-%m-%dT%H:%M:%SZ', # atom standard
+        MAX_PER_PAGE => 25, # this needs to be tunable
 };
 
 # main function
diff --git a/lib/PublicInbox/MDA.pm b/lib/PublicInbox/MDA.pm
index ee4d0afe..e2b2f914 100644
--- a/lib/PublicInbox/MDA.pm
+++ b/lib/PublicInbox/MDA.pm
@@ -6,7 +6,7 @@ use warnings;
 use Email::Address;
 use Encode qw/decode/;
 use Date::Parse qw(strptime);
-use constant MAX_SIZE => 1024 * 500; # same as spamc default
+use constant MAX_SIZE => 1024 * 500; # same as spamc default, should be tunable
 use constant cmd => qw/ssoma-mda -1/;
 
 # drop plus addressing for matching
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index 52e8f0b2..674d7b7c 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -8,8 +8,11 @@ use URI::Escape qw/uri_escape_utf8/;
 use Encode qw/find_encoding/;
 use Encode::MIME::Header;
 use Email::MIME::ContentType qw/parse_content_type/;
+
+# TODO: make these constants tunable
 use constant MAX_INLINE_QUOTED => 5;
 use constant MAX_TRUNC_LEN => 72;
+
 *ascii_html = *PublicInbox::Hval::ascii_html;
 
 my $enc_utf8 = find_encoding('UTF-8');
@@ -92,6 +95,7 @@ sub add_text_body_short {
         my ($enc, $part, $part_nr, $full_pfx) = @_;
         my $n = 0;
         my $s = ascii_html($enc->decode($part->body));
+        # TODO: fold the "so-and-so wrote:" attribute line here, too:
         $s =~ s!^((?:(?:&gt;[^\n]*)\n)+)!
                 my $cur = $1;
                 my @lines = split(/\n/, $cur);