Re: [PROPOSAL] lazy consensus for new News scrolling

2013-01-08 Thread Kay Schenk



On 01/07/2013 05:07 PM, Dave Fisher wrote:


On Jan 7, 2013, at 12:39 PM, Rob Weir wrote:


On Fri, Jan 4, 2013 at 1:12 PM, Kay Schenk kay.sch...@gmail.com wrote:

On Thu, Jan 3, 2013 at 4:09 PM, Rob Weir robw...@apache.org wrote:



snip


Since this is the visitors first impression of the project, I wonder
if it is worth exploring further to see if there is a way to address
these issues?   As I mentioned before, the ASF home page has a latest
activity panel that avoids both of these problems:

http://www.apache.org/

Can we copy what they do?



Yes. See below where I show where to find the rest of the code that Rob has 
tracked down.

We can handle it like a feed with ASF::Value type patterns in path.pm

Or we can use xslt and parse a file file in view.pm

Or a combination.




ummm...not sure about this. We would need to do more thorough investigation
here. Right now, I can not easily determine how this column is generated --
manually vs something else.



I did a little research on how the ASF home page works.

You cans see the source here:
http://svn.apache.org/repos/asf/infrastructure/site/trunk/

index.html is here:
http://svn.apache.org/repos/asf/infrastructure/site/trunk/content/index.html

and Latest Activity looks like this:

h3Latest Activity/h3
  div class=section-content
pemThis is an overview of activity going on with our
projects. SVN commits, bug reports, tweets, you name it/em./p
  /div

 {% for e in twitter.list %}
 div class=section-content
 a href={{ e.url }}@/a{{ e.title|safe }}
 /div
 {% endfor %}

{% for e in svn.list %}
div class=section-content
a class=svn
href=http://svn.apache.org/viewvc?revision={{ e.revision
}};view=revisionr{{ e.revision }}/a
  {{ e.message|safe|truncatewords_html:20 }} ({{
  e.projects|safe }}) mdash;
  a
href=http://people.apache.org/committer-index.html#{{ e.author }}{{
e.author }}/a
/div
{% endfor %}

 {% for e in jira.list %}
 div class=section-content
 a class=bug href={{ e.url }}{{
e.title|safe }}/abr/
 {{ e.content|safe|truncatewords_html:20 }}
 /div
 {% endfor %}

/div



So they are iterating over twitter.list, svn.list and jira.list.  But
it is not leaping out at me where that data comes from.  Presumably it
is RSS/Atom feeds, but I don't see the glue that connects this.


Take a look at www.apache.org's trunk/lib/path.pm:

our @patterns = (

 [qr!^/index\.html$!, news_page =
   {
 svn  = ASF::Value::SVN-new(limit = 5),
 jira = ASF::Value::Jira-new(limit = 5,
   url = http://s.apache.org/q4;),
 announce = ASF::Value::Mail-new(list = 'annou...@apache.org',
   limit = 3),
 planet   = ASF::Value::Blogs-new(blog = planet, limit= 3),
 blog = ASF::Value::Blogs-new(blog = foundation, limit= 3),
 twitter  = ASF::Value::Twitter-new(name = 'TheASF', limit = 3),
   },
 ],

 [qr!^/dev/index\.html$!, news_page =
   {
 svn  = ASF::Value::SVN-new(limit = 5),
 twitter  = ASF::Value::Twitter-new(name=infrabot, limit = 3),
 blog = ASF::Value::Blogs-new(blog = infra, limit= 3),
 jira = ASF::Value::Jira-new(limit = 5,
   url = http://s.apache.org/lg;),
   },
 ],

 [qr!^/dev/sitemap\.html$!, sitemap = { headers = { title = Developer 
Sitemap }} ],

 [qr!^/licenses/exports/index\.html$!, exports = {} ],

 [qr!\.mdtext$!, single_narrative = { template = single_narrative.html 
}],
);

And also view.pm, doap2perl.xsl and list2urls.xsl

sub news_page {
 my %args = @_;
 my $count=0;
 for (fetch_doap_url_list()) {
 my $result = parse_doap($_);
 next unless defined $result;
 push @{$args{projects}}, $result;
 last if ++$count == 3;
 }

 return ASF::View::news_page(%args);
}

sub parse_doap {
 my $url = shift;
 my $doap = get $url or die Can't get $url: $!\n;
 my ($fh, $filename) = tempfile(XX);
 print $fh $doap;
 close $fh;
 my $result = eval `xsltproc lib/doap2perl.xsl $filename`;
 unlink $filename;
 return undef if $result-{pmc} =~ m!^http://attic\.apache\.org!;
 return $result;
}

sub fetch_doap_url_list {
 my $xml = get 
http://svn.apache.org/repos/asf/infrastructure/site-tools/trunk/projects/files.xml;
 or die Can't get doap file list: $!\n;
 my ($fh, $filename) = tempfile(XX);
 print $fh $xml;
 close $fh;
 chomp(my 

Re: [PROPOSAL] lazy consensus for new News scrolling

2013-01-08 Thread Kay Schenk



On 01/08/2013 02:55 PM, Rob Weir wrote:

On Tue, Jan 8, 2013 at 4:59 PM, Kay Schenk kay.sch...@gmail.com wrote:



On 01/07/2013 05:07 PM, Dave Fisher wrote:



On Jan 7, 2013, at 12:39 PM, Rob Weir wrote:


On Fri, Jan 4, 2013 at 1:12 PM, Kay Schenk kay.sch...@gmail.com wrote:


On Thu, Jan 3, 2013 at 4:09 PM, Rob Weir robw...@apache.org wrote:



snip


Since this is the visitors first impression of the project, I wonder
if it is worth exploring further to see if there is a way to address
these issues?   As I mentioned before, the ASF home page has a latest
activity panel that avoids both of these problems:

http://www.apache.org/

Can we copy what they do?



Yes. See below where I show where to find the rest of the code that Rob
has tracked down.

We can handle it like a feed with ASF::Value type patterns in path.pm

Or we can use xslt and parse a file file in view.pm

Or a combination.




ummm...not sure about this. We would need to do more thorough
investigation
here. Right now, I can not easily determine how this column is generated
--
manually vs something else.



I did a little research on how the ASF home page works.

You cans see the source here:
http://svn.apache.org/repos/asf/infrastructure/site/trunk/

index.html is here:

http://svn.apache.org/repos/asf/infrastructure/site/trunk/content/index.html

and Latest Activity looks like this:

h3Latest Activity/h3
   div class=section-content
 pemThis is an overview of activity going on with our
projects. SVN commits, bug reports, tweets, you name it/em./p
   /div

  {% for e in twitter.list %}
  div class=section-content
  a href={{ e.url }}@/a{{ e.title|safe }}
  /div
  {% endfor %}

 {% for e in svn.list %}
 div class=section-content
 a class=svn
href=http://svn.apache.org/viewvc?revision={{ e.revision
}};view=revisionr{{ e.revision }}/a
   {{ e.message|safe|truncatewords_html:20 }} ({{
   e.projects|safe }}) mdash;
   a
href=http://people.apache.org/committer-index.html#{{ e.author }}{{
e.author }}/a
 /div
 {% endfor %}

  {% for e in jira.list %}
  div class=section-content
  a class=bug href={{ e.url }}{{
e.title|safe }}/abr/
  {{ e.content|safe|truncatewords_html:20 }}
  /div
  {% endfor %}

 /div



So they are iterating over twitter.list, svn.list and jira.list.  But
it is not leaping out at me where that data comes from.  Presumably it
is RSS/Atom feeds, but I don't see the glue that connects this.



Take a look at www.apache.org's trunk/lib/path.pm:

our @patterns = (

  [qr!^/index\.html$!, news_page =
{
  svn  = ASF::Value::SVN-new(limit = 5),
  jira = ASF::Value::Jira-new(limit = 5,
url =
http://s.apache.org/q4;),
  announce = ASF::Value::Mail-new(list = 'annou...@apache.org',
limit = 3),
  planet   = ASF::Value::Blogs-new(blog = planet, limit= 3),
  blog = ASF::Value::Blogs-new(blog = foundation, limit=
3),
  twitter  = ASF::Value::Twitter-new(name = 'TheASF', limit =
3),
},
  ],

  [qr!^/dev/index\.html$!, news_page =
{
  svn  = ASF::Value::SVN-new(limit = 5),
  twitter  = ASF::Value::Twitter-new(name=infrabot, limit =
3),
  blog = ASF::Value::Blogs-new(blog = infra, limit= 3),
  jira = ASF::Value::Jira-new(limit = 5,
url =
http://s.apache.org/lg;),
},
  ],

  [qr!^/dev/sitemap\.html$!, sitemap = { headers = { title =
Developer Sitemap }} ],

  [qr!^/licenses/exports/index\.html$!, exports = {} ],

  [qr!\.mdtext$!, single_narrative = { template =
single_narrative.html }],
);

And also view.pm, doap2perl.xsl and list2urls.xsl

sub news_page {
  my %args = @_;
  my $count=0;
  for (fetch_doap_url_list()) {
  my $result = parse_doap($_);
  next unless defined $result;
  push @{$args{projects}}, $result;
  last if ++$count == 3;
  }

  return ASF::View::news_page(%args);
}

sub parse_doap {
  my $url = shift;
  my $doap = get $url or die Can't get $url: $!\n;
  my ($fh, $filename) = tempfile(XX);
  print $fh $doap;
  close $fh;
  my $result = eval `xsltproc lib/doap2perl.xsl $filename`;
  unlink $filename;
  return undef if $result-{pmc} =~ m!^http://attic\.apache\.org!;
  return $result;
}

sub fetch_doap_url_list {
  my $xml = get

Re: [PROPOSAL] lazy consensus for new News scrolling

2013-01-07 Thread Rob Weir
On Fri, Jan 4, 2013 at 1:12 PM, Kay Schenk kay.sch...@gmail.com wrote:
 On Thu, Jan 3, 2013 at 4:09 PM, Rob Weir robw...@apache.org wrote:

 On Thu, Jan 3, 2013 at 6:38 PM, Kay Schenk kay.sch...@gmail.com wrote:
  Here's is the latest/final draft for the proposed new user portal web
 site
  home page incorporating News scrolling:
 
  http://www.openoffice.org/test/
 
  I am invoking lazy consensus for this change. If I hear no complaints
 by
  Sunday 1750 PDT, I will implement this change.
 

 I can see how this makes it easier to manage the news articles.
 Previously we kept the most recent articles on index.html and
 rotated the older ones off onto an archive page.  This was a manual
 process, an extra set of steps.  With your new SSI mechanism we just
 keep all of the news articles in a single SSI file, the are displayed
 on the home page and the user can scroll through them.  So from the
 perspective of the author of the news stories this is a big
 improvement.  Thanks for looking into this!

 However, from the perspective of the page reader, this has two liabilities:

 1) Aesthetically, from a design perspective this doesn't work well,
 especially that scroll bar.  IMHO, it does not look like a
 professional page.


 comments duly noted on the scroll bar...I could look for some better
 styling on this.


 2) Impact on page load time.  As we add more stories to the SSI,
 especially stories with images/photos (which I'd like to start doing)
 the page size is going to increase.  Eventually this becomes a problem
 and we're back to manual rotation of the stories to an archive page.


 This is certainly true. I was thinking we would eventually cut off older
 items from the bottom of the ssi file. Nothing to prevent any committer
 from doing this.



 Since this is the visitors first impression of the project, I wonder
 if it is worth exploring further to see if there is a way to address
 these issues?   As I mentioned before, the ASF home page has a latest
 activity panel that avoids both of these problems:

 http://www.apache.org/

 Can we copy what they do?


 ummm...not sure about this. We would need to do more thorough investigation
 here. Right now, I can not easily determine how this column is generated --
 manually vs something else.


I did a little research on how the ASF home page works.

You cans see the source here:
http://svn.apache.org/repos/asf/infrastructure/site/trunk/

index.html is here:
http://svn.apache.org/repos/asf/infrastructure/site/trunk/content/index.html

and Latest Activity looks like this:

 h3Latest Activity/h3
  div class=section-content
pemThis is an overview of activity going on with our
projects. SVN commits, bug reports, tweets, you name it/em./p
  /div

 {% for e in twitter.list %}
 div class=section-content
 a href={{ e.url }}@/a{{ e.title|safe }}
 /div
 {% endfor %}

{% for e in svn.list %}
div class=section-content
a class=svn
href=http://svn.apache.org/viewvc?revision={{ e.revision
}};view=revisionr{{ e.revision }}/a
  {{ e.message|safe|truncatewords_html:20 }} ({{
  e.projects|safe }}) mdash;
  a
href=http://people.apache.org/committer-index.html#{{ e.author }}{{
e.author }}/a
/div
{% endfor %}

 {% for e in jira.list %}
 div class=section-content
 a class=bug href={{ e.url }}{{
e.title|safe }}/abr/
 {{ e.content|safe|truncatewords_html:20 }}
 /div
 {% endfor %}

/div



So they are iterating over twitter.list, svn.list and jira.list.  But
it is not leaping out at me where that data comes from.  Presumably it
is RSS/Atom feeds, but I don't see the glue that connects this.

But in any case, if this is doable within the CMS -- as it appears to
be -- then one option would be for us to format our news stories as
Atom or RSS feeds.  Then those can be sucked into a panel on the
homepage.  But the nice thing then is the same logic could be used to
put in a list of new bug reports, or forum posts, or check-ins, or
conference paper submissions, or whatever other useful info we can
find a feed for.   We set up a generic capability that could find
other users.

-Rob


 In any case, removing the scrolling styling from the current ssi would
 certainly do away with the bars. If we wanted to keep all the news items in
 one file but only bring in like the last 10 or something, there MAY be a
 way to do that. You could certainly do it either with server side JS or a
 cgi.

 Anyway, I will hold up on this change for now I guess.

 I agree that the scroll bars don't look very professional. I may find
 some nicer 

Re: [PROPOSAL] lazy consensus for new News scrolling

2013-01-07 Thread Dave Fisher

On Jan 7, 2013, at 12:39 PM, Rob Weir wrote:

 On Fri, Jan 4, 2013 at 1:12 PM, Kay Schenk kay.sch...@gmail.com wrote:
 On Thu, Jan 3, 2013 at 4:09 PM, Rob Weir robw...@apache.org wrote:
 

snip

 Since this is the visitors first impression of the project, I wonder
 if it is worth exploring further to see if there is a way to address
 these issues?   As I mentioned before, the ASF home page has a latest
 activity panel that avoids both of these problems:
 
 http://www.apache.org/
 
 Can we copy what they do?
 

Yes. See below where I show where to find the rest of the code that Rob has 
tracked down.

We can handle it like a feed with ASF::Value type patterns in path.pm

Or we can use xslt and parse a file file in view.pm

Or a combination.


 
 ummm...not sure about this. We would need to do more thorough investigation
 here. Right now, I can not easily determine how this column is generated --
 manually vs something else.
 
 
 I did a little research on how the ASF home page works.
 
 You cans see the source here:
 http://svn.apache.org/repos/asf/infrastructure/site/trunk/
 
 index.html is here:
 http://svn.apache.org/repos/asf/infrastructure/site/trunk/content/index.html
 
 and Latest Activity looks like this:
 
 h3Latest Activity/h3
  div class=section-content
pemThis is an overview of activity going on with our
 projects. SVN commits, bug reports, tweets, you name it/em./p
  /div
 
 {% for e in twitter.list %}
 div class=section-content
 a href={{ e.url }}@/a{{ e.title|safe }}
 /div
 {% endfor %}
 
{% for e in svn.list %}
div class=section-content
a class=svn
 href=http://svn.apache.org/viewvc?revision={{ e.revision
 }};view=revisionr{{ e.revision }}/a
  {{ e.message|safe|truncatewords_html:20 }} ({{
  e.projects|safe }}) mdash;
  a
 href=http://people.apache.org/committer-index.html#{{ e.author }}{{
 e.author }}/a
/div
{% endfor %}
 
 {% for e in jira.list %}
 div class=section-content
 a class=bug href={{ e.url }}{{
 e.title|safe }}/abr/
 {{ e.content|safe|truncatewords_html:20 }}
 /div
 {% endfor %}
 
/div
 
 
 
 So they are iterating over twitter.list, svn.list and jira.list.  But
 it is not leaping out at me where that data comes from.  Presumably it
 is RSS/Atom feeds, but I don't see the glue that connects this.

Take a look at www.apache.org's trunk/lib/path.pm:

our @patterns = (

[qr!^/index\.html$!, news_page =
  {
svn  = ASF::Value::SVN-new(limit = 5),
jira = ASF::Value::Jira-new(limit = 5,
  url = http://s.apache.org/q4;),
announce = ASF::Value::Mail-new(list = 'annou...@apache.org',
  limit = 3),
planet   = ASF::Value::Blogs-new(blog = planet, limit= 3),
blog = ASF::Value::Blogs-new(blog = foundation, limit= 3),
twitter  = ASF::Value::Twitter-new(name = 'TheASF', limit = 3),
  },
],

[qr!^/dev/index\.html$!, news_page =
  {
svn  = ASF::Value::SVN-new(limit = 5),
twitter  = ASF::Value::Twitter-new(name=infrabot, limit = 3),
blog = ASF::Value::Blogs-new(blog = infra, limit= 3),
jira = ASF::Value::Jira-new(limit = 5,
  url = http://s.apache.org/lg;),
  },
],

[qr!^/dev/sitemap\.html$!, sitemap = { headers = { title = Developer 
Sitemap }} ],

[qr!^/licenses/exports/index\.html$!, exports = {} ],

[qr!\.mdtext$!, single_narrative = { template = single_narrative.html 
}],
);

And also view.pm, doap2perl.xsl and list2urls.xsl

sub news_page {
my %args = @_;
my $count=0;
for (fetch_doap_url_list()) {
my $result = parse_doap($_);
next unless defined $result;
push @{$args{projects}}, $result;
last if ++$count == 3;
}

return ASF::View::news_page(%args);
}

sub parse_doap {
my $url = shift;
my $doap = get $url or die Can't get $url: $!\n;
my ($fh, $filename) = tempfile(XX);
print $fh $doap;
close $fh;
my $result = eval `xsltproc lib/doap2perl.xsl $filename`;
unlink $filename;
return undef if $result-{pmc} =~ m!^http://attic\.apache\.org!;
return $result;
}

sub fetch_doap_url_list {
my $xml = get 
http://svn.apache.org/repos/asf/infrastructure/site-tools/trunk/projects/files.xml;
or die Can't get doap file list: $!\n;
my ($fh, $filename) = tempfile(XX);
print $fh $xml;
close $fh;
chomp(my @urls = grep /^http/, `xsltproc lib/list2urls.xsl 

[PROPOSAL] lazy consensus for new News scrolling

2013-01-03 Thread Kay Schenk
Here's is the latest/final draft for the proposed new user portal web 
site home page incorporating News scrolling:


http://www.openoffice.org/test/

I am invoking lazy consensus for this change. If I hear no complaints 
by Sunday 1750 PDT, I will implement this change.


Thereafter all news items will not be added to the home page directly 
or to /news/index.html, but to /news/newslist.ssi (this is a text file, 
not html), LIFO order, maintaining the styling you see for other items 
there.


--

MzK

No act of kindness, no matter how small, is ever wasted.
 -- Aesop


Re: [PROPOSAL] lazy consensus for new News scrolling

2013-01-03 Thread Dave Fisher

On Jan 3, 2013, at 3:38 PM, Kay Schenk wrote:

 Here's is the latest/final draft for the proposed new user portal web site 
 home page incorporating News scrolling:
 
 http://www.openoffice.org/test/

I like it. Great work.

 
 I am invoking lazy consensus for this change. If I hear no complaints by 
 Sunday 1750 PDT, I will implement this change.
 
 Thereafter all news items will not be added to the home page directly or to 
 /news/index.html, but to /news/newslist.ssi (this is a text file, not html), 
 LIFO order, maintaining the styling you see for other items there.

It would be good if there were dates on all of the entries.

I can see how to change this into mdtext in such a way that any file named 
news.mdtext is specially converted like the topnav.html. We can then set  
brand.mdtext to include a newsfeed url and allow news feeds to be translated or 
special for certain directories.

But then don't wait for me.

Regards,
Dave

 
 -- 
 
 MzK
 
 No act of kindness, no matter how small, is ever wasted.
 -- Aesop



Re: [PROPOSAL] lazy consensus for new News scrolling

2013-01-03 Thread RGB ES
2013/1/4 Rob Weir robw...@apache.org

 On Thu, Jan 3, 2013 at 6:38 PM, Kay Schenk kay.sch...@gmail.com wrote:
  Here's is the latest/final draft for the proposed new user portal web
 site
  home page incorporating News scrolling:
 
  http://www.openoffice.org/test/
 
  I am invoking lazy consensus for this change. If I hear no complaints
 by
  Sunday 1750 PDT, I will implement this change.
 

 I can see how this makes it easier to manage the news articles.
 Previously we kept the most recent articles on index.html and
 rotated the older ones off onto an archive page.  This was a manual
 process, an extra set of steps.  With your new SSI mechanism we just
 keep all of the news articles in a single SSI file, the are displayed
 on the home page and the user can scroll through them.  So from the
 perspective of the author of the news stories this is a big
 improvement.  Thanks for looking into this!

 However, from the perspective of the page reader, this has two liabilities:

 1) Aesthetically, from a design perspective this doesn't work well,
 especially that scroll bar.  IMHO, it does not look like a
 professional page.

 2) Impact on page load time.  As we add more stories to the SSI,
 especially stories with images/photos (which I'd like to start doing)
 the page size is going to increase.  Eventually this becomes a problem
 and we're back to manual rotation of the stories to an archive page.

 Since this is the visitors first impression of the project, I wonder
 if it is worth exploring further to see if there is a way to address
 these issues?   As I mentioned before, the ASF home page has a latest
 activity panel that avoids both of these problems:

 http://www.apache.org/

 Can we copy what they do?


Disclaimer: from the technical point of view, I have no idea what I'm
talking about so just take the following as an example of what happens when
a completely html illiterate starts to think aloud...

Suppose we put all news on one page, but organized with a heading, an
abstract and then the main article. Question: is it possible to use that
page as a sort of database and load only the, say, first five headings with
their corresponding abstracts and show them on the lateral panel in the
main page?

No idea how difficult could be to do that, but once it is set managing the
news will be easier and I think this could solve both problems mentioned by
Rob.

Regards
Ricardo




 -Rob

  Thereafter all news items will not be added to the home page directly
 or
  to /news/index.html, but to /news/newslist.ssi (this is a text file, not
  html), LIFO order, maintaining the styling you see for other items there.
 
  --
  
  MzK
 
  No act of kindness, no matter how small, is ever wasted.
   -- Aesop