summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorEugene Triguba <eugenetriguba@gmail.com>2020-07-13 19:54:53 -0500
committerEugene Triguba <eugenetriguba@gmail.com>2020-07-13 19:54:53 -0500
commit22a54c83c0684bc1132242d7d35c9ec13afb210c (patch)
tree3bd362c061f9fe68340e91e8244f197623322cc2 /docs
parentChange version back to 0.0.0 (diff)
downloadlirc-22a54c83c0684bc1132242d7d35c9ec13afb210c.zip
Add starter usage docs and remove using lirc on macos & windows
Diffstat (limited to 'docs')
-rw-r--r--docs/source/index.rst2
-rw-r--r--docs/source/installation.rst4
-rw-r--r--docs/source/usage.rst38
-rw-r--r--docs/source/using-lirc-on-macos.rst2
-rw-r--r--docs/source/using-lirc-on-windows.rst2
5 files changed, 39 insertions, 9 deletions
diff --git a/docs/source/index.rst b/docs/source/index.rst
index 7ece83e..26e504c 100644
--- a/docs/source/index.rst
+++ b/docs/source/index.rst
@@ -16,8 +16,6 @@ Site Documentation
:maxdepth: 2
usage
- using-lirc-on-windows
- using-lirc-on-macos
.. toctree::
:caption: Reference
diff --git a/docs/source/installation.rst b/docs/source/installation.rst
index 31d6fb7..3f74864 100644
--- a/docs/source/installation.rst
+++ b/docs/source/installation.rst
@@ -38,7 +38,7 @@ Windows:
It works a bit differently since it is just a collection of files
in a folder that you run so you'll have to adjust the ``socket``
and ``socket_path`` parameter. More information on that can be found
- at `Using LIRC on Windows <./using-lirc-on-windows.html>`_.
+ at `using LIRC on Windows <./using-lirc-on-windows.html>`_.
macOS:
@@ -47,5 +47,5 @@ macOS:
it doesn't appear to be maintained any longer and is not the latest LIRC version.
You can then run ``port install lirc`` or build the package from source using
the instructions on the README of the GitHub repository. See
- `Using LIRC on macOS <./using-lirc-on-macos.html>`_ for more information on
+ `using LIRC on macOS <./using-lirc-on-macos.html>`_ for more information on
getting LIRC setup on macOS and how to use this python package with it. \ No newline at end of file
diff --git a/docs/source/usage.rst b/docs/source/usage.rst
index 9fa12ad..588d2f7 100644
--- a/docs/source/usage.rst
+++ b/docs/source/usage.rst
@@ -1,2 +1,38 @@
Usage
-===== \ No newline at end of file
+=====
+
+Once you've installed the ``lirc`` python package, there will be a number
+of things you can now import from it to get started.
+
+.. code-block:: python
+
+ from lirc import (
+ Lirc,
+ LircResponse,
+ LircError,
+ LircSocketError,
+ LircSocketTimeoutError,
+ InvalidReplyPacketFormatError
+ )
+
+The most relevant of these is ``Lirc``, since this is the main class
+you will be using.
+
+Initializing Lirc
+-----------------
+
+The ``Lirc`` class takes in three separate options, which all have default
+values, that we may pass into it to construct it and override those default
+values.
+
+The simplest way to construct ``Lirc`` is with no arguments at all.
+
+.. code-block:: python
+
+ from lirc import Lirc
+
+ lirc = Lirc()
+
+This will attempt to connect to the lircd socket at "/var/run/lirc/lircd" on
+your system, create a socket using ``AF_UNIX`` and ``SOCK_STREAM``, and sets
+a socket timeout of 5 seconds. \ No newline at end of file
diff --git a/docs/source/using-lirc-on-macos.rst b/docs/source/using-lirc-on-macos.rst
deleted file mode 100644
index faf5724..0000000
--- a/docs/source/using-lirc-on-macos.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Using LIRC on macOS
-=================== \ No newline at end of file
diff --git a/docs/source/using-lirc-on-windows.rst b/docs/source/using-lirc-on-windows.rst
deleted file mode 100644
index 1de244a..0000000
--- a/docs/source/using-lirc-on-windows.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Using LIRC on Windows
-===================== \ No newline at end of file