diff --git a/.github/lint-device-urls.sh b/.github/lint-device-urls.sh index ce25c9a..9ec3a0b 100755 --- a/.github/lint-device-urls.sh +++ b/.github/lint-device-urls.sh @@ -1,36 +1,69 @@ #!/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= + 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 \ + " + local allowed_patterns="\ + \`$base_url\` \ + $base_url \ + $base_url \ + $base_url: \ + $base_url/index.html#[a-z] \ + $base_url/axis-cgi \ + $base_url/local \ + @$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/.textlintrc b/.textlintrc index 51ea5b4..119c7be 100644 --- a/.textlintrc +++ b/.textlintrc @@ -5,11 +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"] - ], - }, + ["bugfix(es)?", "bug fix$1"], + ["walkthrough", "walk-through"], + ["ax(|is)(| )os", "AXIS OS"] + ] + } } } \ No newline at end of file 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 | - | 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**. 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 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