From 9f38bc93e67cbe3d9f9876136b591ea6596636d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20=C3=85kesson?= <66364872+pataxis@users.noreply.github.com> Date: Fri, 31 May 2024 09:41:22 +0200 Subject: [PATCH 1/6] set-up-device-advanced: Fix broken link (#294) Co-authored-by: pataxis --- .../set-up-developer-environment/set-up-device-advanced.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/get-started/set-up-developer-environment/set-up-device-advanced.md b/docs/get-started/set-up-developer-environment/set-up-device-advanced.md index f72e413..e306cd9 100644 --- a/docs/get-started/set-up-developer-environment/set-up-device-advanced.md +++ b/docs/get-started/set-up-developer-environment/set-up-device-advanced.md @@ -69,7 +69,7 @@ that can communicate via SSH. This will be exemplified using `ssh` and a non-root SSH user called `my-ssh-user`. > The SSH user needs to be created on the device before connecting to the -> device, see [Create an SSH user](create-an-ssh-user). +> device, see [Create an SSH user](#create-an-ssh-user). ```sh ssh my-ssh-user@192.168.0.90 From c2e21a199c9af3cdcd10bf8b8a7d86d845ddbe88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20=C3=85kesson?= <66364872+pataxis@users.noreply.github.com> Date: Fri, 14 Jun 2024 09:44:20 +0200 Subject: [PATCH 2/6] lint: Align to acap-native-sdk-examples linter (#299) Co-authored-by: pataxis --- .github/lint-device-urls.sh | 79 +++++++++++++------ .../get-started/set-up-the-device.md | 2 +- 2 files changed, 55 insertions(+), 26 deletions(-) diff --git a/.github/lint-device-urls.sh b/.github/lint-device-urls.sh index ce25c9a..10c3bfb 100755 --- a/.github/lint-device-urls.sh +++ b/.github/lint-device-urls.sh @@ -1,36 +1,65 @@ #!/bin/bash -ret=0 -base_url="192.168.0.90" -exclude_dir_list="\ - --exclude-dir=.github \ - --exclude-dir=src \ - --exclude-dir=_site \ - --exclude-dir=capture \ - --exclude=test.sh \ -" -allowed_patterns="\ - \`$base_url\` \ - $base_url \ - $base_url/index.html \ - $base_url/axis-cgi \ - @$base_url \ -" - -# Set +e to not having to handle the grep exit status -__url_grep_list=$(grep -nir "$base_url" $exclude_dir_list | \ - grep -vE "$base_url(\`| |/axis-cgi|/index.html#)" | \ - grep -vE "@$base_url" || :) -[ -z "$__url_grep_list" ] || { +#------------------------------------------------------------------------------- +# Functions +#------------------------------------------------------------------------------- + +print_section() { + local sep40="----------------------------------------" + printf '\n\n%s\n%s\n%s\n' "$sep40$sep40" " $*" "$sep40$sep40" +} + +check_device_ip_paths() { + local ret=0 + local __url_grep_list= + base_url="192.168.0.90" + exclude_dir_list="\ + --exclude-dir=.github \ + --exclude-dir=src \ + --exclude-dir=_site \ + --exclude-dir=capture \ + " + allowed_patterns="\ + \`$base_url\` \ + $base_url \ + $base_url/index.html[a-z] \ + $base_url/axis-cgi \ + @$base_url \ + " + + print_section "Check that device URLs follow allowed pattern" + + # shellcheck disable=SC2086 + __url_grep_list=$(grep -nir "$base_url" $exclude_dir_list | + grep -vE "$base_url(\`|$| |:|/axis-cgi|/index.html#[a-z]|/local)" | + grep -vE "@$base_url" || :) + + if [ "$__url_grep_list" ]; then printf '\n%s\n%s\n\n' \ "## Error - The following device URLs are not matching allowed patterns" \ "$__url_grep_list" printf "## Allowed patterns (Including URLs prefixed http://):\n" - for pattern in $allowed_patterns - do + for pattern in $allowed_patterns; do printf '%s\n' "* $pattern" done printf "\nA typical error is to copy the redirected URL that include e.g. product specific string 'camera'\n" ret=1 + else + printf "* All device URLs follow pattern\n" + fi + + return $ret } -exit $ret + +#------------------------------------------------------------------------------- +# Main +#------------------------------------------------------------------------------- + +exit_value=0 +found_error=no + +if ! check_device_ip_paths; then found_error=yes; fi + +[ "$found_error" = no ] || exit_value=1 + +exit $exit_value diff --git a/docs/acap-sdk-version-3/get-started/set-up-the-device.md b/docs/acap-sdk-version-3/get-started/set-up-the-device.md index 5e5c982..a091bc4 100644 --- a/docs/acap-sdk-version-3/get-started/set-up-the-device.md +++ b/docs/acap-sdk-version-3/get-started/set-up-the-device.md @@ -40,7 +40,7 @@ You can enable SSH on an Axis device either through the device's web interface o #### In the new web interface -1. Go to `http://192.168.0.90/index.html#/system/plainConfig`. +1. Go to `http://192.168.0.90/index.html#system/plainConfig`. 2. Select the **Network** group from the drop-down menu. 3. Under **Network/SSH**, select **Enabled**. 4. Scroll to the bottom of the page and click **Save**. From f91005a2612030f83c5e328d6f9b7407da4f0bab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20=C3=85kesson?= <66364872+pataxis@users.noreply.github.com> Date: Fri, 14 Jun 2024 17:35:30 +0200 Subject: [PATCH 3/6] lint: Add term AXIS OS (#300) Co-authored-by: pataxis --- .textlintrc | 3 ++- docs/acap-sdk-version-3/api/index.md | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.textlintrc b/.textlintrc index 51ea5b4..2e0c995 100644 --- a/.textlintrc +++ b/.textlintrc @@ -8,7 +8,8 @@ "exclude": ["bug[- ]fix(es)?", "bugfix$1"], "terms": [ ["bug[-]fix(es)?", "bug fix$1"], - ["bugfix(es)?", "bug fix$1"] + ["bugfix(es)?", "bug fix$1"], + ["ax(|is)(| )os", "AXIS OS"] ], }, } diff --git a/docs/acap-sdk-version-3/api/index.md b/docs/acap-sdk-version-3/api/index.md index 6a23c1e..a39ce6f 100644 --- a/docs/acap-sdk-version-3/api/index.md +++ b/docs/acap-sdk-version-3/api/index.md @@ -79,7 +79,7 @@ The API supports products with the following chips: The VdoStream API was introduced in API version 3.0. -| Axis OS version | VdoStream API version | New functions added | +| AXIS OS version | VdoStream API version | New functions added | | --------------- | --------------------- | ------------------- | | 10.2 | 2.3.13 | `vdo_stream_snapshot`
`vdo_stream_set_framerate`
`vdo_channel_get_filtered`| | 10.3 | 3.0.0 | - | From 1ffc3580829ba782472a8d506c9564cc113e5c2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20=C3=85kesson?= <66364872+pataxis@users.noreply.github.com> Date: Fri, 14 Jun 2024 17:48:25 +0200 Subject: [PATCH 4/6] lint: Align device url check to native examples (#301) Co-authored-by: pataxis --- .github/lint-device-urls.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/lint-device-urls.sh b/.github/lint-device-urls.sh index 10c3bfb..9ec3a0b 100755 --- a/.github/lint-device-urls.sh +++ b/.github/lint-device-urls.sh @@ -12,18 +12,22 @@ print_section() { check_device_ip_paths() { local ret=0 local __url_grep_list= - base_url="192.168.0.90" - exclude_dir_list="\ + local base_url="192.168.0.90" + local exclude_dir_list="\ --exclude-dir=.github \ + --exclude-dir=.git \ --exclude-dir=src \ --exclude-dir=_site \ --exclude-dir=capture \ " - allowed_patterns="\ + local allowed_patterns="\ \`$base_url\` \ + $base_url \ $base_url \ - $base_url/index.html[a-z] \ + $base_url: \ + $base_url/index.html#[a-z] \ $base_url/axis-cgi \ + $base_url/local \ @$base_url \ " From 5769619a66a883c92e1a2a07b02a5c6c8bfdaa34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20=C3=85kesson?= <66364872+pataxis@users.noreply.github.com> Date: Fri, 14 Jun 2024 19:10:49 +0200 Subject: [PATCH 5/6] lint: Change textlint to use walk-through (#302) Co-authored-by: pataxis --- .textlintrc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.textlintrc b/.textlintrc index 2e0c995..119c7be 100644 --- a/.textlintrc +++ b/.textlintrc @@ -5,12 +5,16 @@ "rules": { "terminology": { "defaultTerms": true, - "exclude": ["bug[- ]fix(es)?", "bugfix$1"], + "exclude": [ + "bug[- ]fix(es)?", + "walk-through" + ], "terms": [ ["bug[-]fix(es)?", "bug fix$1"], ["bugfix(es)?", "bug fix$1"], + ["walkthrough", "walk-through"], ["ax(|is)(| )os", "AXIS OS"] - ], - }, + ] + } } } \ No newline at end of file From 65e177faf25c8b37ba031086d6c52e40a73de51b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20=C3=85kesson?= <66364872+pataxis@users.noreply.github.com> Date: Tue, 18 Jun 2024 14:26:03 +0200 Subject: [PATCH 6/6] Add OTHERFILES to mapping list (#304) Co-authored-by: pataxis --- docs/develop/application-project-structure.md | 1 + docs/develop/build-install-run.md | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/develop/application-project-structure.md b/docs/develop/application-project-structure.md index e30f447..0e69e3c 100644 --- a/docs/develop/application-project-structure.md +++ b/docs/develop/application-project-structure.md @@ -168,6 +168,7 @@ see [Manifest schemas](manifest-schemas/). | Required embedded development version | acapPackageConf.
setup.
embeddedSdkVersion[^2] | REQEMBDEVVERSION | Specifies the minimum required embedded development version that the device running the application must support. The version is dependent on the set APIs used in the application. | | Application specific setting page | acapPackageConf.
configuration.
settingPage | SETTINGSPAGEFILE | Specifies the HTML page for custom settings, to be used by for instance device management software, allowing a user to browse the application settings page. The file must be in a directory called `html` in the application project. | | Supported CGI endpoints | acapPackageConf.
configuration.
httpConfig[].name | HTTPCGIPATHS and file | CGI path relative to application web root | +| Package custom files in application | N/A | OTHERFILES | This option in package.conf has been replaced by a [build tool](build-install-run#build-tool) option and is not part of manifest.json. An example `acap-build . -a file1 -a file2` | | | acapPackageConf.
configuration.
httpConfig[].type | | CGI implementation type, e.g. transferCgi | | | acapPackageConf.
configuration.
httpConfig[].access | | Access policy for calling the CGI | | Product integrated application parameters | acapPackageConf.
configuration.
paramConfig[].default | file: param.conf | Parameter default value | diff --git a/docs/develop/build-install-run.md b/docs/develop/build-install-run.md index a9197dc..54c6c4e 100644 --- a/docs/develop/build-install-run.md +++ b/docs/develop/build-install-run.md @@ -36,7 +36,7 @@ For help on using the build tool, run `acap-build -h`. > was used for configuration. It has since been replaced by > **manifest.json**. If any additional files were previously listed in **OTHERFILES** > in the package.conf file, these now need to be listed as input to the acap-build -> command using the flag -a, for example `acap-build ./ -a file1 -a file2`. +> command using the flag -a, for example `acap-build . -a file1 -a file2`. > - For the ACAP application package to be supported in older AXIS OS, a > **package.conf** file is generated and included in the EAP file. Although it’s > the manifest file that is the base setup file for the ACAP application when