From a735b02bace298cba559e28546cd4cb1601b3ea2 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Fri, 21 Dec 2018 14:43:33 +0100 Subject: [PATCH] doc: Add 'versionadded' directives to new features --- docs/basic-usage.rst | 2 ++ docs/cli-options.rst | 2 ++ instaloader/instaloader.py | 13 +++++++++++-- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/docs/basic-usage.rst b/docs/basic-usage.rst index fae9bd4..c30c8db 100644 --- a/docs/basic-usage.rst +++ b/docs/basic-usage.rst @@ -90,6 +90,8 @@ Instaloader supports the following targets: Instagram labels a location with (e.g. \https://www.instagram.com/explore/locations/**362629379**/plymouth-naval-memorial/). + .. versionadded:: 4.2 + - ``:stories`` The currently-visible **stories** of your followees (requires :option:`--login`), diff --git a/docs/cli-options.rst b/docs/cli-options.rst index 8489be7..ee70d6a 100644 --- a/docs/cli-options.rst +++ b/docs/cli-options.rst @@ -236,6 +236,8 @@ How to Download interruption. If the last picture is corrupted, Instaloader will fix the picture the next time it is run. + .. versionadded:: 4.2 + Miscellaneous Options ^^^^^^^^^^^^^^^^^^^^^ diff --git a/instaloader/instaloader.py b/instaloader/instaloader.py index 681546a..8728232 100644 --- a/instaloader/instaloader.py +++ b/instaloader/instaloader.py @@ -96,6 +96,7 @@ class Instaloader: txt file. :param storyitem_metadata_txt_pattern: :option:`--storyitem-metadata-txt`, default is empty (=none) :param max_connection_attempts: :option:`--max-connection-attempts` + :param commit_mode: :option:`--commit-mode` .. attribute:: context @@ -651,6 +652,8 @@ class Instaloader: """Get Posts which are listed by Instagram for a given Location. :return: Iterator over Posts of a location's posts + + .. versionadded:: 4.2 """ has_next_page = True end_cursor = None @@ -680,6 +683,8 @@ class Instaloader: :param max_count: Maximum count of pictures to download :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 + + .. versionadded:: 4.2 """ self.context.log("Retrieving pictures for location {}...".format(location)) count = 1 @@ -1010,8 +1015,12 @@ class Instaloader: break def check_if_committed(self, filename: str) -> bool: - """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. + """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. + + .. versionadded:: 4.2 + """ if os.path.isfile(filename + '.json.xz'): filename += '.json.xz' elif os.path.isfile(filename + '.json'):