browsertrix-crawler/docs/gen-cli.sh
Tessa Walsh 1325cc3868
Gracefully handle non-absolute path for create-login-profile --filename (#521)
Fixes #513 

If an absolute path isn't provided to the `create-login-profile`
entrypoint's `--filename` option, resolve the value given within
`/crawls/profiles`.

Also updates the docs cli-options section to include the
`create-login-profile` entrypoint and adjusts the script to
automatically generate this page accordingly.

---------
Co-authored-by: Ilya Kreymer <ikreymer@gmail.com>
2024-03-29 13:46:54 -07:00

20 lines
687 B
Bash
Executable file

#!/bin/bash
CURR=$(dirname "${BASH_SOURCE[0]}")
out=$CURR/docs/user-guide/cli-options.md
echo "# All Command-Line Options" > $out
echo "" >> $out
echo "The Browsertrix Crawler Docker image currently accepts the following parameters, broken down by entrypoint:" >> $out
echo "" >> $out
echo "## crawler" >> $out
echo "" >> $out
echo '```' >> $out
#node $CURR/../dist/main.js --help >> $out
docker run webrecorder/browsertrix-crawler crawl --help | tail -n +3 >> $out
echo '```' >> $out
echo "" >> $out
echo "## create-login-profile" >> $out
echo "" >> $out
echo '```' >> $out
docker run webrecorder/browsertrix-crawler create-login-profile --help | tail -n +3 >> $out
echo '```' >> $out