mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
A couple of docstrings are fixed (they were refering obsolete params)
This commit is contained in:
parent
1264b81bb6
commit
06246557c5
2 changed files with 6 additions and 8 deletions
|
|
@ -6,8 +6,7 @@ class Page(object):
|
||||||
"""Represents a page
|
"""Represents a page
|
||||||
Given a content, and metadatas, create an adequate object.
|
Given a content, and metadatas, create an adequate object.
|
||||||
|
|
||||||
:param string: the string to parse, containing the original content.
|
:param content: the string to parse, containing the original content.
|
||||||
:param markup: the markup language to use while parsing.
|
|
||||||
"""
|
"""
|
||||||
mandatory_properties = ('title',)
|
mandatory_properties = ('title',)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -44,9 +44,8 @@ class Writer(object):
|
||||||
Return the feed. If no output_path or filename is specified, just return
|
Return the feed. If no output_path or filename is specified, just return
|
||||||
the feed object.
|
the feed object.
|
||||||
|
|
||||||
:param articles: the articles to put on the feed.
|
:param elements: the articles to put on the feed.
|
||||||
:param context: the context to get the feed metadata.
|
:param context: the context to get the feed metadata.
|
||||||
:param output_path: where to output the file.
|
|
||||||
:param filename: the filename to output.
|
:param filename: the filename to output.
|
||||||
:param feed_type: the feed type to use (atom or rss)
|
:param feed_type: the feed type to use (atom or rss)
|
||||||
"""
|
"""
|
||||||
|
|
@ -139,7 +138,7 @@ class Writer(object):
|
||||||
'%s_page' % key: page})
|
'%s_page' % key: page})
|
||||||
if page_num > 0:
|
if page_num > 0:
|
||||||
ext = '.' + paginated_name.rsplit('.')[-1]
|
ext = '.' + paginated_name.rsplit('.')[-1]
|
||||||
paginated_name = paginated_name.replace(ext,
|
paginated_name = paginated_name.replace(ext,
|
||||||
'%s%s' % (page_num + 1, ext))
|
'%s%s' % (page_num + 1, ext))
|
||||||
|
|
||||||
_write_file(template, paginated_localcontext, self.output_path,
|
_write_file(template, paginated_localcontext, self.output_path,
|
||||||
|
|
@ -149,7 +148,7 @@ class Writer(object):
|
||||||
_write_file(template, localcontext, self.output_path, name)
|
_write_file(template, localcontext, self.output_path, name)
|
||||||
|
|
||||||
def update_context_contents(self, name, context):
|
def update_context_contents(self, name, context):
|
||||||
"""Recursively run the context to find elements (articles, pages, etc)
|
"""Recursively run the context to find elements (articles, pages, etc)
|
||||||
whose content getter needs to
|
whose content getter needs to
|
||||||
be modified in order to deal with relative paths.
|
be modified in order to deal with relative paths.
|
||||||
|
|
||||||
|
|
@ -188,12 +187,12 @@ class Writer(object):
|
||||||
return context
|
return context
|
||||||
|
|
||||||
def inject_update_method(self, name, item):
|
def inject_update_method(self, name, item):
|
||||||
"""Replace the content attribute getter of an element by a function
|
"""Replace the content attribute getter of an element by a function
|
||||||
that will deals with its relatives paths.
|
that will deals with its relatives paths.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def _update_object_content(name, input):
|
def _update_object_content(name, input):
|
||||||
"""Change all the relatives paths of the input content to relatives
|
"""Change all the relatives paths of the input content to relatives
|
||||||
paths suitable fot the ouput content
|
paths suitable fot the ouput content
|
||||||
|
|
||||||
:param name: path of the output.
|
:param name: path of the output.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue