-
Notifications
You must be signed in to change notification settings - Fork 21
Home
To list add-ons in widget catalog, you need to add widget.json file to the /doc folder of the add-on. To automatically create the file, run:
python ~/orange/orange-hugo/scripts/create_widget_catalog.py --categories "Text Mining" --doc .
Note that you need to provide the name of the add-on as a parameter of create_widget_catalog.py. See https://github.com/biolab/orange3-text/pull/460 for details.
Then add the following to the scripts/build-widget-catalog.sh of orange-hugo repository (add it before the cd.. and after the previous similar line).
wget -qO- https://github.com/biolab/orange3-text/archive/master.tar.gz | tar -zxf -
mv orange3-text-master orange3-text
Also add the following after the last similar line:
external/orange3-text/doc/
See https://github.com/biolab/orange3-text/pull/462 for details.
To automatically check if documentation is outdated on build, add the following to .travis/build_doc.sh:
# check if the widget catalog in the repository (for orange-hugo is up to date)
cd $TRAVIS_BUILD_DIR/doc/
wget_command="wget -N https://raw.githubusercontent.com/biolab/orange-hugo/master/scripts/create_widget_catalog.py"
run_command="python create_widget_catalog.py --categories <"name of add-on"> --doc ."
eval "$wget_command"
eval "catchsegv xvfb-run -a -s "\"$XVFBARGS"\" $run_command"
diff=$(git diff -- widgets.json)
echo $diff
if [ ! -z "$diff" ]
then
echo "Widget catalog is stale. Rebuild it with:"
echo "cd doc"
echo "$wget_command"
echo "$run_command"
echo
echo "$diff"
exit 1
fi
Note that you need to provide the name of the add-on as a parameter of create_widget_catalog.py. See https://github.com/biolab/orange3-text/pull/461/files for details.