webkit
2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
|
Public Member Functions | |
def | __init__ (self, config) |
def | tmpl_config_get (self, template, option, default=None, raw=0, vars=None) |
def | gather_channel_info (self, template_file="Planet") |
def | gather_items_info (self, channels, template_file="Planet", channel_list=None) |
def | run (self, planet_name, planet_link, template_files, offline=False) |
def | generate_all_files (self, template_files, planet_name, planet_link, planet_feed, owner_name, owner_email) |
def | channels (self, hidden=0, sorted=1) |
def | find_by_basename (self, basename) |
def | subscribe (self, channel) |
def | unsubscribe (self, channel) |
def | items (self, hidden=0, sorted=1, max_items=0, max_days=0, channels=None) |
Public Attributes | |
config | |
user_agent | |
cache_directory | |
new_feed_items | |
filter | |
exclude | |
A set of channels. This class represents a set of channels for which the items will be aggregated together into one combined feed. Properties: user_agent User-Agent header to fetch feeds with. cache_directory Directory to store cached channels in. new_feed_items Number of items to display from a new feed. filter A regular expression that articles must match. exclude A regular expression that articles must not match.
def planet.Planet.__init__ | ( | self, | |
config | |||
) |
def planet.Planet.channels | ( | self, | |
hidden = 0 , |
|||
sorted = 1 |
|||
) |
Return the list of channels.
def planet.Planet.find_by_basename | ( | self, | |
basename | |||
) |
def planet.Planet.gather_channel_info | ( | self, | |
template_file = "Planet" |
|||
) |
def planet.Planet.gather_items_info | ( | self, | |
channels, | |||
template_file = "Planet" , |
|||
channel_list = None |
|||
) |
def planet.Planet.generate_all_files | ( | self, | |
template_files, | |||
planet_name, | |||
planet_link, | |||
planet_feed, | |||
owner_name, | |||
owner_email | |||
) |
def planet.Planet.items | ( | self, | |
hidden = 0 , |
|||
sorted = 1 , |
|||
max_items = 0 , |
|||
max_days = 0 , |
|||
channels = None |
|||
) |
Return an optionally filtered list of items in the channel. The filters are applied in the following order: If hidden is true then items in hidden channels and hidden items will be returned. If sorted is true then the item list will be sorted with the newest first. If max_items is non-zero then this number of items, at most, will be returned. If max_days is non-zero then any items older than the newest by this number of days won't be returned. Requires sorted=1 to work. The sharp-eyed will note that this looks a little strange code-wise, it turns out that Python gets *really* slow if we try to sort the actual items themselves. Also we use mktime here, but it's ok because we discard the numbers and just need them to be relatively consistent between each other.
def planet.Planet.run | ( | self, | |
planet_name, | |||
planet_link, | |||
template_files, | |||
offline = False |
|||
) |
def planet.Planet.subscribe | ( | self, | |
channel | |||
) |
Subscribe the planet to the channel.
def planet.Planet.tmpl_config_get | ( | self, | |
template, | |||
option, | |||
default = None , |
|||
raw = 0 , |
|||
vars = None |
|||
) |
Get a template value from the configuration, with a default.
def planet.Planet.unsubscribe | ( | self, | |
channel | |||
) |
Unsubscribe the planet from the channel.
planet.Planet.cache_directory |
planet.Planet.config |
planet.Planet.exclude |
planet.Planet.filter |
planet.Planet.new_feed_items |
planet.Planet.user_agent |