diff --git a/README.rst b/README.rst index 2e01ccd..3b53bfb 100644 --- a/README.rst +++ b/README.rst @@ -41,7 +41,7 @@ Monitor Instagram accounts for new posts and send them to a Discord webhook. * Customizable **Discord embeds** for new posts and message contents including **mentions/pings** * **User-definable refresh interval** for checking for new posts the second they are posted -.. code-block:: console +.. code:: console instawebhooks [-h] [-q | -v] [-i REFRESH_INTERVAL] [-c MESSAGE_CONTENT] [-e] [--version] instagram_username discord_webhook_url @@ -62,7 +62,7 @@ Example Below, InstaWebhooks is monitoring the Instagram account `raenlua `_ for new posts and sending them to a Discord webhook every 30 minutes and sends a message to Discord with the post URL and the owner's name. -.. code-block:: console +.. code:: console # Install InstaWebhooks pip install instawebhooks @@ -81,7 +81,7 @@ Installation InstaWebhooks is available on `PyPI `_, and can be installed using `pip`: -.. code-block:: console +.. code:: console pip install instawebhooks @@ -94,7 +94,7 @@ You can run ``instawebhooks --help`` to see the full list of options and argumen The most basic usage of InstaWebhooks is to provide an Instagram account and a Discord webhook URL (replace ```` and ````): -.. code-block:: console +.. code:: console instawebhooks diff --git a/docs/source/index.rst b/docs/source/index.rst index 008767b..8db9655 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -13,13 +13,13 @@ Quickstart With `Python `_ installed, install InstaWebhooks with `pip `_: -.. code-block:: console +.. code:: console $ pip install instawebhooks After installing, you can run InstaWebhooks with the following command (change the username and webhook URL to your own): -.. code-block:: console +.. code:: console $ instawebhooks raenlua https://discord.com/api/webhooks/0123456789/abcdefghijklmnopqrstuvwxyz @@ -30,6 +30,5 @@ Contents .. toctree:: - Home installation usage diff --git a/docs/source/installation.rst b/docs/source/installation.rst index 31bfa81..69c2cf8 100644 --- a/docs/source/installation.rst +++ b/docs/source/installation.rst @@ -10,13 +10,13 @@ The recommended way to install is using `pip `_. To install: -.. code-block:: console +.. code:: console $ pip install instawebhooks To upgrade to its latest release: -.. code-block:: console +.. code:: console $ pip install --upgrade instawebhooks @@ -66,24 +66,24 @@ Installing from source code is another option to contribute or use the latest de 1. `Clone the repository `_ onto your machine -.. code-block:: console +.. code:: console $ git clone https://github.com/RyanLua/InstaWebhooks.git 2. Navigate to the repository's directory -.. code-block:: console +.. code:: console $ cd InstaWebhooks 3. Install the required packages that InstaWebhooks uses: -.. code-block:: console +.. code:: console $ pip install -r requirements.txt 4. Enter `Development Mode `_: -.. code-block:: console +.. code:: console $ pip install --editable . \ No newline at end of file diff --git a/docs/source/usage.rst b/docs/source/usage.rst index 71358de..9470763 100644 --- a/docs/source/usage.rst +++ b/docs/source/usage.rst @@ -1,12 +1,34 @@ Usage ===== -Usage is simple once you have everything installed, just run the script with the Instagram username you want to monitor and the Discord webhook URL you want to send new posts to. +To see the available options and arguments, run the following command: -.. code-block:: console +.. code:: console - $ instawebhooks - usage: instawebhooks [-h] [-v] [-i REFRESH_INTERVAL] [-c MESSAGE_CONTENT] [-e] [--version] instagram_username discord_webhook_url + $ instawebhooks --help + usage: instawebhooks [-h] [-q | -v] [-i REFRESH_INTERVAL] [-c MESSAGE_CONTENT] [-e] [--version] + instagram_username discord_webhook_url + + Monitor Instagram accounts for new posts and send them to a Discord webhook + + positional arguments: + instagram_username the Instagram username to monitor for new posts + discord_webhook_url the Discord webhook URL to send new posts to + + options: + -h, --help show this help message and exit + -q, --quiet hide all logging + -v, --verbose show debug logging + -i REFRESH_INTERVAL, --refresh-interval REFRESH_INTERVAL + time in seconds to wait before checking for new posts again + -c MESSAGE_CONTENT, --message-content MESSAGE_CONTENT + the message content to send with the webhook + -e, --no-embed don't show the post embed and only send message content + --version show program's version number and exit + + https://github.com/RaenLua/InstaWebhooks + +Below, learn how to use InstaWebhooks and what you can do with it. Examples -------- @@ -15,46 +37,48 @@ In the below templates, replace ```` with the Instagram user Your command should look similar to this: -.. code-block:: console +.. code:: console - instawebhooks raenlua https://discord.com/api/webhooks/0123456789/abcdefghijklmnopqrstuvwxyz + $ instawebhooks raenlua https://discord.com/api/webhooks/0123456789/abcdefghijklmnopqrstuvwxyz Templates --------- +Example templates for using InstaWebhooks are provided below. Note to change the Instagram username and Discord webhook URL to your own. + .. note:: The default refresh interval is 1 hour (3600 seconds), and the default message content is an empty string. Send new posts every hour: -.. code-block:: console +.. code:: console - instawebhooks + $ instawebhooks Send new posts every hour with verbose logging: -.. code-block:: console +.. code:: console - instawebhooks -v + $ instawebhooks -v Send new posts every 30 minutes: -.. code-block:: console +.. code:: console - instawebhooks -i 1800 + $ instawebhooks -i 1800 Send new posts every hour with a custom message: -.. code-block:: console +.. code:: console - instawebhooks -c "New post from {owner_name}: {post_url}" + $ instawebhooks -c "New post from {owner_name}: {post_url}" Send new posts every hour with no embed and a custom message: -.. code-block:: console +.. code:: console - instawebhooks -e -c "New post from {owner_name}: {post_url}" + $ instawebhooks -e -c "New post from {owner_name}: {post_url}" Reference ---------