|
List Info
Thread: Unable to get excerpt.py to work correctly
|
|
| Unable to get excerpt.py to work
correctly |

|
2007-05-27 12:15:16 |
|
Hello,
I am trying to use excerpt.py as a filter to display excerpts of each feed post that is aggregated on my site. However, it is not grabbing anything. Instead, each feed just has the heading and then '###39; where the excerpt should be. This appears to be the default (without
excerpt.py) behaviour, which indicates excerpt.py does not appear to be working correctly. However, when I run the update using planet.py, it appears that excerpt.py is being run against each site.
Here is the current site which uses Planet.
2.0: http://bcbloggers.com.
Here is the new test site using Venus and excerpt.py: http://bcbloggers.com/testindex.html
Here is an excerpt from the
config.ini being used with the test site:
[Planet] # name: Your planet';s name
# link: Link to the main page
# owner_name: Your name # owner_email: Your e-mail address
name = BC Bloggers link = http://bcbloggers.com
owner_name = Jeff Childs owner_email = bcbloggers[at]gmail[dot]com
# cache_directory: Where cached feeds are stored
# new_feed_items: Number of items to take from new feeds # log_level: One of DEBUG, INFO, WARNING, ERROR or CRITICAL
# feed_timeout: number of seconds to wait for any given feed
cache_directory = /var/www/html/venus/cache new_feed_items = 1
log_level = DEBUG feed_timeout = 20
spider_threads = 10 filters = excerpt.py
[excerpt.py] omit = p br
width = 300
The current site has excerpts, but the posts do not have a consistent
length, which is why I want to use excerpt.py. There are also other problems with Planet 2.0 that I'm hoping
Venus will eliminate, at least in part. Can you offer any advice? Thanks.
Jeff
|
| Re: Unable to get excerpt.py to work
correctly |

|
2007-05-27 17:45:38 |
|
Hi,
When I was setting up my blog aggreagator to display excerpts at
http://bloggers.pk I ran into the same problem only to realize later
that a call must be made from the Index.html.tmpl file to pull
the extracted excerpt into the main page and I went about by replacing
the <TMPL_VAR content> with <TMPL_VAR excerpt>.
That solved the issue, but there are some blogs which still don't
display any content (about 20%) probably some tag that disables the
excerpt entirely - in my planet.py I have these tags on ommision
omit = div br table script
Hope this helps
Awab
http://bloggers.pk
Webmaster wrote:
mail.gmail.com"
type="cite">Hello,
I am trying to use excerpt.py as a filter to display excerpts of each
feed post that is aggregated on my site. However, it is not grabbing
anything. Instead, each feed just has the heading and then '###' where
the excerpt should be. This appears to be the default (without
excerpt.py) behaviour, which indicates excerpt.py does not appear to be
working correctly. However, when I run the update using planet.py, it
appears that excerpt.py is being run against each site.
Here is the current site which uses Planet. 2.0: http://bcbloggers.com.
Here is the new test site using Venus and excerpt.py: http://bcbloggers.com/testindex.html
Here is an excerpt from the config.ini being used with the test site:
[Planet]
# name: Your
planet's name
# link: Link to the
main page
# owner_name: Your
name
# owner_email: Your
e-mail address
name = BC Bloggers
link = http://bcbloggers.com
owner_name = Jeff
Childs
owner_email =
bcbloggers[at]gmail[dot]com
# cache_directory:
Where cached feeds are stored
# new_feed_items:
Number of items to take from new feeds
# log_level: One of
DEBUG, INFO, WARNING, ERROR or CRITICAL
# feed_timeout:
number of seconds to wait for any given feed
cache_directory =
/var/www/html/venus/cache
new_feed_items = 1
log_level = DEBUG
feed_timeout = 20
spider_threads = 10
filters = excerpt.py
[excerpt.py]
omit = p br
width = 300
The current site has excerpts, but the posts do not have a consistent
length, which is why I want to use excerpt.py. There are also other
problems with Planet 2.0 that I'm hoping
Venus will eliminate, at least in part. Can you offer any advice?
Thanks.
Jeff
|
| Re: Unable to get excerpt.py to work
correctly |
  United States |
2007-05-28 19:00:51 |
Webmaster wrote:
> Hello,
>
> I am trying to use excerpt.py as a filter to display
excerpts of each
> feed post that is aggregated on my site. However, it is
not grabbing
> anything. Instead, each feed just has the heading and
then '###' where
> the excerpt should be. This appears to be the default
(without
> excerpt.py) behaviour, which indicates excerpt.py does
not appear to be
> working correctly. However, when I run the update using
planet.py, it
> appears that excerpt.py is being run against each
site.
>
> Here is the current site which uses Planet. 2.0: http://bcbloggers.com.
>
> Here is the new test site using Venus and excerpt.py:
> http://bcblogger
s.com/testindex.html
What does your template look like?
- Sam Ruby
--
devel mailing list
devel lists.planetplanet.org
http://lists.planetplanet.org/mailman/listinfo/devel
|
|
| Re: Unable to get excerpt.py to work
correctly |

|
2007-05-28 23:24:45 |
|
Sam,
Here is the entry loop portion of the template. Let me know if you need more detail/information.
Thanks,
Jeff
<TMPL_LOOP Items> <TMPL_IF new_date> <TMPL_UNLESS __FIRST__>
### End <div class="channelgroup"> </div> ### End <div class="daygroup"> </div> </TMPL_UNLESS> <div class="daygroup"> <h2><TMPL_VAR new_date></h2>
</TMPL_IF>
<TMPL_IF new_channel> <TMPL_UNLESS new_date> ### End <div class="channelgroup"> </div> </TMPL_UNLESS> <div class="channelgroup">
### Planet provides template variables for *all* configuration options for ### the channel (and defaults), even if it doesn't know about them. We ### exploit this here to add hackergotchi faces to our channels. Planet
### doesn't know about the "face", "facewidth" and "faceheight" configuration ### variables, but makes them available to us anyway.
<h3><a
href="<TMPL_VAR channel_link ESCAPE="HTML">" title="<TMPL_VAR
channel_title_plain ESCAPE="HTML">"><TMPL_VAR
channel_name></a>
(<TMPL_VAR channel_location>)</h3>
<TMPL_IF channel_face> <img class="face"
src="images/<TMPL_VAR channel_face ESCAPE="HTML">"
width="<TMPL_VAR channel_facewidth ESCAPE="HTML">"
height="<TMPL_VAR channel_faceheight ESCAPE="HTML">" alt="">
</TMPL_IF> </TMPL_IF>
<div
class="entrygroup" id="<TMPL_VAR id>"<TMPL_IF
channel_language> lang="<TMPL_VAR
channel_language>"</TMPL_IF>>
<TMPL_IF title> <h4<TMPL_IF title_language>
lang="<TMPL_VAR title_language>"</TMPL_IF>><a
href="<TMPL_VAR link ESCAPE="HTML">"><TMPL_VAR
title></a></h4>
</TMPL_IF> <div class="entry"> <div class="content"<TMPL_IF content_language> lang="<TMPL_VAR content_language>"</TMPL_IF>> <TMPL_VAR summary>
</div>
### ### Changed TMPL_VAR content to TMPL_VAR summary ### Planet also makes available all of the information from the feed ### that it can. Use the 'planet-cache'; tool on the cache file for
### a particular feed to find out what additional keys it supports. ### Comment extra fields are 'author' and 'category' which we ### demonstrate below.
<p class="date">
<a href="<TMPL_VAR link ESCAPE="HTML">"><TMPL_IF author>by <TMPL_VAR author> at </TMPL_IF><TMPL_VAR date><TMPL_IF category> under <TMPL_VAR category></TMPL_IF></a>
</p> </div> </div>
<TMPL_IF __LAST__> ### End <div class="channelgroup"> </div> ### End <div class="daygroup"> </div> </TMPL_IF>
</TMPL_LOOP>
On 5/28/07, Sam Ruby < rubys intertwingly.net">rubys intertwingly.net> wrote:
Webmaster wrote: > Hello, > > I am trying to use excerpt.py as a filter to display excerpts of each > feed post that is aggregated on my site. However, it is not grabbing > anything. Instead, each feed just has the heading and then '###39; where
> the excerpt should be. This appears to be the default (without > excerpt.py) behaviour, which indicates excerpt.py does not appear to be > working correctly. However, when I run the update using planet.py
, it > appears that excerpt.py is being run against each site. > > Here is the current site which uses Planet. 2.0: http://bcbloggers.com. > > Here is the new test site using Venus and
excerpt.py: > http://bcbloggers.com/testindex.html
What does your template look like?
- Sam Ruby
|
| Re: Unable to get excerpt.py to work
correctly |
  United States |
2007-05-29 08:46:45 |
Jeff Childs wrote:
> Sam,
>
> Here is the entry loop portion of the template. Let me
know if you need
> more detail/information.
>
> Thanks,
>
> Jeff
>
> <div class="content"<TMPL_IF
content_language> lang="<TMPL_VAR
> content_language>"</TMPL_IF>>
> <TMPL_VAR summary>
> </div>
>
> ###
Now lets comparing that to the output produced:
> <div class="entry">
> <div class="content"
lang="en">
> </div>
>
> ###
First, there seems to be a simple explanation for the three
hash marks
appearing in the output. Delete that line, and see if it
helps.
As to the missing summary, there are two parts to that.
First,
excerpt.py doesn't produce a summary, it produces a
planet:excerpt.
That element isn't available to htmltmpl style templates. I
can fix
that part.
But a deeper mystery remains: why isn't the original summary
showing up?
Nothing, not even a blank line, appears in the output.
I'm stumped on
that.
In any case, as to the part I can fix, I have pushed out an
update to
excerpt.py to accept a 'target' parameter allowing you to
specify the
name of the target element. The default remains
'planet:excerpt', but
you can specify 'atom:summary' or even simply 'summary' if
you like. An
example usage can be found at:
http://intertwingly.net/code/venus/t
ests/data/filter/excerpt-lorem-ipsum.ini
- Sam Ruby
--
devel mailing list
devel lists.planetplanet.org
http://lists.planetplanet.org/mailman/listinfo/devel
|
|
| Re: Unable to get excerpt.py to work
correctly |

|
2007-05-31 16:02:13 |
|
I downloaded the latest excerpt.py and put it into place. I re-ran planet.py against the config.ini, and tried it several times using just the defaults and also trying target = atom:summary, and target = summary.
Still the same result, no portion of the excerpt is appearing. Any other ideas? I would really like to get Venus into place to replace Planet
2.0, but I need to have excerpts of the posts.
Thanks,
Jeff
On 5/29/07, Sam Ruby < rubys intertwingly.net">rubys intertwingly.net
> wrote:Jeff Childs wrote: > Sam, > > Here is the entry loop portion of the template. Let me know if you need
> more detail/information. > > Thanks, > > Jeff > > <div class="content"<TMPL_IF content_language> lang="<TMPL_VAR > content_language>"</TMPL_IF>>
> <TMPL_VAR summary> > </div> > > ###
Now lets comparing that to the output produced:
> <div class="entry"> > <div class="content" lang="en">
> </div> > > ###
First, there seems to be a simple explanation for the three hash marks appearing in the output. Delete that line, and see if it helps.
As to the missing summary, there are two parts to that. First,
excerpt.py doesn't produce a summary, it produces a planet:excerpt. That element isn't available to htmltmpl style templates. I can fix that part.
But a deeper mystery remains: why isn't the original summary showing up?
Nothing, not even a blank line, appears in the output. I'm stumped on that.
In any case, as to the part I can fix, I have pushed out an update to excerpt.py to accept a 'target' parameter allowing you to specify the
name of the target element. The default remains 'planet:excerpt39;, but you can specify 'atom:summary'; or even simply 'summary' if you like. An example usage can be found at:
http://intertwingly.net/code/venus/tests/data/filter/excerpt-lorem-ipsum.ini
- Sam Ruby
|
[1-6]
|
|