Skip to content

StarTrackerBot is a Python script that tracks the star count of a GitHub repository, logs the data in a CSV file, and sends a Telegram notification whenever the repo gains a new star. Perfect for monitoring project growth! πŸš€β­

Notifications You must be signed in to change notification settings

ArghavanMonajemi/StarTrackerBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌟 StarTrackerBot

StarTrackerBot is a Python script that tracks GitHub repository stars and logs the count over time. It also sends a Telegram notification whenever the repository gains a new star.

πŸš€ Features

  • Fetches the current star count of a GitHub repository
  • Saves the star history to a CSV file
  • Sends a Telegram notification when the star count increases

πŸ›  Setup

1️⃣ Prerequisites

  • Python 3.x installed
  • A Telegram bot and chat ID (for notifications)
  • A GitHub repository to track

2️⃣ Install Dependencies

Clone the repository and install required packages:

git clone https://github.com/ArghavanMonajemi/StarTrackerBot.git
cd StarTrackerBot
pip install requests

3️⃣ Configure Your Bot

Replace these placeholders in the script with your actual credentials:

TELEGRAM_BOT_TOKEN = "your_telegram_bot_token"
TELEGRAM_CHAT_ID = "your_chat_id"
REPO = "torvalds/linux"  # Change to the GitHub repo you want to track

4️⃣ Run the Bot

python main.py

⏳ Scheduling the Bot

To automate the bot, you can set up a scheduler.

🐧 Linux/macOS (Using cron)

  1. Open the terminal and type:
crontab -e
  1. Add this line at the end (runs every hour):
0 * * * * /usr/bin/python3 /path/to/StarTrackerBot/main.py
  • Replace /path/to/StarTrackerBot/star_tracker.py with the actual path.
  1. Save and exit.

πŸ–₯ Windows (Using Task Scheduler)

  1. Open Task Scheduler.
  2. Click Create Basic Task.
  3. Set a name like StarTrackerBot.
  4. Select Daily or Hourly.
  5. Choose Start a Program and browse for python.exe.
  6. Add the script path (star_tracker.py) in the "Add arguments" field.
  7. Click Finish.
  • Now, the bot will run automatically at the scheduled time!

πŸ“‚ How It Works

The script fetches the star count from the GitHub API. It logs the count into a CSV file (stars_history.csv). If the star count has increased, it sends a Telegram message.

About

StarTrackerBot is a Python script that tracks the star count of a GitHub repository, logs the data in a CSV file, and sends a Telegram notification whenever the repo gains a new star. Perfect for monitoring project growth! πŸš€β­

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages