Skip to content

Commit 9efcea9

Browse files
committed
updated README
1 parent 94afb48 commit 9efcea9

File tree

1 file changed

+52
-8
lines changed

1 file changed

+52
-8
lines changed

README.rst

Lines changed: 52 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@ Introduction
66
:target: https://circuitpython.readthedocs.io/projects/rtttl/en/latest/
77
:alt: Documentation Status
88

9-
.. image :: https://badges.gitter.im/adafruit/circuitpython.svg
10-
:target: https://gitter.im/adafruit/circuitpython?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge
11-
:alt: Gitter
9+
.. image :: https://img.shields.io/discord/327254708534116352.svg
10+
:target: https://discord.gg/nBQh6qu
11+
:alt: Discord
12+
13+
.. image:: https://travis-ci.org/adafruit/Adafruit_CircuitPython_RTTTL.svg?branch=master
14+
:target: https://travis-ci.org/adafruit/Adafruit_CircuitPython_RTTTL
15+
:alt: Build Status
1216

1317
This plays `RTTTL <https://en.wikipedia.org/wiki/Ring_Tone_Transfer_Language>`_ melodies.
1418

@@ -42,10 +46,50 @@ Contributions are welcome! Please read our `Code of Conduct
4246
<https://github.com/adafruit/Adafruit_CircuitPython_rtttl/blob/master/CODE_OF_CONDUCT.md>`_
4347
before contributing to help this project stay welcoming.
4448

45-
API Reference
46-
=============
49+
Building locally
50+
================
51+
52+
To build this library locally you'll need to install the
53+
`circuitpython-build-tools <https://github.com/adafruit/circuitpython-build-tools>`_ package.
54+
55+
.. code-block:: shell
56+
57+
python3 -m venv .env
58+
source .env/bin/activate
59+
pip install circuitpython-build-tools
60+
61+
Once installed, make sure you are in the virtual environment:
62+
63+
.. code-block:: shell
64+
65+
source .env/bin/activate
66+
67+
Then run the build:
68+
69+
.. code-block:: shell
70+
71+
circuitpython-build-bundles --filename_prefix adafruit-circuitpython-rtttl --library_location .
72+
73+
Sphinx documentation
74+
-----------------------
75+
76+
Sphinx is used to build the documentation based on rST files and comments in the code. First,
77+
install dependencies (feel free to reuse the virtual environment from above):
78+
79+
.. code-block:: shell
80+
81+
python3 -m venv .env
82+
source .env/bin/activate
83+
pip install Sphinx sphinx-rtd-theme
84+
85+
Now, once you have the virtual environment activated:
86+
87+
.. code-block:: shell
88+
89+
cd docs
90+
sphinx-build -E -W -b html . _build/html
4791
48-
.. toctree::
49-
:maxdepth: 2
92+
This will output the documentation to ``docs/_build/html``. Open the index.html in your browser to
93+
view them. It will also (due to -W) error out on any warning like Travis will. This is a good way to
94+
locally verify it will pass.
5095

51-
api

0 commit comments

Comments
 (0)