mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-08-02 03:42:50 +08:00
Summary: Use a consistent case for PyTorch3D (matching the logo...): replace all occurrences of PyTorch3d with PyTorch3D across the codebase (including documentation and notebooks) Reviewed By: wanyenlo, gkioxari Differential Revision: D20427546 fbshipit-source-id: 8c7697f51434c51e99b7fe271935932c72a1d9b9
61 lines
1.2 KiB
Bash
61 lines
1.2 KiB
Bash
#!/bin/bash
|
|
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
|
|
|
|
# run this script from the project root using `./scripts/build_docs.sh`
|
|
|
|
usage() {
|
|
echo "Usage: $0 [-b]"
|
|
echo ""
|
|
echo "Build PyTorch3D documentation."
|
|
echo ""
|
|
echo " -b Build static version of documentation (otherwise start server)"
|
|
echo ""
|
|
exit 1
|
|
}
|
|
|
|
BUILD_STATIC=false
|
|
|
|
while getopts 'hb' flag; do
|
|
case "${flag}" in
|
|
h)
|
|
usage
|
|
;;
|
|
b)
|
|
BUILD_STATIC=true
|
|
;;
|
|
*)
|
|
usage
|
|
;;
|
|
esac
|
|
done
|
|
|
|
|
|
echo "-----------------------------------"
|
|
echo "Building PyTorch3D Docusaurus site"
|
|
echo "-----------------------------------"
|
|
cd website || exit
|
|
yarn
|
|
cd ..
|
|
|
|
echo "-----------------------------------"
|
|
echo "Generating tutorials"
|
|
echo "-----------------------------------"
|
|
cwd=$(pwd)
|
|
mkdir -p "website/_tutorials"
|
|
mkdir -p "website/static/files"
|
|
python scripts/parse_tutorials.py --repo_dir "${cwd}"
|
|
|
|
cd website || exit
|
|
|
|
if [[ $BUILD_STATIC == true ]]; then
|
|
echo "-----------------------------------"
|
|
echo "Building static site"
|
|
echo "-----------------------------------"
|
|
yarn build
|
|
else
|
|
echo "-----------------------------------"
|
|
echo "Starting local server"
|
|
echo "-----------------------------------"
|
|
yarn start
|
|
fi
|