diff --git a/bin/docs/example-to-doc b/bin/docs/example-to-doc new file mode 100755 index 00000000..ebb608d6 --- /dev/null +++ b/bin/docs/example-to-doc @@ -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 + + diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 00000000..d838da98 --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1 @@ +examples/ diff --git a/docs/Makefile b/docs/Makefile index 41b42094..1b73f11c 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -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) + diff --git a/docs/examples.rst b/docs/examples.rst index ba47b135..11bc99fc 100644 --- a/docs/examples.rst +++ b/docs/examples.rst @@ -9,5 +9,5 @@ All example sketches :maxdepth: 8 :glob: - generated/examples/**/*.ino + examples/** diff --git a/docs/plugins/Colormap.md b/docs/plugins/Colormap.md index f9c339e9..7eb1e463 100644 --- a/docs/plugins/Colormap.md +++ b/docs/plugins/Colormap.md @@ -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 diff --git a/docs/plugins/Cycle.md b/docs/plugins/Cycle.md index ace8a88e..b49dca69 100644 --- a/docs/plugins/Cycle.md +++ b/docs/plugins/Cycle.md @@ -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 diff --git a/docs/plugins/CycleTimeReport.md b/docs/plugins/CycleTimeReport.md index b5817b5c..2f3f0e50 100644 --- a/docs/plugins/CycleTimeReport.md +++ b/docs/plugins/CycleTimeReport.md @@ -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 diff --git a/docs/plugins/EEPROM-Keymap-Programmer.md b/docs/plugins/EEPROM-Keymap-Programmer.md index 71613e65..ad61422b 100644 --- a/docs/plugins/EEPROM-Keymap-Programmer.md +++ b/docs/plugins/EEPROM-Keymap-Programmer.md @@ -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 diff --git a/docs/plugins/EEPROM-Keymap.md b/docs/plugins/EEPROM-Keymap.md index e281be29..7dab63a3 100644 --- a/docs/plugins/EEPROM-Keymap.md +++ b/docs/plugins/EEPROM-Keymap.md @@ -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 diff --git a/docs/plugins/EEPROM-Settings.md b/docs/plugins/EEPROM-Settings.md index 47d9aa7e..79956e53 100644 --- a/docs/plugins/EEPROM-Settings.md +++ b/docs/plugins/EEPROM-Settings.md @@ -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 diff --git a/docs/plugins/Escape-OneShot.md b/docs/plugins/Escape-OneShot.md index 056c9220..db00a887 100644 --- a/docs/plugins/Escape-OneShot.md +++ b/docs/plugins/Escape-OneShot.md @@ -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 diff --git a/docs/plugins/FingerPainter.md b/docs/plugins/FingerPainter.md index a607b08b..62c09cfb 100644 --- a/docs/plugins/FingerPainter.md +++ b/docs/plugins/FingerPainter.md @@ -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 diff --git a/docs/plugins/FocusSerial.md b/docs/plugins/FocusSerial.md index 6f0834bd..a76e4530 100644 --- a/docs/plugins/FocusSerial.md +++ b/docs/plugins/FocusSerial.md @@ -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 diff --git a/docs/plugins/GhostInTheFirmware.md b/docs/plugins/GhostInTheFirmware.md index b88349f2..a726ccea 100644 --- a/docs/plugins/GhostInTheFirmware.md +++ b/docs/plugins/GhostInTheFirmware.md @@ -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 diff --git a/docs/plugins/Heatmap.md b/docs/plugins/Heatmap.md index 18b95f30..a163cf47 100644 --- a/docs/plugins/Heatmap.md +++ b/docs/plugins/Heatmap.md @@ -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 diff --git a/docs/plugins/HostOS.md b/docs/plugins/HostOS.md index b5152d4b..1376e1cf 100644 --- a/docs/plugins/HostOS.md +++ b/docs/plugins/HostOS.md @@ -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 diff --git a/docs/plugins/HostPowerManagement.md b/docs/plugins/HostPowerManagement.md index f1366f02..6f159ce2 100644 --- a/docs/plugins/HostPowerManagement.md +++ b/docs/plugins/HostPowerManagement.md @@ -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 diff --git a/docs/plugins/IdleLEDs.md b/docs/plugins/IdleLEDs.md index 7bf86754..8f4c0d0c 100644 --- a/docs/plugins/IdleLEDs.md +++ b/docs/plugins/IdleLEDs.md @@ -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 diff --git a/docs/plugins/LED-ActiveLayerColor.md b/docs/plugins/LED-ActiveLayerColor.md index b7b1fa54..ac7b7ead 100644 --- a/docs/plugins/LED-ActiveLayerColor.md +++ b/docs/plugins/LED-ActiveLayerColor.md @@ -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 diff --git a/docs/plugins/LED-ActiveModColor.md b/docs/plugins/LED-ActiveModColor.md index 28c08544..939074cb 100644 --- a/docs/plugins/LED-ActiveModColor.md +++ b/docs/plugins/LED-ActiveModColor.md @@ -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 diff --git a/docs/plugins/LED-AlphaSquare.md b/docs/plugins/LED-AlphaSquare.md index 6a44952d..a0d9ac68 100644 --- a/docs/plugins/LED-AlphaSquare.md +++ b/docs/plugins/LED-AlphaSquare.md @@ -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 diff --git a/docs/plugins/LED-Palette-Theme.md b/docs/plugins/LED-Palette-Theme.md index 81077ccb..46526de0 100644 --- a/docs/plugins/LED-Palette-Theme.md +++ b/docs/plugins/LED-Palette-Theme.md @@ -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 diff --git a/docs/plugins/LED-Stalker.md b/docs/plugins/LED-Stalker.md index a2d43ca2..f7d19be3 100644 --- a/docs/plugins/LED-Stalker.md +++ b/docs/plugins/LED-Stalker.md @@ -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 diff --git a/docs/plugins/LED-Wavepool.md b/docs/plugins/LED-Wavepool.md index e0485f56..8aee3040 100644 --- a/docs/plugins/LED-Wavepool.md +++ b/docs/plugins/LED-Wavepool.md @@ -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 diff --git a/docs/plugins/LEDEffects.md b/docs/plugins/LEDEffects.md index 73b6893a..54d11ee8 100644 --- a/docs/plugins/LEDEffects.md +++ b/docs/plugins/LEDEffects.md @@ -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 diff --git a/docs/plugins/Leader.md b/docs/plugins/Leader.md index 4fc548d8..7ab591d5 100644 --- a/docs/plugins/Leader.md +++ b/docs/plugins/Leader.md @@ -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 diff --git a/docs/plugins/MagicCombo.md b/docs/plugins/MagicCombo.md index 6300520b..88efa976 100644 --- a/docs/plugins/MagicCombo.md +++ b/docs/plugins/MagicCombo.md @@ -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 diff --git a/docs/plugins/OneShot.md b/docs/plugins/OneShot.md index 4e86f5f5..88732462 100644 --- a/docs/plugins/OneShot.md +++ b/docs/plugins/OneShot.md @@ -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 diff --git a/docs/plugins/Qukeys.md b/docs/plugins/Qukeys.md index 706b6b1e..36d7c028 100644 --- a/docs/plugins/Qukeys.md +++ b/docs/plugins/Qukeys.md @@ -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 diff --git a/docs/plugins/Redial.md b/docs/plugins/Redial.md index 379e8d50..26cce41e 100644 --- a/docs/plugins/Redial.md +++ b/docs/plugins/Redial.md @@ -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 diff --git a/docs/plugins/ShapeShifter.md b/docs/plugins/ShapeShifter.md index e55ca441..08da50fc 100644 --- a/docs/plugins/ShapeShifter.md +++ b/docs/plugins/ShapeShifter.md @@ -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 diff --git a/docs/plugins/SpaceCadet.md b/docs/plugins/SpaceCadet.md index 34e32100..a85a590f 100644 --- a/docs/plugins/SpaceCadet.md +++ b/docs/plugins/SpaceCadet.md @@ -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 diff --git a/docs/plugins/Steno.md b/docs/plugins/Steno.md index 047adeca..2351d093 100644 --- a/docs/plugins/Steno.md +++ b/docs/plugins/Steno.md @@ -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 diff --git a/docs/plugins/Syster.md b/docs/plugins/Syster.md index b01edeb1..45ad2f87 100644 --- a/docs/plugins/Syster.md +++ b/docs/plugins/Syster.md @@ -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 diff --git a/docs/plugins/TapDance.md b/docs/plugins/TapDance.md index c32f8dd6..ed4616d8 100644 --- a/docs/plugins/TapDance.md +++ b/docs/plugins/TapDance.md @@ -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 diff --git a/docs/plugins/TopsyTurvy.md b/docs/plugins/TopsyTurvy.md index 6eb58855..e605cb1f 100644 --- a/docs/plugins/TopsyTurvy.md +++ b/docs/plugins/TopsyTurvy.md @@ -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 diff --git a/docs/plugins/Turbo.md b/docs/plugins/Turbo.md index d690cd37..646d1254 100644 --- a/docs/plugins/Turbo.md +++ b/docs/plugins/Turbo.md @@ -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 diff --git a/docs/plugins/TypingBreaks.md b/docs/plugins/TypingBreaks.md index 1706d0ef..ed69aecc 100644 --- a/docs/plugins/TypingBreaks.md +++ b/docs/plugins/TypingBreaks.md @@ -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 diff --git a/docs/plugins/Unicode.md b/docs/plugins/Unicode.md index 213af127..932743c1 100644 --- a/docs/plugins/Unicode.md +++ b/docs/plugins/Unicode.md @@ -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 diff --git a/docs/plugins/WinKeyToggle.md b/docs/plugins/WinKeyToggle.md index 74e8342c..2763c434 100644 --- a/docs/plugins/WinKeyToggle.md +++ b/docs/plugins/WinKeyToggle.md @@ -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