From 8874f7073771d9f2cb9debdbb6f2a22582d2f3b7 Mon Sep 17 00:00:00 2001 From: nwunderly <48489521+nwunderly@users.noreply.github.com> Date: Sat, 21 Nov 2020 16:43:08 -0500 Subject: [PATCH] Update docs --- docs/apod.rst | 9 ++++++--- docs/index.rst | 15 +++++++++++---- docs/insight.rst | 3 ++- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/docs/apod.rst b/docs/apod.rst index 6f5c0db..c2913e1 100644 --- a/docs/apod.rst +++ b/docs/apod.rst @@ -32,12 +32,13 @@ Data Class .. autoclass:: AstronomyPicture :members: -Example Script +Example Code -------------- + This is a simple script that will return the title, explanation, and url from the most recent Astronomy Picture of the Day page, then download and save the image. -.. code:: python +.. code-block:: python :linenos: import asyncio @@ -53,7 +54,9 @@ then download and save the image. CLI Example ----------- + This command, like the above python script, will print data returned by the APOD API, then download and save the image. -.. code:: sh +.. code-block:: sh + python3 -m aionasa.apod --print --download . diff --git a/docs/index.rst b/docs/index.rst index 4c2196b..6cea420 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -23,7 +23,9 @@ Installing ---------- aionasa can be installed from pypi with the command: -.. code:: sh + +.. code-block:: sh + # Linux python3 -m pip install -U aionasa @@ -32,7 +34,9 @@ aionasa can be installed from pypi with the command: To install the development version of the library directly from source: -.. code:: sh + +.. code-block:: sh + $ git clone https://github.com/nwunderly/aionasa $ cd aionasa $ python3 -m pip install -U . @@ -42,11 +46,14 @@ Quickstart ----------- We'll be using IPython because it supports `await` expressions directly from the console. -.. code:: sh + +.. code-block:: sh + $ pip install aionasa ipython $ ipython -.. code:: python +.. code-block:: python + from aionasa import APOD, InSight async with APOD() as apod: diff --git a/docs/insight.rst b/docs/insight.rst index b1ee57d..47bae34 100644 --- a/docs/insight.rst +++ b/docs/insight.rst @@ -19,7 +19,8 @@ Client Example Code ------------ -.. code:: python + +.. code-block:: python :linenos: import asyncio