Skip to content

Commit 8eeea55

Browse files
pr1m8claude
andcommitted
chore: add RTD setup helper script
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent a2e236a commit 8eeea55

1 file changed

Lines changed: 43 additions & 0 deletions

File tree

scripts/setup_readthedocs.sh

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#!/usr/bin/env bash
2+
# Import all haive packages into ReadTheDocs via API.
3+
#
4+
# Usage:
5+
# export RTD_TOKEN=your-rtd-api-token # Get from https://readthedocs.org/accounts/tokens/
6+
# bash scripts/setup_readthedocs.sh
7+
#
8+
# Or manually import via web UI (each repo takes ~30s):
9+
# https://readthedocs.org/dashboard/import/?query=pr1m8
10+
#
11+
# After import, RTD auto-detects .readthedocs.yaml and starts building.
12+
13+
set -e
14+
15+
if [ -z "$RTD_TOKEN" ]; then
16+
echo "RTD_TOKEN not set. Manual import links:"
17+
for repo in haive-core haive-agents haive-games haive-tools haive-hap haive-dataflow haive-mcp; do
18+
echo " https://readthedocs.org/dashboard/import/manual/?name=$repo&repo=https://github.com/pr1m8/$repo"
19+
done
20+
echo ""
21+
echo "Or set RTD_TOKEN and re-run this script."
22+
exit 0
23+
fi
24+
25+
for repo in haive-core haive-agents haive-games haive-tools haive-hap haive-dataflow haive-mcp; do
26+
echo "=== Importing $repo ==="
27+
curl -s -X POST "https://readthedocs.org/api/v3/projects/" \
28+
-H "Authorization: Token $RTD_TOKEN" \
29+
-H "Content-Type: application/json" \
30+
-d "{
31+
\"name\": \"$repo\",
32+
\"repository\": {
33+
\"url\": \"https://github.com/pr1m8/$repo\",
34+
\"type\": \"git\"
35+
},
36+
\"homepage\": \"https://pypi.org/project/$repo/\",
37+
\"programming_language\": \"py\",
38+
\"language\": \"en\"
39+
}" | jq -r '.name // .detail // "Failed"' 2>/dev/null || echo "import attempted"
40+
done
41+
42+
echo ""
43+
echo "Done! Check https://readthedocs.org/dashboard/ for build status."

0 commit comments

Comments
 (0)