Skip to content

Commit

Permalink
docs: add getting started documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinevg committed Jan 29, 2024
1 parent 8d4c188 commit bb23d98
Show file tree
Hide file tree
Showing 7 changed files with 95 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
sphinx==7.2.6
sphinx_rtd_theme==1.3.0
sphinx_rtd_theme==2.0.0
readthedocs-sphinx-search==0.3.2
jinja2==3.1.3
8 changes: 4 additions & 4 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

# -- Project information -----------------------------------------------------

project = 'Project name'
copyright = '2023, Person writing this'
author = 'Person writing this'
project = 'Facedancer'
copyright = '2023, Great Scott Gadgets'
author = 'Great Scott Gadget'

version = ''
release = ''
Expand All @@ -24,7 +24,7 @@
exclude_patterns = ['_build']
source_suffix = '.rst'
master_doc = 'index'
language = None
language = "en"
exclude_patterns = []
pygments_style = None

Expand Down
3 changes: 0 additions & 3 deletions docs/source/documentation_intro.rst

This file was deleted.

68 changes: 68 additions & 0 deletions docs/source/getting_started.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
================================================
Getting started with Facedancer
================================================


Install the Facedancer library
------------------------------

You can install the Facedancer library from the `Python Package Index (PyPI) <https://pypi.org/project/facedancer/>`__, a `release archive <https://github.com/greatscottgadgets/Facedancer/releases>`__ or directly from `source <https://github.com/greatscottgadgets/Facedancer/>`__.


Install From PyPI
^^^^^^^^^^^^^^^^^

You can use the `pip <https://pypi.org/project/pip/>`__ tool to install the Facedancer library from PyPI using the following command:

.. code-block :: sh
pip install facedancer
For more information on installing Python packages from PyPI please refer to the `"Installing Packages" <https://packaging.python.org/en/latest/tutorials/installing-packages/>`__ section of the Python Packaging User Guide.


Install From Source
^^^^^^^^^^^^^^^^^^^

.. code-block :: sh
git clone https://github.com/greatscottgadgets/facedancer.git
cd facedancer/
Once you have the source code downloaded you can install the Facedancer library with:

.. code-block :: sh
pip install .
Run a Facedancer example
------------------------

Create a new Python file called `rubber-ducky.py` with the following content:

.. code-block :: python
import asyncio
import logging
from facedancer import main
from facedancer.devices.keyboard import USBKeyboardDevice
from facedancer.classes.hid.keyboard import KeyboardModifiers
device = USBKeyboardDevice()
async def type_letters():
await asyncio.sleep(2)
await device.type_string("echo hello, facedancer\n")
main(device, type_letters())
Open a terminal and run:

.. code-block :: sh
python ./rubber-ducky.py
3 changes: 3 additions & 0 deletions docs/source/howto_facedancer_backend.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
================================================
How to write a new Facedancer backend
================================================
20 changes: 16 additions & 4 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
======================
Documentation
======================
========================
Facedancer Documentation
========================

.. toctree::
:maxdepth: 2
:caption: User Documentation

documentation_intro
getting_started

.. toctree::
:maxdepth: 2
:caption: Library Documentation

library_overview

.. toctree::
:maxdepth: 2
:caption: Developer Documentation

howto_facedancer_backend
3 changes: 3 additions & 0 deletions docs/source/library_overview.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
================================================
Facedancer Library Overview
================================================

0 comments on commit bb23d98

Please sign in to comment.