From 1469064176cfafa4c6f57dbf19b9f0b6bf2532f6 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Mon, 30 Apr 2018 09:56:43 +0200 Subject: [PATCH] Minor documentation tweaks - Instaloader as Cronjob sections - Many new internal links to ease navigation --- docs/as-module.rst | 2 ++ docs/basic-usage.rst | 34 ++++++++++++++++++++++++++++++++++ docs/cli-options.rst | 14 +++++++++++--- docs/index.rst | 4 ++++ docs/installation.rst | 6 +++--- 5 files changed, 54 insertions(+), 6 deletions(-) diff --git a/docs/as-module.rst b/docs/as-module.rst index ed868c6..6062d65 100644 --- a/docs/as-module.rst +++ b/docs/as-module.rst @@ -3,6 +3,8 @@ Documentation of Instaloader module, a powerful and intuitive Python library to download Instagram media and metadata. +.. _python-module-instaloader: + Python Module :mod:`instaloader` -------------------------------- diff --git a/docs/basic-usage.rst b/docs/basic-usage.rst index caca3d9..ddad1f8 100644 --- a/docs/basic-usage.rst +++ b/docs/basic-usage.rst @@ -5,6 +5,8 @@ and private profiles, hashtags, stories, feeds, saved media, and their metadata, comments and captions. +.. _download-pictures-from-instagram: + Download Pictures from Instagram --------------------------------- @@ -90,6 +92,9 @@ downloads the pictures and videos and their captions. You can specify **download geotags** of each post and save them as Google Maps link, +For a reference of all supported command line options, see +:ref:`command-line-options`. + .. _filename-specification: Filename Specification @@ -237,3 +242,32 @@ files. Say, you now also want to export the number of comments the Posts had when they were downloaded:: instaloader --post-metadata-txt="{likes} likes, {comments} comments." /*.json.xz + +.. _instaloader-as-cronjob: + +Instaloader as Cronjob +^^^^^^^^^^^^^^^^^^^^^^ + +Instaloader is suitable for running as a cronjob to periodically update your +personal Instagram archive. The :option:`--quiet` option disables user +interactions and logging of non-error messages. To non-interactively use +Instaloader logged-in, create a session file, e.g. in your home directory:: + + instaloader --login=your_username --sessionfile=~/.instaloader-session + +Then use the same parameters in your cronjob to load the session and download +the given targets:: + + instaloader --login=your_username --sessionfile=~/.instaloader-session --quiet [...] + +Without :option:`--sessionfile` option, Instaloader saves the session file in +a path within your temporary directory. + +Programming Instaloader +^^^^^^^^^^^^^^^^^^^^^^^ + +If your task cannot be done with the command line interface of Instaloader, +consider taking a look at the :ref:`python-module-instaloader`. +Instaloader exposes its internally used methods and structures, making it a +powerful and intuitive Python API for Instagram, allowing to further customize +obtaining media and metadata. diff --git a/docs/cli-options.rst b/docs/cli-options.rst index 57a6a99..c044c96 100644 --- a/docs/cli-options.rst +++ b/docs/cli-options.rst @@ -1,3 +1,5 @@ +.. _command-line-options: + Command Line Options ==================== @@ -12,7 +14,9 @@ posts marked as saved). Here we explain the additional options that can be given to Instaloader to customize its behavior. To get a list of all flags, their abbreviations and -their descriptions, you may also run ``instaloader --help``. +their descriptions, you may also run ``instaloader --help``. For an +introduction on how to use Instaloader, see +:ref:`download-pictures-from-instagram`. What to Download ^^^^^^^^^^^^^^^^ @@ -142,6 +146,10 @@ Instaloader to login. Password for your Instagram account. Without this option, you'll be prompted for your password interactively if there is not yet a valid session file. + .. warning:: Using :option:`--password` option is discouraged for security + reasons. Enter your password interactively when asked, or use the + sessionfile feature (:option:`--sessionfile` to customize path). + How to Download ^^^^^^^^^^^^^^^ @@ -177,5 +185,5 @@ Miscellaneous Options .. option:: --quiet, -q Disable user interaction, i.e. do not print messages (except errors) and fail - if login credentials are needed but not given. This makes Instaloader - **suitable as a cron job**. + if login credentials are needed but not given. + This is handy for running :ref:`instaloader-as-cronjob`. diff --git a/docs/index.rst b/docs/index.rst index 98821bb..a7e652a 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -21,6 +21,8 @@ With `Python `__ installed, do:: $ instaloader profile [profile ...] +See :ref:`install` for more options on how to install Instaloader. + **Instaloader** - downloads **public and private profiles, hashtags, user stories, @@ -44,6 +46,8 @@ With `Python `__ installed, do:: profile | "#hashtag" | :stories | :feed | :saved +See :ref:`download-pictures-from-instagram` for a detailed introduction on how +to use Instaloader to download pictures from Instagram. Instaloader Documentation ------------------------- diff --git a/docs/installation.rst b/docs/installation.rst index 454e6ad..23ab054 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -33,7 +33,7 @@ Install Instaloader - On **Windows 10**, you may download the standalone executable from the `current release page `__. -To get the most current version of Instaloader from our -`Git repository `__:: +- To get the most current version of Instaloader from our + `Git repository `__:: - pip3 install --upgrade git+https://github.com/instaloader/instaloader + pip3 install --upgrade git+https://github.com/instaloader/instaloader