From 46462b4f012acba83f361584cd7be8e324d8060c Mon Sep 17 00:00:00 2001 From: Bitkarrot <73979971+bitkarrot@users.noreply.github.com> Date: Mon, 11 Jul 2022 04:40:46 -0700 Subject: [PATCH] Update extensions.md (#724) suggestion for gsed on macOS, as sed may not work reference: https://apple.stackexchange.com/questions/414568/i-get-an-error-sed-1-12d-invalid-command-code-when-i-use-sed-12d-samp --- docs/devs/extensions.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/devs/extensions.md b/docs/devs/extensions.md index 70e599e9..8c9a30a4 100644 --- a/docs/devs/extensions.md +++ b/docs/devs/extensions.md @@ -15,6 +15,7 @@ cp lnbits/extensions/example lnbits/extensions/mysuperplugin -r # Let's not use cd lnbits/extensions/mysuperplugin find . -type f -print0 | xargs -0 sed -i 's/example/mysuperplugin/g' # Change all occurrences of 'example' to your plugin name 'mysuperplugin'. ``` +- if you are on macOS and having difficulty with 'sed', consider `brew install gnu-sed` and use 'gsed', without -0 option after xargs. Going over the example extension's structure: * views_api.py: This is where your public API would go. It will be exposed at "$DOMAIN/$PLUGIN/$ROUTE". For example: https://lnbits.com/mysuperplugin/api/v1/tools.