Skip to content

Commit 3893dc5

Browse files
committed
docs: add getting started documentation
1 parent 8d4c188 commit 3893dc5

7 files changed

+95
-12
lines changed

docs/requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
sphinx==7.2.6
2-
sphinx_rtd_theme==1.3.0
2+
sphinx_rtd_theme==2.0.0
33
readthedocs-sphinx-search==0.3.2
44
jinja2==3.1.3

docs/source/conf.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66

77
# -- Project information -----------------------------------------------------
88

9-
project = 'Project name'
10-
copyright = '2023, Person writing this'
11-
author = 'Person writing this'
9+
project = 'Facedancer'
10+
copyright = '2023, Great Scott Gadgets'
11+
author = 'Great Scott Gadget'
1212

1313
version = ''
1414
release = ''
@@ -24,7 +24,7 @@
2424
exclude_patterns = ['_build']
2525
source_suffix = '.rst'
2626
master_doc = 'index'
27-
language = None
27+
language = "en"
2828
exclude_patterns = []
2929
pygments_style = None
3030

docs/source/documentation_intro.rst

-3
This file was deleted.

docs/source/getting_started.rst

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
================================================
2+
Getting started with Facedancer
3+
================================================
4+
5+
6+
Install the Facedancer library
7+
------------------------------
8+
9+
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/>`__.
10+
11+
12+
Install From PyPI
13+
^^^^^^^^^^^^^^^^^
14+
15+
You can use the `pip <https://pypi.org/project/pip/>`__ tool to install the Facedancer library from PyPI using the following command:
16+
17+
.. code-block :: sh
18+
19+
pip install facedancer
20+
21+
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.
22+
23+
24+
Install From Source
25+
^^^^^^^^^^^^^^^^^^^
26+
27+
.. code-block :: sh
28+
29+
git clone https://github.com/greatscottgadgets/facedancer.git
30+
cd facedancer/
31+
32+
Once you have the source code downloaded you can install the Facedancer library with:
33+
34+
.. code-block :: sh
35+
36+
pip install .
37+
38+
39+
40+
Run a Facedancer example
41+
------------------------
42+
43+
Create a new Python file called `rubber-ducky.py` with the following content:
44+
45+
.. code-block :: python
46+
47+
import asyncio
48+
import logging
49+
50+
from facedancer import main
51+
from facedancer.devices.keyboard import USBKeyboardDevice
52+
from facedancer.classes.hid.keyboard import KeyboardModifiers
53+
54+
device = USBKeyboardDevice()
55+
56+
async def type_letters():
57+
await asyncio.sleep(2)
58+
await device.type_string("echo hello, facedancer\n")
59+
60+
main(device, type_letters())
61+
62+
63+
64+
Open a terminal and run:
65+
66+
.. code-block :: sh
67+
68+
python ./rubber-ducky.py
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
================================================
2+
How to write a new Facedancer backend
3+
================================================

docs/source/index.rst

+16-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
1-
======================
2-
Documentation
3-
======================
1+
========================
2+
Facedancer Documentation
3+
========================
44

55
.. toctree::
66
:maxdepth: 2
77
:caption: User Documentation
88

9-
documentation_intro
9+
getting_started
10+
11+
.. toctree::
12+
:maxdepth: 2
13+
:caption: Library Documentation
14+
15+
library_overview
16+
17+
.. toctree::
18+
:maxdepth: 2
19+
:caption: Developer Documentation
20+
21+
howto_facedancer_backend

docs/source/library_overview.rst

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
================================================
2+
Overview
3+
================================================

0 commit comments

Comments
 (0)