summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorEugene Triguba <eugenetriguba@gmail.com>2020-07-12 19:44:52 -0500
committerEugene Triguba <eugenetriguba@gmail.com>2020-07-12 19:44:52 -0500
commit32991facadab05d58bfef52ea871b22ef46f54f0 (patch)
treee656b388658f4cd3c9bed0ac533beb6977edee65 /README.md
parentRemove readthedocs config (diff)
downloadlirc-32991facadab05d58bfef52ea871b22ef46f54f0.zip
Update docstrings in `Lirc` and add to readme
Diffstat (limited to 'README.md')
-rw-r--r--README.md61
1 files changed, 60 insertions, 1 deletions
diff --git a/README.md b/README.md
index ec0556a..444ef4e 100644
--- a/README.md
+++ b/README.md
@@ -7,4 +7,63 @@
[![Black](https://img.shields.io/badge/style-black-black)](https://pypi.org/project/black/)
[![Documentation Status](https://readthedocs.org/projects/lirc/badge/?version=latest)](https://lirc.readthedocs.io/en/latest/?badge=latest)
[![Build Status](https://github.com/eugenetriguba/lirc/workflows/python%20package%20ci/badge.svg?branch=master)](https://github.com/eugenetriguba/lirc/actions/)
-[![Codecov](https://codecov.io/gh/eugenetriguba/lirc/graph/badge.svg)](https://codecov.io/gh/eugenetriguba/lirc) \ No newline at end of file
+[![Codecov](https://codecov.io/gh/eugenetriguba/lirc/graph/badge.svg)](https://codecov.io/gh/eugenetriguba/lirc)
+
+LIRC is a python package that allows you to interact with
+the daemon in the Linux Infrared Remote Control package.
+
+More information on the lircd daemon, socket interface,
+reply packet format, etc. can be found at https://www.lirc.org/html/lircd.html
+
+## Installation
+
+The package is hosted on PyPI and can be installed
+through pip.
+
+```
+$ pip install lirc
+```
+
+However since this is a wrapper around the LIRC daemon, it
+is expected that LIRC is installed and setup on the given
+system.
+
+## Usage
+
+```python
+from lirc import Lirc
+
+lirc = Lirc()
+response = lirc.version()
+
+print(response.command)
+>>> 'VERSION'
+print(response.success)
+>>> True
+print(response.data)
+>>> ['0.10.1']
+```
+
+To get started with the package, we import `Lirc` and can
+initialize it with the defaults by passing it no arguments.
+
+This will assume a socket path of `/var/run/lirc/lircd`.
+Furthermore, this will also then assume a socket connection
+using AF_UNIX and SOCK_STREAM. These are both the defaults
+that should work on a Linux system. There are ports of LIRC
+to Windows and macOS but using the package there is far less
+common. However, both of these are configurable through options
+passed to `Lirc` to allow it to be used on those operating systems
+as well.
+
+After sending any command to the LIRC daemon, this package will create
+a `LircResponse` for us that it returns. That response contains the
+command we sent to LIRC, whether it was successful, and any data that
+was returned back to us.
+
+Further documentation and a full API specification is available at
+https://lirc.readthedocs.org
+
+## License
+
+The [MIT](./LICENSE) License \ No newline at end of file