├── .gitignore
├── LICENSE.md
├── README.md
├── requirements.txt
└── src
├── core
└── utils.py
├── htmlviewers
├── linux.py
└── win.py
└── main.py
/.gitignore:
--------------------------------------------------------------------------------
1 | __pycache__/
2 | .vscode
3 | received_events/
4 | *.html
5 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2025 QuantumByteStudios
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # GitHubUserDataExtractor
2 |
3 | **GitHubUserDataExtractor** is a cross-platform Python tool designed to extract and display public GitHub user data both in the terminal and through a visual HTML dashboard. It provides a streamlined way to fetch a user’s profile, recent activity, and contribution statistics using GitHub’s REST API and external visualization services.
4 |
5 | ## Features
6 |
7 | - Retrieves a GitHub user's public profile and recent activity
8 | - Displays formatted JSON data in the terminal with color-coded output
9 | - Generates a dynamic HTML dashboard styled with Bootstrap
10 | - Embeds contribution graphs, language usage charts, and GitHub stats
11 | - Native HTML viewer support for Linux (PyWebView) and Windows (PyQt5)
12 | - Clean file structure with modular code organization
13 |
14 | ## Installation
15 |
16 | Clone the repository and install dependencies:
17 |
18 | ```bash
19 | git clone https://github.com/QuantumByteStudios/GitHubUserDataExtractor.git
20 | cd GitHubUserDataExtractor
21 | pip install -r requirements.txt
22 | ```
23 |
24 | Ensure you are using Python 3.7 or higher.
25 |
26 | ## Usage
27 |
28 | Run the application using:
29 |
30 | ```bash
31 | python src/main.py
32 | ```
33 |
34 | You will be prompted to enter a GitHub username. The tool will:
35 |
36 | 1. Fetch the user's public GitHub profile and display it in the terminal.
37 | 2. Retrieve recent events like stars, forks, and releases.
38 | 3. Generate an HTML report and open it in a native desktop viewer.
39 | 4. Clean up temporary files after closing the viewer.
40 |
41 | Runtime Screenshot
42 | 
43 | 
44 |
45 |
46 | ## Project Structure
47 |
48 | ```
49 | GitHubUserDataExtractor/
50 | │
51 | ├── .temp/ # Temporary files (auto-cleaned)
52 | ├── .vscode/ # VS Code workspace settings
53 | ├── src/ # Source code directory
54 | | ├── main.py # Main.py
55 | │ ├── core/ # API and utility logic
56 | │ │ └── utils.py # Helper functions for API and data processing
57 | │ ├── htmlviewers/ # Platform-specific GUI viewers
58 | │ │ ├── linux.py # HTML viewer for Linux (PyWebView)
59 | │ │ └── windows.py # HTML viewer for Windows (PyQt5)
60 | │
61 | ├── .gitignore # Git ignore rules
62 | ├── LICENSE.md # License information
63 | ├── README.md # Project documentation
64 | ├── requirements.txt # Python dependencies
65 | ```
66 |
67 | ## Output
68 |
69 | The tool creates a temporary HTML report (`index.html`) inside the `.temp/` directory. This report includes:
70 |
71 | - Recent GitHub events (filtered by event types)
72 | - Contribution graphs and language usage charts
73 | - Visual badges and statistics via third-party services
74 |
75 | This file is opened in a native GUI window and then automatically cleared on exit.
76 |
77 | ## Use Cases
78 |
79 | - Developers reviewing their own GitHub contributions and stats
80 | - Technical recruiters assessing candidate GitHub activity
81 | - Educators demonstrating API integration and data visualization
82 | - Hackathon teams building offline GitHub user snapshots
83 |
84 | ## Technologies
85 |
86 | - Python 3
87 | - GitHub REST API
88 | - Requests (HTTP client)
89 | - Colorama (terminal color formatting)
90 | - PyQt5 (Windows HTML viewer)
91 | - PyWebView (Linux HTML viewer)
92 | - Bootstrap 5 (UI styling)
93 | - External visualization APIs:
94 | - GitHub Readme Stats
95 | - GitHub Streak Stats
96 | - GitHub Profile Summary Cards
97 |
98 | ## API Limitations
99 |
100 | This tool uses unauthenticated GitHub API requests and is therefore subject to rate limiting:
101 |
102 | - 60 requests per hour per IP address
103 |
104 | To increase limits, you can optionally extend the tool to use a personal access token.
105 |
106 | ## License
107 |
108 | This project is licensed under the MIT License. See `LICENSE.md` for details.
109 |
110 | ## Author
111 |
112 | Developed by QuantumByteStudios. Contributions and suggestions are welcome.
113 | For inquiries, email us at [contact@quantumbytestudios.in](mailto:contact@quantumbytestudios.in).
114 |
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | colorama==0.4.6
2 | PyQt5==5.15.11
3 | PyQt5_sip==12.15.0
4 | Requests==2.32.3
5 | webview==0.1.5
6 |
--------------------------------------------------------------------------------
/src/core/utils.py:
--------------------------------------------------------------------------------
1 | import os
2 | import platform
3 | import requests
4 | from colorama import Fore, Style
5 | from requests.exceptions import HTTPError
6 |
7 |
8 | class colors:
9 | HEADER = Fore.MAGENTA
10 | BLUE = Fore.BLUE
11 | CYAN = Fore.CYAN
12 | GREEN = Fore.GREEN
13 | WARNING = Fore.YELLOW
14 | FAIL = Fore.RED
15 | RED = Fore.RED
16 | ENDC = Style.RESET_ALL
17 | BOLD = Style.BRIGHT
18 |
19 |
20 | def clear():
21 | os.system("cls" if platform.system() == "Windows" else "clear")
22 |
23 |
24 | def fetch_and_print_data(username):
25 | print(f"Fetching data for user: {colors.FAIL}{username}{colors.ENDC}")
26 | url = f"https://api.github.com/users/{username}"
27 | try:
28 | response = requests.get(url, timeout=10)
29 | response.raise_for_status()
30 | data = response.json()
31 | print(f"\n{colors.WARNING}User Data:{colors.ENDC}")
32 | for key, value in data.items():
33 | key = key.replace("_", " ").capitalize()
34 | print(f"{colors.CYAN}{key}:{colors.ENDC} {value}")
35 |
36 | except HTTPError as http_err:
37 | print(f"{colors.FAIL}HTTP error occurred: {http_err}{colors.ENDC}")
38 | except Exception as err:
39 | print(f"{colors.FAIL}Unexpected error: {err}{colors.ENDC}")
40 |
41 |
42 | def show_events_and_graphs(urls):
43 | print(
44 | f"\nGraphs available in Received Events [{colors.GREEN}✓{colors.ENDC}]"
45 | )
46 |
47 |
48 | def generate_html_event_row(avatar, login, event_type, repo_name, repo_url, badge_class, action_text):
49 | return f"""
50 |