As per spdx/spdx-3-model#1422, examples for various classes (and other entities) are placed in a directory named examples with structure paralleling the one in model.
When the specification is generated, these examples should be included in the web pages.
This means that something like the following should run:
#!/usr/bin/env bash
find docs -type f -name '*.md' | while read -r f; do
grep -q '^<!-- EXAMPLE -->$' "$f" || continue
ex="examples/${f#docs/}"
[ -f "$ex" ] || {
echo "Missing example file: $ex" >&2
continue
}
sed -i \
-e "/^<!-- EXAMPLE -->$/{
i\\
## Example
r $ex
d
}" \
"$f"
done
It would be great if these commands were not put in the current workflow mechanism, but be present as stand-alone script. as discussed in spdx/infrastructure#1.
As per spdx/spdx-3-model#1422, examples for various classes (and other entities) are placed in a directory named
exampleswith structure paralleling the one inmodel.When the specification is generated, these examples should be included in the web pages.
This means that something like the following should run:
It would be great if these commands were not put in the current workflow mechanism, but be present as stand-alone script. as discussed in spdx/infrastructure#1.