This shell script allows to extract HTML documentation contained in .qch files.
The qchextractor.sh
script requires sqlite3
package installed and zpipe
executable.
- Install
sqlite3
:
sudo apt install sqlite3
- Compile
zpipe
executable:
make
qchextractor can be run as:
qchextractor.sh <input-qch-file> <output-directory>
If the output directory does not exist, it will be created along with a subdirectory named 'html' where the files contained in the qch file will be extracted.
All credits for zpipe belong to the original author (Mark Adler) http://www.zlib.net/zpipe.c
Example of batch extracting of Aurora/Sailfish SDK documentation files.
qchextractor="$(pwd)/qchextractor.sh"; \
documentation_dir="${HOME}/AuroraOS/documentation"; \
for qch_file in ${documentation_dir}/*.qch; do \
out_dir="${documentation_dir}/html/$(basename ${qch_file%.qch})"; \
mkdir -p "${out_dir}"; \
$qchextractor "${qch_file}" "${out_dir}"; \
done