Skip to content

Commit

Permalink
📝 add documentation pages made with sphinx
Browse files Browse the repository at this point in the history
  • Loading branch information
jorge-jrzz committed Jun 25, 2024
1 parent f16006f commit e626a2d
Show file tree
Hide file tree
Showing 10 changed files with 236 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
Binary file added docs/_static/dark_logo_pynani.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/wite_logo_pynani.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 56 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'Pynani'
copyright = '2024, Jorge Juarez'
author = 'Jorge Juarez'
release = '1.3.0'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = [
'sphinx.ext.autosectionlabel',
'sphinx.ext.autodoc',
"sphinx.ext.autosummary",
"sphinx.ext.napoleon",
"sphinx_copybutton",
]

templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']



# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'sphinx_book_theme'
html_logo = "_static/dark_logo_pynani.png"

html_static_path = ['_static']
html_theme_options = {
"logo": {
"image_dark": "_static/wite_logo_pynani.png",
},
"icon_links": [
{
"name": "GitHub",
"url": "https://github.com/jorge-jrzz/Pynani",
"icon": "fa-brands fa-github",
},
{
"name": "PyPI",
"url": "https://pypi.org/project/pynani/",
"icon": "https://img.shields.io/pypi/v/pynani",
"type": "url",
},
],
}

locale_dirs = ["locales/"]
31 changes: 31 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
.. Pynani documentation master file, created by
sphinx-quickstart on Mon Jun 24 23:16:41 2024.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to Pynani's documentation!
==================================

.. meta::
:description: Official documentation of Pynani
:keywords: python, Messenger, pynani, documentation, guide


Pynani is a Python package that provides a simple way to interact with the `Facebook Messenger API <https://developers.facebook.com/docs/messenger-platform>`_.


Content
--------
.. toctree::

install
quick_start
messenger
utils

Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
43 changes: 43 additions & 0 deletions docs/install.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
==================
Installation Guide
==================

.. meta::
:description: Installation of Pynani
:keywords: python, Messenger, pynani, documentation, guide


Using PIP
----------
.. code-block:: bash
$ pip install pynani
Using pipenv
------------
.. code-block:: bash
$ pipenv install pynani
By cloning repository
---------------------
.. code-block:: bash
$ git clone https://github.com/jorge-jrzz/Pynani.git
$ cd Pynani
$ pip install .
Directly using pip
~~~~~~~~~~~~~~~~~~
.. code-block:: bash
$ pip install git+https://github.com/jorge-jrzz/Pynani.git
It is generally recommended to use the first option.

While the API is production-ready, it is still under development and it has regular updates, do not forget to update it regularly by calling:

.. code-block:: bash
$ pip install pynani --upgrade
35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)

if "%1" == "" goto help

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
8 changes: 8 additions & 0 deletions docs/messenger.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Messenger class
===============

.. automodule:: pynani.Messenger
:members:
:undoc-members:
:show-inheritance:

13 changes: 13 additions & 0 deletions docs/quick_start.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

===========
Quick start
===========

.. meta::
:description: Quick start guide for pynani
:keywords: python, Messenger, pynani, quickstart, guide

Synchronous Messenger
----------------------
.. literalinclude:: ../examples/echo_bot.py
:language: python
30 changes: 30 additions & 0 deletions docs/utils.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
utils package
====================

Submodules
----------

buttons module
~~~~~~~~~~~~~~~

.. automodule:: pynani.utils.buttons
:members:
:undoc-members:
:show-inheritance:

quick\_reply module
~~~~~~~~~~~~~~~~~~~~

.. automodule:: pynani.utils.quick_reply
:members:
:undoc-members:
:show-inheritance:

receipt module
~~~~~~~~~~~~~~~

.. automodule:: pynani.utils.receipt
:members:
:undoc-members:
:show-inheritance:

0 comments on commit e626a2d

Please sign in to comment.