first pass at getting our examples into readthedocs

pull/982/head
Jesse Vincent 4 years ago
parent c8d53d2348
commit 047a5b7c04
No known key found for this signature in database
GPG Key ID: 122F5DF7108E4046

@ -0,0 +1,11 @@
#!/bin/sh
export EXAMPLE=$1
export EXNAME=`echo ${EXAMPLE} |cut -c 3-`
cd examples; \
install -d dirname ${EXAMPLE}
echo "# ${EXNAME}\n\`\`\` c++\n" > ${EXAMPLE}.md
cat ../../examples/${EXAMPLE} >> ${EXAMPLE}.md
echo "\n\`\`\`" >> ${EXAMPLE}.md

1
docs/.gitignore vendored

@ -0,0 +1 @@
examples/

@ -12,13 +12,22 @@ BUILDDIR = ../out/docs
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile clean
.PHONY: help Makefile clean examples
clean:
rm -rf doxyoutput/ api/
@$(SPHINXBUILD) -M clean "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
examples:
install -d examples
(cd ../examples; \
find . -type f \( -name \*ino -or -name \*h -or -name \*cpp \) \
) | \
xargs -n 1 -I % ../bin/docs/example-to-doc %
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
%: Makefile examples
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

@ -9,5 +9,5 @@ All example sketches
:maxdepth: 8
:glob:
generated/examples/**/*.ino
examples/**

@ -66,4 +66,4 @@ The extension provides an `ColormapEffect` singleton object, with a single metho
Starting from the [example][plugin:example] is the recommended way of getting
started with the plugin.
[plugin:example]: ../../examples/LEDs/Colormap/Colormap.ino
[plugin:example]: /examples/LEDs/Colormap/Colormap.ino

@ -96,4 +96,4 @@ method explained below.
Starting from the [example][plugin:example] is the recommended way of getting
started with the plugin.
[plugin:example]: ../../examples/Keystrokes/Cycle/Cycle.ino
[plugin:example]: /examples/Keystrokes/Cycle/Cycle.ino

@ -50,4 +50,4 @@ property. All times are in milliseconds.
Starting from the [example][plugin:example] is the recommended way of getting
started with the plugin.
[plugin:example]: ../../examples/Features/CycleTimeReport/CycleTimeReport.ino
[plugin:example]: /examples/Features/CycleTimeReport/CycleTimeReport.ino

@ -121,4 +121,4 @@ in turn provides the following command:
Starting from the [example][plugin:example] is the recommended way of getting
started with the plugin.
[plugin:example]: ../../examples/Features/EEPROM/EEPROM-Keymap-Programmer/EEPROM-Keymap-Programmer.ino
[plugin:example]: /examples/Features/EEPROM/EEPROM-Keymap-Programmer/EEPROM-Keymap-Programmer.ino

@ -68,4 +68,4 @@ The plugin provides three Focus commands: `keymap.default`, `keymap.custom`, and
Starting from the [example][plugin:example] is the recommended way of getting started with the plugin.
[plugin:example]: ../../examples/Features/EEPROM/EEPROM-Keymap/EEPROM-Keymap.ino
[plugin:example]: /examples/Features/EEPROM/EEPROM-Keymap/EEPROM-Keymap.ino

@ -181,4 +181,4 @@ following commands:
Starting from the [example][plugin:example] is the recommended way of getting
started with the plugin.
[plugin:example]: ../../examples/Features/EEPROM/EEPROM-Settings/EEPROM-Settings.ino
[plugin:example]: /examples/Features/EEPROM/EEPROM-Settings/EEPROM-Settings.ino

@ -38,4 +38,4 @@ The plugin provides the `EscapeOneShot` object, which has no public methods.
Starting from the [example][plugin:example] is the recommended way of getting
started with the plugin.
[plugin:example]: ../../examples/Keystrokes/Escape-OneShot/Escape-OneShot.ino
[plugin:example]: /examples/Keystrokes/Escape-OneShot/Escape-OneShot.ino

@ -59,4 +59,4 @@ The plugin provides the `FingerPainter` object, which provides no public methods
Starting from the [example][plugin:example] is the recommended way of getting
started with the plugin.
[plugin:example]: ../../examples/LEDs/FingerPainter/FingerPainter.ino
[plugin:example]: /examples/LEDs/FingerPainter/FingerPainter.ino

@ -123,4 +123,4 @@ the keyboard responds.
Starting from the [example][plugin:example] is the recommended way of getting started with the plugin.
[plugin:example]: ../../examples/Features/FocusSerial/FocusSerial.ino
[plugin:example]: /examples/Features/FocusSerial/FocusSerial.ino

@ -74,4 +74,4 @@ methods and properties:
Starting from the [example][plugin:example] is the recommended way of getting
started with the plugin.
[plugin:example]: ../../examples/Features/GhostInTheFirmware/GhostInTheFirmware.ino
[plugin:example]: /examples/Features/GhostInTheFirmware/GhostInTheFirmware.ino

@ -86,4 +86,4 @@ and properties:
Starting from the [example][plugin:example] is the recommended way of getting
started with the plugin.
[plugin:example]: ../../examples/LEDs/Heatmap/Heatmap.ino
[plugin:example]: /examples/LEDs/Heatmap/Heatmap.ino

@ -81,4 +81,4 @@ provides the `hostos.type` Focus command.
Starting from the [example][plugin:example] is the recommended way of getting
started with the extension.
[plugin:example]: ../../examples/Features/HostOS/HostOS.ino
[plugin:example]: /examples/Features/HostOS/HostOS.ino

@ -44,7 +44,7 @@ The plugin provides the `HostPowerManagement` object, with no public methods.
Starting from the [example][plugin:example] is the recommended way of getting
started with the plugin.
[plugin:example]: ../../examples/Features/HostPowerManagement/HostPowerManagement.ino
[plugin:example]: /examples/Features/HostPowerManagement/HostPowerManagement.ino
## Caveats

@ -120,4 +120,4 @@ the `PersistentIdleLEDs` variant:
Starting from the [example][plugin:example] is the recommended way of getting
started with the plugin.
[plugin:example]: ../../examples/LEDs/IdleLEDs/IdleLEDs.ino
[plugin:example]: /examples/LEDs/IdleLEDs/IdleLEDs.ino

@ -50,4 +50,4 @@ method:
Starting from the [example][plugin:example] is the recommended way of getting
started with the plugin.
[plugin:example]: ../../examples/LEDs/LED-ActiveLayerColor/LED-ActiveLayerColor.ino
[plugin:example]: /examples/LEDs/LED-ActiveLayerColor/LED-ActiveLayerColor.ino

@ -61,4 +61,4 @@ The `ActiveModColorEffect` object provides the following methods:
Starting from the [example][plugin:example] is the recommended way of getting
started with the plugin.
[plugin:example]: ../../examples/LEDs/LED-ActiveModColor/LED-ActiveModColor.ino
[plugin:example]: /examples/LEDs/LED-ActiveModColor/LED-ActiveModColor.ino

@ -99,4 +99,4 @@ been an exaggeration, there is only one as of this writing:
Starting from the [example][plugin:example] is the recommended way of getting
started with the plugin.
[plugin:example]: ../../examples/LEDs/LED-AlphaSquare/LED-AlphaSquare.ino
[plugin:example]: /examples/LEDs/LED-AlphaSquare/LED-AlphaSquare.ino

@ -125,4 +125,4 @@ The plugin provides the `LEDPaletteTheme` object, which has the following method
Starting from the [example][plugin:example] is the recommended way of getting
started with the plugin.
[plugin:example]: ../../examples/LEDs/LED-Palette-Theme/LED-Palette-Theme.ino
[plugin:example]: /examples/LEDs/LED-Palette-Theme/LED-Palette-Theme.ino

@ -87,4 +87,4 @@ The plugin provides the following effects:
Starting from the [example][plugin:example] is the recommended way of getting
started with the plugin.
[plugin:example]: ../../examples/LEDs/LED-Stalker/LED-Stalker.ino
[plugin:example]: /examples/LEDs/LED-Stalker/LED-Stalker.ino

@ -58,4 +58,4 @@ properties:
Starting from the [example][plugin:example] is the recommended way of getting
started with the plugin.
[plugin:example]: ../../examples/LEDS/LED-Wavepool/LED-Wavepool.ino
[plugin:example]: /examples/LEDS/LED-Wavepool/LED-Wavepool.ino

@ -68,4 +68,4 @@ The plugin provides a single method on each of the included effect objects:
Starting from the [example][plugin:example] is the recommended way of getting
started with the plugin.
[plugin:example]: ../../examples/LEDs/LEDEffects/LEDEffects.ino
[plugin:example]: /examples/LEDs/LEDEffects/LEDEffects.ino

@ -97,4 +97,4 @@ The plugin provides the `Leader` object, with the following methods and properti
Starting from the [example][plugin:example] is the recommended way of getting
started with the plugin.
[plugin:example]: ../../examples/Keystrokes/Leader/Leader.ino
[plugin:example]: /examples/Keystrokes/Leader/Leader.ino

@ -67,4 +67,4 @@ started with the plugin.
![rxcy layout](../hardware-devices/keyboardio/model01/model01_coordinates.png)
[plugin:example]: ../../examples/Keystrokes/MagicCombo/MagicCombo.ino
[plugin:example]: /examples/Keystrokes/MagicCombo/MagicCombo.ino

@ -202,4 +202,4 @@ properties too:
Starting from the [example][plugin:example] is the recommended way of getting
started with the plugin.
[plugin:example]: ../../examples/Keystrokes/OneShot/OneShot.ino
[plugin:example]: /examples/Keystrokes/OneShot/OneShot.ino

@ -237,4 +237,4 @@ keycodes.
The [example][plugin:example] can help to learn how to use this plugin.
[plugin:example]: ../../examples/Keystrokes/Qukeys/Qukeys.ino
[plugin:example]: /examples/Keystrokes/Qukeys/Qukeys.ino

@ -44,4 +44,4 @@ void setup() {
Starting from the [example][plugin:example] is the recommended way of getting
started with the plugin.
[plugin:example]: ../../examples/Keystrokes/Redial/Redial.ino
[plugin:example]: /examples/Keystrokes/Redial/Redial.ino

@ -58,4 +58,4 @@ properties:
Starting from the [example][plugin:example] is the recommended way of getting
started with the plugin.
[plugin:example]: ../../examples/Keystrokes/ShapeShifter/ShapeShifter.ino
[plugin:example]: /examples/Keystrokes/ShapeShifter/ShapeShifter.ino

@ -154,4 +154,4 @@ properties:
Starting from the [example][plugin:example] is the recommended way of getting
started with the plugin.
[plugin:example]: ../../examples/Keystrokes/SpaceCadet/SpaceCadet.ino
[plugin:example]: /examples/Keystrokes/SpaceCadet/SpaceCadet.ino

@ -93,4 +93,4 @@ The plugin provides a `GeminiPR` object, with no public methods or properties.
Starting from the [example][plugin:example] is the recommended way of getting
started with the plugin.
[plugin:example]: ../../examples/Features/Steno/Steno.ino
[plugin:example]: /examples/Features/Steno/Steno.ino

@ -93,4 +93,4 @@ methods outside of the object, however, that can be overridden:
Starting from the [example][plugin:example] is the recommended way of getting
started with the plugin.
[plugin:example]: ../../examples/Keystrokes/Syster/Syster.ino
[plugin:example]: /examples/Keystrokes/Syster/Syster.ino

@ -143,4 +143,4 @@ property only:
Starting from the [example][plugin:example] is the recommended way of getting
started with the plugin.
[plugin:example]: ../../examples/Keystrokes/TapDance/TapDance.ino
[plugin:example]: /examples/Keystrokes/TapDance/TapDance.ino

@ -48,4 +48,4 @@ The plugin provides the `TopsyTurvy` object, without any public methods or prope
Starting from the [example][plugin:example] is the recommended way of getting
started with the plugin.
[plugin:example]: ../../examples/Keystrokes/TopsyTurvy/TopsyTurvy.ino
[plugin:example]: /examples/Keystrokes/TopsyTurvy/TopsyTurvy.ino

@ -80,4 +80,4 @@ The `Turbo` object has the following user-configurable properties:
Starting from the [example][plugin:example] is the recommended way of getting
started with the plugin.
[plugin:example]: ../../examples/Keystrokes/Turbo/Turbo.ino
[plugin:example]: /examples/Keystrokes/Turbo/Turbo.ino

@ -105,4 +105,4 @@ properties. All times are in seconds.
Starting from the [example][plugin:example] is the recommended way of getting
started with the plugin.
[plugin:example]: ../../examples/Features/TypingBreaks/TypingBreaks.ino
[plugin:example]: /examples/Features/TypingBreaks/TypingBreaks.ino

@ -121,4 +121,4 @@ the `+` button, selecting it from the list, then setting it as the active input
Starting from the [example][plugin:example] is the recommended way of getting
started with the plugin.
[plugin:example]: ../../examples/Keystrokes/Unicode/Unicode.ino
[plugin:example]: /examples/Keystrokes/Unicode/Unicode.ino

@ -52,4 +52,4 @@ method:
Starting from the [example][plugin:example] is the recommended way of getting
started with the plugin.
[plugin:example]: ../../examples/Keystrokes/WinKeyToggle/WinKeyToggle.ino
[plugin:example]: /examples/Keystrokes/WinKeyToggle/WinKeyToggle.ino

Loading…
Cancel
Save