File tree Expand file tree Collapse file tree 4 files changed +37
-4
lines changed Expand file tree Collapse file tree 4 files changed +37
-4
lines changed Original file line number Diff line number Diff line change 11# gitfetch
2+
23A neofetch-style CLI tool for GitHub statistics. Display your GitHub profile and stats in a beautiful, colorful terminal interface.
34
45<img width =" 3024 " height =" 1964 " alt =" image " src =" https://github.com/user-attachments/assets/bbb18d5d-4787-4998-a352-e8f4e59642c0 " />
@@ -46,8 +47,21 @@ You should see: `✓ Logged in to github.com as YOUR_USERNAME`
4647
4748## Installing ` gitfetch `
4849
50+ ### macOS (Homebrew)
51+
52+ ``` bash
53+ brew tap matars/homebrew-gitfetch
54+ brew install gitfetch
55+ ```
56+
57+ Or install directly without tapping:
58+
59+ ``` bash
60+ brew install matars/homebrew-gitfetch/gitfetch
61+ ```
62+
4963### From the sources
50-
64+
51651 . Clone this repo
52662 . ` cd ` into the repo
53673 . Then type the below command
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44
55[project ]
66name = " gitfetch"
7- version = " 1.0.2 "
7+ version = " 1.0.3 "
88description = " A neofetch-style CLI tool for GitHub statistics"
99readme = " README.md"
1010requires-python = " >=3.8"
Original file line number Diff line number Diff line change 22gitfetch - A neofetch-style CLI tool for GitHub statistics
33"""
44
5- __version__ = "0.1.0"
5+ import re
6+ from pathlib import Path
7+
8+
9+ def _get_version () -> str :
10+ """Get version from pyproject.toml."""
11+ pyproject_path = Path (__file__ ).parent .parent .parent / "pyproject.toml"
12+ try :
13+ with open (pyproject_path , "r" , encoding = "utf-8" ) as f :
14+ content = f .read ()
15+ match = re .search (r'^version\s*=\s*"([^"]+)"' , content , re .MULTILINE )
16+ if match :
17+ return match .group (1 )
18+ except (FileNotFoundError , OSError ):
19+ pass
20+ return "unknown"
21+
22+
23+ __version__ = _get_version ()
Original file line number Diff line number Diff line change 1010from .display import DisplayFormatter
1111from .cache import CacheManager
1212from .config import ConfigManager
13+ from . import __version__
1314
1415
1516def parse_args () -> argparse .Namespace :
@@ -46,7 +47,7 @@ def parse_args() -> argparse.Namespace:
4647 parser .add_argument (
4748 "--version" ,
4849 action = "version" ,
49- version = "%(prog)s 0.1.0 "
50+ version = f "%(prog)s { __version__ } "
5051 )
5152
5253 return parser .parse_args ()
You can’t perform that action at this time.
0 commit comments