module rss.rss_blogpost
¶
Short summary¶
module pyrsslocal.rss.rss_blogpost
description of a blog post
Classes¶
class |
truncated documentation |
---|---|
A blog post. |
Properties¶
property |
truncated documentation |
---|---|
Returns all members as a dictionary. |
|
Returns all the values as a row (following the schema given by |
|
Defines the column to use as an index. |
|
Defines other indexes to create. |
|
Returns the date to a given format. |
|
Returns all members names and types as a dictionary. |
|
Return the status. |
|
Returns the status. |
|
Returns the status. |
Static Methods¶
staticmethod |
truncated documentation |
---|---|
Fills a table of a database, if the table does not exists, it creates it. |
|
Returns all members names and types as a dictionary. |
Methods¶
method |
truncated documentation |
---|---|
usual |
|
Attaches a dictionary representing the status. |
|
Returns a status written in HTML. |
|
Displays the blogs in HTML format, the template contains two kinds of informations: |
|
Renders the blog post into HTML. |
|
Converts the blog post into XML. |
Documentation¶
description of a blog post
- class pyrsslocal.rss.rss_blogpost.BlogPost(id_rss, title, guid, isPermaLink, link, description, pubDate, keywords=None, id=-1)¶
Bases:
object
A blog post.
<item> <title>Raw food</title> <link>http://www.xavierdupre.fr/blog/xd_blog.html?date=2013-06-30</link> <guid isPermaLink="true">http://www.xavierdupre.fr/blog/xd_blog.html?date=2013-06-30</guid> <description><p> J'ecoutais une em....</description> <pubDate>2013-06-30 00:00:00</pubDate> </item>
attribute
meaning
id_rss
id of the blog source
title
title of the stream
guid
guid
isPermaLink
isPermaLink
link
url of the blog post
description
description
pubDate
pubDate
keywords
list of keywords
status
status (dictionary with variables)
- Parameters:
id_rss – id of rss or
Stream
classtitle – title of the stream
guid – guid
isPermaLink – isPermaLink
link – url of the blog post
description – description
pubDate – pubDate
keywords – keywords
id – blog id
- property Status¶
Return the status.
- property StatusTime¶
Returns the status.
- property StatusTimeStr¶
Returns the status.
- __init__(id_rss, title, guid, isPermaLink, link, description, pubDate, keywords=None, id=-1)¶
- Parameters:
id_rss – id of rss or
Stream
classtitle – title of the stream
guid – guid
isPermaLink – isPermaLink
link – url of the blog post
description – description
pubDate – pubDate
keywords – keywords
id – blog id
- __str__()¶
usual
- add_status(status)¶
Attaches a dictionary representing the status.
- Parameters:
status – dictionary
- property asdict¶
Returns all members as a dictionary.
- Returns:
dictionary
- property asrow¶
Returns all the values as a row (following the schema given by
schema_database()
).- Returns:
list of values
- static fill_table(db, tablename, iterator_on, skip_exception=False)¶
Fills a table of a database, if the table does not exists, it creates it.
- Parameters:
db – database object (
Database
)tablename – name of a table (created if it does not exists)
iterator_on – iterator_on on StreamRSS object
skip_exception – skip exception while inserting an element
- get_html_status(thispage)¶
Returns a status written in HTML.
- Parameters:
thispage – the displayed page
- Returns:
html string
- html(template=None, action='{0.link}', style=None, styleblog=None, stylestatus=None, ftime='%Y-%m-%d', extended=False, style_desc='description', addlog=True, addcontent=False, addstatus=False, thispage=None)¶
Displays the blogs in HTML format, the template contains two kinds of informations: -
{0.member}
: this string will be replaced by the member- Parameters:
template – html template
action – url to use when clicking on a blog
style – style of the paragraph containing the url, if None, it will be set to
postitle
orposttitleext
styleblog – style of the paragraph containing the url, if None, it will be set to
posttitleexb
ftime – format time
extended – if True, display the title, if False, display everything
style_desc – style for the description
addlog – if True,
link
will contains a prefix to go through the server and be loggedaddcontent – if True, the function will add some javascript code to make the content from the website appear.
addstatus – if True, add the status for this blog post
- Returns:
html string
If the template is None, it will be replaced a default value (see the code and the variable
template
).
- property index¶
Defines the column to use as an index.
- property indexes¶
Defines other indexes to create.
- property pubDateformat¶
Returns the date to a given format.
- property schema_database¶
Returns all members names and types as a dictionary.
- Returns:
dictionary
- static schema_database_read()¶
Returns all members names and types as a dictionary.
- Returns:
dictionary