doc: Add 'versionadded' directives to new features

This commit is contained in:
Alexander Graf 2018-12-21 14:43:33 +01:00
parent be5d02ef3b
commit a735b02bac
3 changed files with 15 additions and 2 deletions

View File

@ -90,6 +90,8 @@ Instaloader supports the following targets:
Instagram labels a location with (e.g. Instagram labels a location with (e.g.
\https://www.instagram.com/explore/locations/**362629379**/plymouth-naval-memorial/). \https://www.instagram.com/explore/locations/**362629379**/plymouth-naval-memorial/).
.. versionadded:: 4.2
- ``:stories`` - ``:stories``
The currently-visible **stories** of your followees (requires The currently-visible **stories** of your followees (requires
:option:`--login`), :option:`--login`),

View File

@ -236,6 +236,8 @@ How to Download
interruption. If the last picture is corrupted, Instaloader will fix the interruption. If the last picture is corrupted, Instaloader will fix the
picture the next time it is run. picture the next time it is run.
.. versionadded:: 4.2
Miscellaneous Options Miscellaneous Options
^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^

View File

@ -96,6 +96,7 @@ class Instaloader:
txt file. txt file.
:param storyitem_metadata_txt_pattern: :option:`--storyitem-metadata-txt`, default is empty (=none) :param storyitem_metadata_txt_pattern: :option:`--storyitem-metadata-txt`, default is empty (=none)
:param max_connection_attempts: :option:`--max-connection-attempts` :param max_connection_attempts: :option:`--max-connection-attempts`
:param commit_mode: :option:`--commit-mode`
.. attribute:: context .. attribute:: context
@ -651,6 +652,8 @@ class Instaloader:
"""Get Posts which are listed by Instagram for a given Location. """Get Posts which are listed by Instagram for a given Location.
:return: Iterator over Posts of a location's posts :return: Iterator over Posts of a location's posts
.. versionadded:: 4.2
""" """
has_next_page = True has_next_page = True
end_cursor = None end_cursor = None
@ -680,6 +683,8 @@ class Instaloader:
:param max_count: Maximum count of pictures to download :param max_count: Maximum count of pictures to download
:param post_filter: function(post), which returns True if given picture should be downloaded :param post_filter: function(post), which returns True if given picture should be downloaded
:param fast_update: If true, abort when first already-downloaded picture is encountered :param fast_update: If true, abort when first already-downloaded picture is encountered
.. versionadded:: 4.2
""" """
self.context.log("Retrieving pictures for location {}...".format(location)) self.context.log("Retrieving pictures for location {}...".format(location))
count = 1 count = 1
@ -1010,8 +1015,12 @@ class Instaloader:
break break
def check_if_committed(self, filename: str) -> bool: def check_if_committed(self, filename: str) -> bool:
"""Checks to see if the current post has been committed.""" """Checks to see if the current post has been committed.
# A post is considered committed if its json metadata file exists and is not malformed.
A post is considered committed if its json metadata file exists and is not malformed.
.. versionadded:: 4.2
"""
if os.path.isfile(filename + '.json.xz'): if os.path.isfile(filename + '.json.xz'):
filename += '.json.xz' filename += '.json.xz'
elif os.path.isfile(filename + '.json'): elif os.path.isfile(filename + '.json'):