Skip to content

Liu8Can/StarManager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StarManager ✨

GitHub license GitHub stars GitHub forks GitHub issues GitHub last commit

🌟 A powerful GitHub starred repository management tool, developed by Liu8Can.

简体中文说明

Introduction

Are you tired of searching for the tools you need among your numerous starred repositories on GitHub? StarManager can help you manage your starred repositories more effectively! It can:

  • 🚀 Fetch all your starred repository data from the GitHub API.
  • 🗂️ Preprocess and simplify repository data.
  • ⭐ Sort repositories by the number of stars.
  • 🔠 Categorize repositories by programming language.
  • 📝 Generate a beautiful Markdown report for easy browsing and searching of repositories.
  • 🏷️ Support adding and updating labels manually, and the label information is persistently saved, even if you regenerate the report! (This is the core feature of our project)

📂 Directory Structure

StarManager/
├── .env                  # Stores environment variables (GitHub Personal Access Token)
├── main.py               # Main entry point of the project
├── README.md             # Project documentation (the file you are currently reading)
├── starred_repos_report.md # Generated Markdown report
├── update_labels.py      # Standalone script to extract labels from the Markdown report and update labels.json
├── data/                 # Stores project data files
│   ├── labels.json       # Stores manually added labels for each repository
│   ├── repos_by_language.json # Repositories categorized by programming language
│   ├── simplified_starred_repos.json # Simplified repository data
│   ├── sorted_starred_repos.json # Repositories sorted by the number of stars
│   └── starred_repositories.json # Raw starred repository data fetched from the GitHub API
└── scripts/              # Stores project Python scripts
    ├── categorize_by_language.py # Categorizes repositories by programming language
    ├── generate_markdown_report.py # Generates the Markdown report
    ├── get_starred_repos.py # Fetches all starred repositories from the GitHub API
    ├── process_data.py     # Preprocesses and simplifies raw data
    ├── sort_by_stars.py    # Sorts repositories by the number of stars
    └── update_labels_from_markdown.py # Internal module to extract labels from the Markdown report and update labels.json

🛠️ Getting Started

1. Installation

pip install requests python-dotenv

2. Configuration

  • Create a .env file in the project root directory.
  • Generate a new Personal Access Token (PAT) on the GitHub settings page and add it to the .env file:
GITHUB_TOKEN=your_github_pat

Note: You need to grant the repo and read:user scopes to the PAT. And do not commit the .env file to your Git repository!

Important Note: In the get_starred_repos.py script, change username = "Liu8Can" to your own GitHub username!

3. Running the Program

  • Execute the full process (fetch data, process, sort, categorize, generate report):

    python main.py
  • Update labels manually:

    1. Open the starred_repos_report.md file and add labels after the - 🏷️ **Label:** line for each repository, for example:

      ## [owner/repo-name](repo-url)
      > repo-description
      - 💻 **Language:** Python
      -**Stars:** 123
      - 📜 **License:** MIT License
      - 🏷️ **Label:** #label1 #label2 #label3
    2. Run the following command to update the labels:

      python update_labels.py

    💡 Core Feature: The label information you added is saved in the data/labels.json file. Even if you rerun python main.py to regenerate the report, your label information will not be lost!

4. View the Report

After running main.py, a starred_repos_report.md file will be generated in the project root directory, which contains information about all your starred repositories and manually added labels.

✍️ Author

This project is developed and maintained by Liu8Can.

📜 License

This project is licensed under the MIT License.

🙌 Acknowledgements

  • Thanks to the GitHub API for providing powerful functionality.
  • Thanks to all the contributors to the open-source community!

Hope StarManager can help you manage your GitHub starred repositories better! 😄

About

GitHub star management | GitHub星标管理

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages