本地是 macOS 系统。
下载 python html 格式文档
https://docs.python.org/3/download.html
下载logo png图像
https://www.python.org/community/logos/
创建 PythonDoc.sh, 用于创建 PythonDoc.app:
#!/bin/bash
# This script generates /Application/PythonDoc.app, which can be searched in launchpad
# You should have already downloaed Python HTML document from https://docs.python.org/3/download.html
mkdir -p ~/Applications/PythonDoc.app/Contents/MacOS
mkdir -p ~/Applications/PythonDoc.app/Contents/Resources
cat <<EOF > ~/Applications/PythonDoc.app/Contents/MacOS/PythonDoc
#!/bin/bash
open /Users/zz/Documents/python-3.12.5-docs-html/index.html
EOF
chmod +x ~/Applications/PythonDoc.app/Contents/MacOS/PythonDoc
cat <<EOF > ~/Applications/PythonDoc.app/Contents/Info.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
<string>PythonDoc</string>
<key>CFBundleIdentifier</key>
<string>org.python.doc</string>
<key>CFBundleName</key>
<string>PythonDoc</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleIconFile</key>
<string>Python.icns</string>
</dict>
</plist>
EOF
cp python-logo-only.icns ~/Applications/PythonDoc.app/Contents/Resources/Python.icns
rm -rf /Applications/PythonDoc.app
mv ~/Applications/PythonDoc.app /Applications/
效果: