Download setup-github.sh from luci18/animebot: direct link, hf CLI and curl.
- Browser
- Download file 1.38 kB
-
https://huggingface.co/luci18/animebot/resolve/main/setup-github.sh
- Command line
-
hf download hf://luci18/animebot/setup-github.sh
-
curl -L -o setup-github.sh https://huggingface.co/luci18/animebot/resolve/main/setup-github.sh
1.38 kB
| # Setup script for GitHub and Hugging Face | |
| echo "π¬ Anime Encoder Bot - GitHub + Hugging Face Setup" | |
| echo "==================================================" | |
| # Check if git is initialized | |
| if [ ! -d .git ]; then | |
| echo "π¦ Initializing git repository..." | |
| git init | |
| git branch -m main | |
| else | |
| echo "β Git already initialized" | |
| fi | |
| # Add all files | |
| echo "π Adding files..." | |
| git add . | |
| # Initial commit | |
| echo "πΎ Creating initial commit..." | |
| git commit -m "Initial commit: Anime Encoder Bot with all features" || echo "Nothing to commit" | |
| # Ask for GitHub username | |
| read -p "Enter your GitHub username: " GITHUB_USER | |
| read -p "Enter your repository name (default: anime-encoder-bot): " REPO_NAME | |
| REPO_NAME=${REPO_NAME:-anime-encoder-bot} | |
| # Add remote | |
| echo "π Adding GitHub remote..." | |
| git remote remove origin 2>/dev/null | |
| git remote add origin "https://github.com/$GITHUB_USER/$REPO_NAME.git" | |
| echo "" | |
| echo "π€ To push to GitHub, run:" | |
| echo " git push -u origin main" | |
| echo "" | |
| echo "π€ For Hugging Face:" | |
| echo " 1. Create a Space at: https://huggingface.co/new-space" | |
| echo " 2. Select 'Docker' SDK" | |
| echo " 3. Set space name: $REPO_NAME" | |
| echo " 4. Copy space ID (username/space-name)" | |
| echo " 5. Add HF_TOKEN and HF_SPACE_ID to GitHub Secrets" | |
| echo "" | |
| echo "π GitHub Repository URL:" | |
| echo " https://github.com/$GITHUB_USER/$REPO_NAME" | |