├── .SRCINFO
├── .github
└── workflows
│ └── release.yml
├── .gitignore
├── Cargo.lock
├── Cargo.toml
├── Formula
└── gitfetch.rb
├── LICENSE
├── PKGBUILD
├── README.md
├── image.png
└── src
├── config_manager.rs
├── contribution_analyzer.rs
├── errors.rs
├── github_client.rs
├── graph_generator.rs
└── main.rs
/.SRCINFO:
--------------------------------------------------------------------------------
1 | pkgbase = gitfetch
2 | pkgver = 0.1.1
3 | pkgrel = 1
4 | sha256sums = ca30f159d6b2eb8829b06ad1a72f053dbbe456acf62d8407f7e8a038191547b5
5 |
--------------------------------------------------------------------------------
/.github/workflows/release.yml:
--------------------------------------------------------------------------------
1 | name: Release
2 | on:
3 | push:
4 | tags:
5 | - "*.*.*"
6 |
7 | jobs:
8 | create-release:
9 | runs-on: ubuntu-latest
10 | permissions:
11 | contents: write
12 | steps:
13 | - uses: actions/checkout@v3
14 | - name: Create Release
15 | env:
16 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17 | run: |
18 | TAG=${GITHUB_REF#refs/tags/}
19 | gh release create "$TAG" \
20 | --title "Release $TAG" \
21 | --generate-notes
22 | build-and-test:
23 | needs: create-release
24 | strategy:
25 | matrix:
26 | target: [x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu]
27 | runs-on: ubuntu-latest
28 | steps:
29 | - uses: actions/checkout@v3
30 | - name: Install Rust
31 | uses: actions-rs/toolchain@v1
32 | with:
33 | toolchain: stable
34 | override: true
35 | target: ${{ matrix.target }}
36 | - name: Install cross-compilation tools
37 | if: matrix.target == 'aarch64-unknown-linux-gnu'
38 | run: |
39 | sudo apt-get update
40 | sudo apt-get install -y gcc-aarch64-linux-gnu
41 | - name: Build
42 | uses: actions-rs/cargo@v1
43 | with:
44 | use-cross: true
45 | command: build
46 | args: --release --target ${{ matrix.target }}
47 | - name: Test
48 | uses: actions-rs/cargo@v1
49 | with:
50 | use-cross: true
51 | command: test
52 | args: --release --target ${{ matrix.target }}
53 | - name: Upload artifacts
54 | uses: actions/upload-artifact@v3
55 | with:
56 | name: gitfetch-${{ matrix.target }}
57 | path: target/${{ matrix.target }}/release/gitfetch
58 | update-package-files:
59 | needs: build-and-test
60 | runs-on: ubuntu-latest
61 | environment: release
62 | permissions:
63 | contents: write
64 | steps:
65 | - uses: actions/checkout@v3
66 | with:
67 | fetch-depth: 0
68 | - name: Get version
69 | id: get_version
70 | run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
71 | - name: Get checksum
72 | id: get_checksum
73 | run: |
74 | curl -sL https://github.com/${{ github.repository }}/archive/${{ steps.get_version.outputs.VERSION }}.tar.gz | sha256sum | cut -d ' ' -f 1 > checksum.txt
75 | echo "SHA256=$(cat checksum.txt)" >> $GITHUB_OUTPUT
76 | - name: Update Homebrew formula
77 | run: |
78 | sed -i 's/version ".*"/version "${{ steps.get_version.outputs.VERSION }}"/' Formula/gitfetch.rb
79 | sed -i 's/sha256 ".*"/sha256 "${{ steps.get_checksum.outputs.SHA256 }}"/' Formula/gitfetch.rb
80 | - name: Update PKGBUILD
81 | run: |
82 | sed -i 's/pkgver=.*/pkgver=${{ steps.get_version.outputs.VERSION }}/' PKGBUILD
83 | sed -i 's/sha256sums=(.*)/sha256sums=("${{ steps.get_checksum.outputs.SHA256 }}")/' PKGBUILD
84 | - name: Generate .SRCINFO
85 | run: |
86 | echo 'pkgbase = gitfetch' > .SRCINFO
87 | echo "pkgver = ${{ steps.get_version.outputs.VERSION }}" >> .SRCINFO
88 | echo "pkgrel = 1" >> .SRCINFO
89 | echo "sha256sums = ${{ steps.get_checksum.outputs.SHA256 }}" >> .SRCINFO
90 | # Add other necessary fields from PKGBUILD
91 | - name: Commit and push changes
92 | run: |
93 | git config --local user.email "action@github.com"
94 | git config --local user.name "GitHub Action"
95 | git add Formula/gitfetch.rb PKGBUILD .SRCINFO
96 | git commit -m "Update package files to version ${{ steps.get_version.outputs.VERSION }}"
97 | git push origin HEAD:main
98 | - name: Install SSH key
99 | uses: shimataro/ssh-key-action@v2
100 | with:
101 | key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
102 | known_hosts: ${{ secrets.AUR_KNOWN_HOSTS }}
103 | if_key_exists: replace
104 |
105 | - name: Add AUR host key
106 | run: ssh-keyscan aur.archlinux.org >> ~/.ssh/known_hosts
107 |
108 | - name: Push to AUR
109 | env:
110 | AUR_USERNAME: ${{ secrets.AUR_USERNAME }}
111 | run: |
112 | git clone ssh://aur@aur.archlinux.org/${AUR_USERNAME}/gitfetch.git aur-repo
113 | cp PKGBUILD .SRCINFO aur-repo/
114 | cd aur-repo
115 | git config user.name "GitHub Actions"
116 | git config user.email "actions@github.com"
117 | git add PKGBUILD .SRCINFO
118 | git commit -m "Update to version ${{ steps.get_version.outputs.VERSION }}"
119 | git push
120 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ### Created by https://www.gitignore.io
2 | ### Rust ###
3 | # Generated by Cargo
4 | # will have compiled files and executables
5 | debug/
6 | target/
7 |
8 | # Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
9 | # More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
10 |
11 | # These are backup files generated by rustfmt
12 | **/*.rs.bk
13 |
14 | # MSVC Windows builds of rustc generate these, which store debugging information
15 | *.pdb
16 |
--------------------------------------------------------------------------------
/Cargo.lock:
--------------------------------------------------------------------------------
1 | # This file is automatically @generated by Cargo.
2 | # It is not intended for manual editing.
3 | version = 3
4 |
5 | [[package]]
6 | name = "addr2line"
7 | version = "0.22.0"
8 | source = "registry+https://github.com/rust-lang/crates.io-index"
9 | checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678"
10 | dependencies = [
11 | "gimli",
12 | ]
13 |
14 | [[package]]
15 | name = "adler"
16 | version = "1.0.2"
17 | source = "registry+https://github.com/rust-lang/crates.io-index"
18 | checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
19 |
20 | [[package]]
21 | name = "android-tzdata"
22 | version = "0.1.1"
23 | source = "registry+https://github.com/rust-lang/crates.io-index"
24 | checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
25 |
26 | [[package]]
27 | name = "android_system_properties"
28 | version = "0.1.5"
29 | source = "registry+https://github.com/rust-lang/crates.io-index"
30 | checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
31 | dependencies = [
32 | "libc",
33 | ]
34 |
35 | [[package]]
36 | name = "anstream"
37 | version = "0.6.15"
38 | source = "registry+https://github.com/rust-lang/crates.io-index"
39 | checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526"
40 | dependencies = [
41 | "anstyle",
42 | "anstyle-parse",
43 | "anstyle-query",
44 | "anstyle-wincon",
45 | "colorchoice",
46 | "is_terminal_polyfill",
47 | "utf8parse",
48 | ]
49 |
50 | [[package]]
51 | name = "anstyle"
52 | version = "1.0.8"
53 | source = "registry+https://github.com/rust-lang/crates.io-index"
54 | checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1"
55 |
56 | [[package]]
57 | name = "anstyle-parse"
58 | version = "0.2.5"
59 | source = "registry+https://github.com/rust-lang/crates.io-index"
60 | checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb"
61 | dependencies = [
62 | "utf8parse",
63 | ]
64 |
65 | [[package]]
66 | name = "anstyle-query"
67 | version = "1.1.1"
68 | source = "registry+https://github.com/rust-lang/crates.io-index"
69 | checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a"
70 | dependencies = [
71 | "windows-sys 0.52.0",
72 | ]
73 |
74 | [[package]]
75 | name = "anstyle-wincon"
76 | version = "3.0.4"
77 | source = "registry+https://github.com/rust-lang/crates.io-index"
78 | checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8"
79 | dependencies = [
80 | "anstyle",
81 | "windows-sys 0.52.0",
82 | ]
83 |
84 | [[package]]
85 | name = "anyhow"
86 | version = "1.0.86"
87 | source = "registry+https://github.com/rust-lang/crates.io-index"
88 | checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da"
89 |
90 | [[package]]
91 | name = "arc-swap"
92 | version = "1.7.1"
93 | source = "registry+https://github.com/rust-lang/crates.io-index"
94 | checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457"
95 |
96 | [[package]]
97 | name = "async-trait"
98 | version = "0.1.81"
99 | source = "registry+https://github.com/rust-lang/crates.io-index"
100 | checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107"
101 | dependencies = [
102 | "proc-macro2",
103 | "quote",
104 | "syn",
105 | ]
106 |
107 | [[package]]
108 | name = "autocfg"
109 | version = "1.3.0"
110 | source = "registry+https://github.com/rust-lang/crates.io-index"
111 | checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0"
112 |
113 | [[package]]
114 | name = "backtrace"
115 | version = "0.3.73"
116 | source = "registry+https://github.com/rust-lang/crates.io-index"
117 | checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a"
118 | dependencies = [
119 | "addr2line",
120 | "cc",
121 | "cfg-if",
122 | "libc",
123 | "miniz_oxide",
124 | "object",
125 | "rustc-demangle",
126 | ]
127 |
128 | [[package]]
129 | name = "base64"
130 | version = "0.21.7"
131 | source = "registry+https://github.com/rust-lang/crates.io-index"
132 | checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567"
133 |
134 | [[package]]
135 | name = "base64"
136 | version = "0.22.1"
137 | source = "registry+https://github.com/rust-lang/crates.io-index"
138 | checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
139 |
140 | [[package]]
141 | name = "bitflags"
142 | version = "2.6.0"
143 | source = "registry+https://github.com/rust-lang/crates.io-index"
144 | checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
145 |
146 | [[package]]
147 | name = "bumpalo"
148 | version = "3.16.0"
149 | source = "registry+https://github.com/rust-lang/crates.io-index"
150 | checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"
151 |
152 | [[package]]
153 | name = "bytes"
154 | version = "1.6.1"
155 | source = "registry+https://github.com/rust-lang/crates.io-index"
156 | checksum = "a12916984aab3fa6e39d655a33e09c0071eb36d6ab3aea5c2d78551f1df6d952"
157 |
158 | [[package]]
159 | name = "cc"
160 | version = "1.1.6"
161 | source = "registry+https://github.com/rust-lang/crates.io-index"
162 | checksum = "2aba8f4e9906c7ce3c73463f62a7f0c65183ada1a2d47e397cc8810827f9694f"
163 |
164 | [[package]]
165 | name = "cfg-if"
166 | version = "1.0.0"
167 | source = "registry+https://github.com/rust-lang/crates.io-index"
168 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
169 |
170 | [[package]]
171 | name = "chrono"
172 | version = "0.4.38"
173 | source = "registry+https://github.com/rust-lang/crates.io-index"
174 | checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401"
175 | dependencies = [
176 | "android-tzdata",
177 | "iana-time-zone",
178 | "js-sys",
179 | "num-traits",
180 | "serde",
181 | "wasm-bindgen",
182 | "windows-targets 0.52.6",
183 | ]
184 |
185 | [[package]]
186 | name = "clap"
187 | version = "4.5.11"
188 | source = "registry+https://github.com/rust-lang/crates.io-index"
189 | checksum = "35723e6a11662c2afb578bcf0b88bf6ea8e21282a953428f240574fcc3a2b5b3"
190 | dependencies = [
191 | "clap_builder",
192 | ]
193 |
194 | [[package]]
195 | name = "clap_builder"
196 | version = "4.5.11"
197 | source = "registry+https://github.com/rust-lang/crates.io-index"
198 | checksum = "49eb96cbfa7cfa35017b7cd548c75b14c3118c98b423041d70562665e07fb0fa"
199 | dependencies = [
200 | "anstream",
201 | "anstyle",
202 | "clap_lex",
203 | "strsim",
204 | ]
205 |
206 | [[package]]
207 | name = "clap_lex"
208 | version = "0.7.2"
209 | source = "registry+https://github.com/rust-lang/crates.io-index"
210 | checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97"
211 |
212 | [[package]]
213 | name = "colorchoice"
214 | version = "1.0.2"
215 | source = "registry+https://github.com/rust-lang/crates.io-index"
216 | checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0"
217 |
218 | [[package]]
219 | name = "colored"
220 | version = "2.1.0"
221 | source = "registry+https://github.com/rust-lang/crates.io-index"
222 | checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8"
223 | dependencies = [
224 | "lazy_static",
225 | "windows-sys 0.48.0",
226 | ]
227 |
228 | [[package]]
229 | name = "core-foundation"
230 | version = "0.9.4"
231 | source = "registry+https://github.com/rust-lang/crates.io-index"
232 | checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f"
233 | dependencies = [
234 | "core-foundation-sys",
235 | "libc",
236 | ]
237 |
238 | [[package]]
239 | name = "core-foundation-sys"
240 | version = "0.8.6"
241 | source = "registry+https://github.com/rust-lang/crates.io-index"
242 | checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f"
243 |
244 | [[package]]
245 | name = "deranged"
246 | version = "0.3.11"
247 | source = "registry+https://github.com/rust-lang/crates.io-index"
248 | checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4"
249 | dependencies = [
250 | "powerfmt",
251 | ]
252 |
253 | [[package]]
254 | name = "either"
255 | version = "1.13.0"
256 | source = "registry+https://github.com/rust-lang/crates.io-index"
257 | checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"
258 |
259 | [[package]]
260 | name = "equivalent"
261 | version = "1.0.1"
262 | source = "registry+https://github.com/rust-lang/crates.io-index"
263 | checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
264 |
265 | [[package]]
266 | name = "fnv"
267 | version = "1.0.7"
268 | source = "registry+https://github.com/rust-lang/crates.io-index"
269 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
270 |
271 | [[package]]
272 | name = "form_urlencoded"
273 | version = "1.2.1"
274 | source = "registry+https://github.com/rust-lang/crates.io-index"
275 | checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456"
276 | dependencies = [
277 | "percent-encoding",
278 | ]
279 |
280 | [[package]]
281 | name = "futures"
282 | version = "0.3.30"
283 | source = "registry+https://github.com/rust-lang/crates.io-index"
284 | checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0"
285 | dependencies = [
286 | "futures-channel",
287 | "futures-core",
288 | "futures-executor",
289 | "futures-io",
290 | "futures-sink",
291 | "futures-task",
292 | "futures-util",
293 | ]
294 |
295 | [[package]]
296 | name = "futures-channel"
297 | version = "0.3.30"
298 | source = "registry+https://github.com/rust-lang/crates.io-index"
299 | checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78"
300 | dependencies = [
301 | "futures-core",
302 | "futures-sink",
303 | ]
304 |
305 | [[package]]
306 | name = "futures-core"
307 | version = "0.3.30"
308 | source = "registry+https://github.com/rust-lang/crates.io-index"
309 | checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d"
310 |
311 | [[package]]
312 | name = "futures-executor"
313 | version = "0.3.30"
314 | source = "registry+https://github.com/rust-lang/crates.io-index"
315 | checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d"
316 | dependencies = [
317 | "futures-core",
318 | "futures-task",
319 | "futures-util",
320 | ]
321 |
322 | [[package]]
323 | name = "futures-io"
324 | version = "0.3.30"
325 | source = "registry+https://github.com/rust-lang/crates.io-index"
326 | checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1"
327 |
328 | [[package]]
329 | name = "futures-macro"
330 | version = "0.3.30"
331 | source = "registry+https://github.com/rust-lang/crates.io-index"
332 | checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac"
333 | dependencies = [
334 | "proc-macro2",
335 | "quote",
336 | "syn",
337 | ]
338 |
339 | [[package]]
340 | name = "futures-sink"
341 | version = "0.3.30"
342 | source = "registry+https://github.com/rust-lang/crates.io-index"
343 | checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5"
344 |
345 | [[package]]
346 | name = "futures-task"
347 | version = "0.3.30"
348 | source = "registry+https://github.com/rust-lang/crates.io-index"
349 | checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004"
350 |
351 | [[package]]
352 | name = "futures-util"
353 | version = "0.3.30"
354 | source = "registry+https://github.com/rust-lang/crates.io-index"
355 | checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48"
356 | dependencies = [
357 | "futures-channel",
358 | "futures-core",
359 | "futures-io",
360 | "futures-macro",
361 | "futures-sink",
362 | "futures-task",
363 | "memchr",
364 | "pin-project-lite",
365 | "pin-utils",
366 | "slab",
367 | ]
368 |
369 | [[package]]
370 | name = "getrandom"
371 | version = "0.2.15"
372 | source = "registry+https://github.com/rust-lang/crates.io-index"
373 | checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7"
374 | dependencies = [
375 | "cfg-if",
376 | "js-sys",
377 | "libc",
378 | "wasi",
379 | "wasm-bindgen",
380 | ]
381 |
382 | [[package]]
383 | name = "gimli"
384 | version = "0.29.0"
385 | source = "registry+https://github.com/rust-lang/crates.io-index"
386 | checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd"
387 |
388 | [[package]]
389 | name = "gitfetch"
390 | version = "0.1.1"
391 | dependencies = [
392 | "anyhow",
393 | "chrono",
394 | "clap",
395 | "colored",
396 | "octocrab",
397 | "serde",
398 | "serde_json",
399 | "thiserror",
400 | "tokio",
401 | "toml",
402 | ]
403 |
404 | [[package]]
405 | name = "hashbrown"
406 | version = "0.14.5"
407 | source = "registry+https://github.com/rust-lang/crates.io-index"
408 | checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
409 |
410 | [[package]]
411 | name = "heck"
412 | version = "0.5.0"
413 | source = "registry+https://github.com/rust-lang/crates.io-index"
414 | checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
415 |
416 | [[package]]
417 | name = "hermit-abi"
418 | version = "0.3.9"
419 | source = "registry+https://github.com/rust-lang/crates.io-index"
420 | checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024"
421 |
422 | [[package]]
423 | name = "http"
424 | version = "1.1.0"
425 | source = "registry+https://github.com/rust-lang/crates.io-index"
426 | checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258"
427 | dependencies = [
428 | "bytes",
429 | "fnv",
430 | "itoa",
431 | ]
432 |
433 | [[package]]
434 | name = "http-body"
435 | version = "1.0.1"
436 | source = "registry+https://github.com/rust-lang/crates.io-index"
437 | checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184"
438 | dependencies = [
439 | "bytes",
440 | "http",
441 | ]
442 |
443 | [[package]]
444 | name = "http-body-util"
445 | version = "0.1.2"
446 | source = "registry+https://github.com/rust-lang/crates.io-index"
447 | checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f"
448 | dependencies = [
449 | "bytes",
450 | "futures-util",
451 | "http",
452 | "http-body",
453 | "pin-project-lite",
454 | ]
455 |
456 | [[package]]
457 | name = "httparse"
458 | version = "1.9.4"
459 | source = "registry+https://github.com/rust-lang/crates.io-index"
460 | checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9"
461 |
462 | [[package]]
463 | name = "hyper"
464 | version = "1.4.1"
465 | source = "registry+https://github.com/rust-lang/crates.io-index"
466 | checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05"
467 | dependencies = [
468 | "bytes",
469 | "futures-channel",
470 | "futures-util",
471 | "http",
472 | "http-body",
473 | "httparse",
474 | "itoa",
475 | "pin-project-lite",
476 | "smallvec",
477 | "tokio",
478 | "want",
479 | ]
480 |
481 | [[package]]
482 | name = "hyper-rustls"
483 | version = "0.26.0"
484 | source = "registry+https://github.com/rust-lang/crates.io-index"
485 | checksum = "a0bea761b46ae2b24eb4aef630d8d1c398157b6fc29e6350ecf090a0b70c952c"
486 | dependencies = [
487 | "futures-util",
488 | "http",
489 | "hyper",
490 | "hyper-util",
491 | "log",
492 | "rustls",
493 | "rustls-native-certs",
494 | "rustls-pki-types",
495 | "tokio",
496 | "tokio-rustls",
497 | "tower-service",
498 | ]
499 |
500 | [[package]]
501 | name = "hyper-timeout"
502 | version = "0.5.1"
503 | source = "registry+https://github.com/rust-lang/crates.io-index"
504 | checksum = "3203a961e5c83b6f5498933e78b6b263e208c197b63e9c6c53cc82ffd3f63793"
505 | dependencies = [
506 | "hyper",
507 | "hyper-util",
508 | "pin-project-lite",
509 | "tokio",
510 | "tower-service",
511 | ]
512 |
513 | [[package]]
514 | name = "hyper-util"
515 | version = "0.1.6"
516 | source = "registry+https://github.com/rust-lang/crates.io-index"
517 | checksum = "3ab92f4f49ee4fb4f997c784b7a2e0fa70050211e0b6a287f898c3c9785ca956"
518 | dependencies = [
519 | "bytes",
520 | "futures-channel",
521 | "futures-util",
522 | "http",
523 | "http-body",
524 | "hyper",
525 | "pin-project-lite",
526 | "socket2",
527 | "tokio",
528 | "tower",
529 | "tower-service",
530 | "tracing",
531 | ]
532 |
533 | [[package]]
534 | name = "iana-time-zone"
535 | version = "0.1.60"
536 | source = "registry+https://github.com/rust-lang/crates.io-index"
537 | checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141"
538 | dependencies = [
539 | "android_system_properties",
540 | "core-foundation-sys",
541 | "iana-time-zone-haiku",
542 | "js-sys",
543 | "wasm-bindgen",
544 | "windows-core",
545 | ]
546 |
547 | [[package]]
548 | name = "iana-time-zone-haiku"
549 | version = "0.1.2"
550 | source = "registry+https://github.com/rust-lang/crates.io-index"
551 | checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
552 | dependencies = [
553 | "cc",
554 | ]
555 |
556 | [[package]]
557 | name = "idna"
558 | version = "0.5.0"
559 | source = "registry+https://github.com/rust-lang/crates.io-index"
560 | checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6"
561 | dependencies = [
562 | "unicode-bidi",
563 | "unicode-normalization",
564 | ]
565 |
566 | [[package]]
567 | name = "indexmap"
568 | version = "2.2.6"
569 | source = "registry+https://github.com/rust-lang/crates.io-index"
570 | checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26"
571 | dependencies = [
572 | "equivalent",
573 | "hashbrown",
574 | ]
575 |
576 | [[package]]
577 | name = "iri-string"
578 | version = "0.7.2"
579 | source = "registry+https://github.com/rust-lang/crates.io-index"
580 | checksum = "7f5f6c2df22c009ac44f6f1499308e7a3ac7ba42cd2378475cc691510e1eef1b"
581 | dependencies = [
582 | "memchr",
583 | "serde",
584 | ]
585 |
586 | [[package]]
587 | name = "is_terminal_polyfill"
588 | version = "1.70.1"
589 | source = "registry+https://github.com/rust-lang/crates.io-index"
590 | checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
591 |
592 | [[package]]
593 | name = "itoa"
594 | version = "1.0.11"
595 | source = "registry+https://github.com/rust-lang/crates.io-index"
596 | checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b"
597 |
598 | [[package]]
599 | name = "js-sys"
600 | version = "0.3.69"
601 | source = "registry+https://github.com/rust-lang/crates.io-index"
602 | checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d"
603 | dependencies = [
604 | "wasm-bindgen",
605 | ]
606 |
607 | [[package]]
608 | name = "jsonwebtoken"
609 | version = "9.3.0"
610 | source = "registry+https://github.com/rust-lang/crates.io-index"
611 | checksum = "b9ae10193d25051e74945f1ea2d0b42e03cc3b890f7e4cc5faa44997d808193f"
612 | dependencies = [
613 | "base64 0.21.7",
614 | "js-sys",
615 | "pem",
616 | "ring",
617 | "serde",
618 | "serde_json",
619 | "simple_asn1",
620 | ]
621 |
622 | [[package]]
623 | name = "lazy_static"
624 | version = "1.5.0"
625 | source = "registry+https://github.com/rust-lang/crates.io-index"
626 | checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
627 |
628 | [[package]]
629 | name = "libc"
630 | version = "0.2.155"
631 | source = "registry+https://github.com/rust-lang/crates.io-index"
632 | checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c"
633 |
634 | [[package]]
635 | name = "lock_api"
636 | version = "0.4.12"
637 | source = "registry+https://github.com/rust-lang/crates.io-index"
638 | checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17"
639 | dependencies = [
640 | "autocfg",
641 | "scopeguard",
642 | ]
643 |
644 | [[package]]
645 | name = "log"
646 | version = "0.4.22"
647 | source = "registry+https://github.com/rust-lang/crates.io-index"
648 | checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
649 |
650 | [[package]]
651 | name = "memchr"
652 | version = "2.7.4"
653 | source = "registry+https://github.com/rust-lang/crates.io-index"
654 | checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
655 |
656 | [[package]]
657 | name = "miniz_oxide"
658 | version = "0.7.4"
659 | source = "registry+https://github.com/rust-lang/crates.io-index"
660 | checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08"
661 | dependencies = [
662 | "adler",
663 | ]
664 |
665 | [[package]]
666 | name = "mio"
667 | version = "1.0.1"
668 | source = "registry+https://github.com/rust-lang/crates.io-index"
669 | checksum = "4569e456d394deccd22ce1c1913e6ea0e54519f577285001215d33557431afe4"
670 | dependencies = [
671 | "hermit-abi",
672 | "libc",
673 | "wasi",
674 | "windows-sys 0.52.0",
675 | ]
676 |
677 | [[package]]
678 | name = "num-bigint"
679 | version = "0.4.6"
680 | source = "registry+https://github.com/rust-lang/crates.io-index"
681 | checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9"
682 | dependencies = [
683 | "num-integer",
684 | "num-traits",
685 | ]
686 |
687 | [[package]]
688 | name = "num-conv"
689 | version = "0.1.0"
690 | source = "registry+https://github.com/rust-lang/crates.io-index"
691 | checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
692 |
693 | [[package]]
694 | name = "num-integer"
695 | version = "0.1.46"
696 | source = "registry+https://github.com/rust-lang/crates.io-index"
697 | checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f"
698 | dependencies = [
699 | "num-traits",
700 | ]
701 |
702 | [[package]]
703 | name = "num-traits"
704 | version = "0.2.19"
705 | source = "registry+https://github.com/rust-lang/crates.io-index"
706 | checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
707 | dependencies = [
708 | "autocfg",
709 | ]
710 |
711 | [[package]]
712 | name = "object"
713 | version = "0.36.2"
714 | source = "registry+https://github.com/rust-lang/crates.io-index"
715 | checksum = "3f203fa8daa7bb185f760ae12bd8e097f63d17041dcdcaf675ac54cdf863170e"
716 | dependencies = [
717 | "memchr",
718 | ]
719 |
720 | [[package]]
721 | name = "octocrab"
722 | version = "0.38.0"
723 | source = "registry+https://github.com/rust-lang/crates.io-index"
724 | checksum = "68a8a3df00728324ad654ecd1ed449a60157c55b7ff8c109af3a35989687c367"
725 | dependencies = [
726 | "arc-swap",
727 | "async-trait",
728 | "base64 0.22.1",
729 | "bytes",
730 | "cfg-if",
731 | "chrono",
732 | "either",
733 | "futures",
734 | "futures-util",
735 | "http",
736 | "http-body",
737 | "http-body-util",
738 | "hyper",
739 | "hyper-rustls",
740 | "hyper-timeout",
741 | "hyper-util",
742 | "jsonwebtoken",
743 | "once_cell",
744 | "percent-encoding",
745 | "pin-project",
746 | "secrecy",
747 | "serde",
748 | "serde_json",
749 | "serde_path_to_error",
750 | "serde_urlencoded",
751 | "snafu",
752 | "tokio",
753 | "tower",
754 | "tower-http",
755 | "tracing",
756 | "url",
757 | ]
758 |
759 | [[package]]
760 | name = "once_cell"
761 | version = "1.19.0"
762 | source = "registry+https://github.com/rust-lang/crates.io-index"
763 | checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"
764 |
765 | [[package]]
766 | name = "openssl-probe"
767 | version = "0.1.5"
768 | source = "registry+https://github.com/rust-lang/crates.io-index"
769 | checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
770 |
771 | [[package]]
772 | name = "parking_lot"
773 | version = "0.12.3"
774 | source = "registry+https://github.com/rust-lang/crates.io-index"
775 | checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27"
776 | dependencies = [
777 | "lock_api",
778 | "parking_lot_core",
779 | ]
780 |
781 | [[package]]
782 | name = "parking_lot_core"
783 | version = "0.9.10"
784 | source = "registry+https://github.com/rust-lang/crates.io-index"
785 | checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8"
786 | dependencies = [
787 | "cfg-if",
788 | "libc",
789 | "redox_syscall",
790 | "smallvec",
791 | "windows-targets 0.52.6",
792 | ]
793 |
794 | [[package]]
795 | name = "pem"
796 | version = "3.0.4"
797 | source = "registry+https://github.com/rust-lang/crates.io-index"
798 | checksum = "8e459365e590736a54c3fa561947c84837534b8e9af6fc5bf781307e82658fae"
799 | dependencies = [
800 | "base64 0.22.1",
801 | "serde",
802 | ]
803 |
804 | [[package]]
805 | name = "percent-encoding"
806 | version = "2.3.1"
807 | source = "registry+https://github.com/rust-lang/crates.io-index"
808 | checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
809 |
810 | [[package]]
811 | name = "pin-project"
812 | version = "1.1.5"
813 | source = "registry+https://github.com/rust-lang/crates.io-index"
814 | checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3"
815 | dependencies = [
816 | "pin-project-internal",
817 | ]
818 |
819 | [[package]]
820 | name = "pin-project-internal"
821 | version = "1.1.5"
822 | source = "registry+https://github.com/rust-lang/crates.io-index"
823 | checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965"
824 | dependencies = [
825 | "proc-macro2",
826 | "quote",
827 | "syn",
828 | ]
829 |
830 | [[package]]
831 | name = "pin-project-lite"
832 | version = "0.2.14"
833 | source = "registry+https://github.com/rust-lang/crates.io-index"
834 | checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02"
835 |
836 | [[package]]
837 | name = "pin-utils"
838 | version = "0.1.0"
839 | source = "registry+https://github.com/rust-lang/crates.io-index"
840 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
841 |
842 | [[package]]
843 | name = "powerfmt"
844 | version = "0.2.0"
845 | source = "registry+https://github.com/rust-lang/crates.io-index"
846 | checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
847 |
848 | [[package]]
849 | name = "proc-macro2"
850 | version = "1.0.86"
851 | source = "registry+https://github.com/rust-lang/crates.io-index"
852 | checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77"
853 | dependencies = [
854 | "unicode-ident",
855 | ]
856 |
857 | [[package]]
858 | name = "quote"
859 | version = "1.0.36"
860 | source = "registry+https://github.com/rust-lang/crates.io-index"
861 | checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7"
862 | dependencies = [
863 | "proc-macro2",
864 | ]
865 |
866 | [[package]]
867 | name = "redox_syscall"
868 | version = "0.5.3"
869 | source = "registry+https://github.com/rust-lang/crates.io-index"
870 | checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4"
871 | dependencies = [
872 | "bitflags",
873 | ]
874 |
875 | [[package]]
876 | name = "ring"
877 | version = "0.17.8"
878 | source = "registry+https://github.com/rust-lang/crates.io-index"
879 | checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d"
880 | dependencies = [
881 | "cc",
882 | "cfg-if",
883 | "getrandom",
884 | "libc",
885 | "spin",
886 | "untrusted",
887 | "windows-sys 0.52.0",
888 | ]
889 |
890 | [[package]]
891 | name = "rustc-demangle"
892 | version = "0.1.24"
893 | source = "registry+https://github.com/rust-lang/crates.io-index"
894 | checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"
895 |
896 | [[package]]
897 | name = "rustls"
898 | version = "0.22.4"
899 | source = "registry+https://github.com/rust-lang/crates.io-index"
900 | checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432"
901 | dependencies = [
902 | "log",
903 | "ring",
904 | "rustls-pki-types",
905 | "rustls-webpki",
906 | "subtle",
907 | "zeroize",
908 | ]
909 |
910 | [[package]]
911 | name = "rustls-native-certs"
912 | version = "0.7.1"
913 | source = "registry+https://github.com/rust-lang/crates.io-index"
914 | checksum = "a88d6d420651b496bdd98684116959239430022a115c1240e6c3993be0b15fba"
915 | dependencies = [
916 | "openssl-probe",
917 | "rustls-pemfile",
918 | "rustls-pki-types",
919 | "schannel",
920 | "security-framework",
921 | ]
922 |
923 | [[package]]
924 | name = "rustls-pemfile"
925 | version = "2.1.2"
926 | source = "registry+https://github.com/rust-lang/crates.io-index"
927 | checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d"
928 | dependencies = [
929 | "base64 0.22.1",
930 | "rustls-pki-types",
931 | ]
932 |
933 | [[package]]
934 | name = "rustls-pki-types"
935 | version = "1.7.0"
936 | source = "registry+https://github.com/rust-lang/crates.io-index"
937 | checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d"
938 |
939 | [[package]]
940 | name = "rustls-webpki"
941 | version = "0.102.6"
942 | source = "registry+https://github.com/rust-lang/crates.io-index"
943 | checksum = "8e6b52d4fda176fd835fdc55a835d4a89b8499cad995885a21149d5ad62f852e"
944 | dependencies = [
945 | "ring",
946 | "rustls-pki-types",
947 | "untrusted",
948 | ]
949 |
950 | [[package]]
951 | name = "ryu"
952 | version = "1.0.18"
953 | source = "registry+https://github.com/rust-lang/crates.io-index"
954 | checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f"
955 |
956 | [[package]]
957 | name = "schannel"
958 | version = "0.1.23"
959 | source = "registry+https://github.com/rust-lang/crates.io-index"
960 | checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534"
961 | dependencies = [
962 | "windows-sys 0.52.0",
963 | ]
964 |
965 | [[package]]
966 | name = "scopeguard"
967 | version = "1.2.0"
968 | source = "registry+https://github.com/rust-lang/crates.io-index"
969 | checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
970 |
971 | [[package]]
972 | name = "secrecy"
973 | version = "0.8.0"
974 | source = "registry+https://github.com/rust-lang/crates.io-index"
975 | checksum = "9bd1c54ea06cfd2f6b63219704de0b9b4f72dcc2b8fdef820be6cd799780e91e"
976 | dependencies = [
977 | "zeroize",
978 | ]
979 |
980 | [[package]]
981 | name = "security-framework"
982 | version = "2.11.1"
983 | source = "registry+https://github.com/rust-lang/crates.io-index"
984 | checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02"
985 | dependencies = [
986 | "bitflags",
987 | "core-foundation",
988 | "core-foundation-sys",
989 | "libc",
990 | "security-framework-sys",
991 | ]
992 |
993 | [[package]]
994 | name = "security-framework-sys"
995 | version = "2.11.1"
996 | source = "registry+https://github.com/rust-lang/crates.io-index"
997 | checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf"
998 | dependencies = [
999 | "core-foundation-sys",
1000 | "libc",
1001 | ]
1002 |
1003 | [[package]]
1004 | name = "serde"
1005 | version = "1.0.204"
1006 | source = "registry+https://github.com/rust-lang/crates.io-index"
1007 | checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12"
1008 | dependencies = [
1009 | "serde_derive",
1010 | ]
1011 |
1012 | [[package]]
1013 | name = "serde_derive"
1014 | version = "1.0.204"
1015 | source = "registry+https://github.com/rust-lang/crates.io-index"
1016 | checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222"
1017 | dependencies = [
1018 | "proc-macro2",
1019 | "quote",
1020 | "syn",
1021 | ]
1022 |
1023 | [[package]]
1024 | name = "serde_json"
1025 | version = "1.0.120"
1026 | source = "registry+https://github.com/rust-lang/crates.io-index"
1027 | checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5"
1028 | dependencies = [
1029 | "itoa",
1030 | "ryu",
1031 | "serde",
1032 | ]
1033 |
1034 | [[package]]
1035 | name = "serde_path_to_error"
1036 | version = "0.1.16"
1037 | source = "registry+https://github.com/rust-lang/crates.io-index"
1038 | checksum = "af99884400da37c88f5e9146b7f1fd0fbcae8f6eec4e9da38b67d05486f814a6"
1039 | dependencies = [
1040 | "itoa",
1041 | "serde",
1042 | ]
1043 |
1044 | [[package]]
1045 | name = "serde_spanned"
1046 | version = "0.6.7"
1047 | source = "registry+https://github.com/rust-lang/crates.io-index"
1048 | checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d"
1049 | dependencies = [
1050 | "serde",
1051 | ]
1052 |
1053 | [[package]]
1054 | name = "serde_urlencoded"
1055 | version = "0.7.1"
1056 | source = "registry+https://github.com/rust-lang/crates.io-index"
1057 | checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd"
1058 | dependencies = [
1059 | "form_urlencoded",
1060 | "itoa",
1061 | "ryu",
1062 | "serde",
1063 | ]
1064 |
1065 | [[package]]
1066 | name = "signal-hook-registry"
1067 | version = "1.4.2"
1068 | source = "registry+https://github.com/rust-lang/crates.io-index"
1069 | checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1"
1070 | dependencies = [
1071 | "libc",
1072 | ]
1073 |
1074 | [[package]]
1075 | name = "simple_asn1"
1076 | version = "0.6.2"
1077 | source = "registry+https://github.com/rust-lang/crates.io-index"
1078 | checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085"
1079 | dependencies = [
1080 | "num-bigint",
1081 | "num-traits",
1082 | "thiserror",
1083 | "time",
1084 | ]
1085 |
1086 | [[package]]
1087 | name = "slab"
1088 | version = "0.4.9"
1089 | source = "registry+https://github.com/rust-lang/crates.io-index"
1090 | checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67"
1091 | dependencies = [
1092 | "autocfg",
1093 | ]
1094 |
1095 | [[package]]
1096 | name = "smallvec"
1097 | version = "1.13.2"
1098 | source = "registry+https://github.com/rust-lang/crates.io-index"
1099 | checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
1100 |
1101 | [[package]]
1102 | name = "snafu"
1103 | version = "0.8.4"
1104 | source = "registry+https://github.com/rust-lang/crates.io-index"
1105 | checksum = "2b835cb902660db3415a672d862905e791e54d306c6e8189168c7f3d9ae1c79d"
1106 | dependencies = [
1107 | "snafu-derive",
1108 | ]
1109 |
1110 | [[package]]
1111 | name = "snafu-derive"
1112 | version = "0.8.4"
1113 | source = "registry+https://github.com/rust-lang/crates.io-index"
1114 | checksum = "38d1e02fca405f6280643174a50c942219f0bbf4dbf7d480f1dd864d6f211ae5"
1115 | dependencies = [
1116 | "heck",
1117 | "proc-macro2",
1118 | "quote",
1119 | "syn",
1120 | ]
1121 |
1122 | [[package]]
1123 | name = "socket2"
1124 | version = "0.5.7"
1125 | source = "registry+https://github.com/rust-lang/crates.io-index"
1126 | checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c"
1127 | dependencies = [
1128 | "libc",
1129 | "windows-sys 0.52.0",
1130 | ]
1131 |
1132 | [[package]]
1133 | name = "spin"
1134 | version = "0.9.8"
1135 | source = "registry+https://github.com/rust-lang/crates.io-index"
1136 | checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"
1137 |
1138 | [[package]]
1139 | name = "strsim"
1140 | version = "0.11.1"
1141 | source = "registry+https://github.com/rust-lang/crates.io-index"
1142 | checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
1143 |
1144 | [[package]]
1145 | name = "subtle"
1146 | version = "2.6.1"
1147 | source = "registry+https://github.com/rust-lang/crates.io-index"
1148 | checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
1149 |
1150 | [[package]]
1151 | name = "syn"
1152 | version = "2.0.72"
1153 | source = "registry+https://github.com/rust-lang/crates.io-index"
1154 | checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af"
1155 | dependencies = [
1156 | "proc-macro2",
1157 | "quote",
1158 | "unicode-ident",
1159 | ]
1160 |
1161 | [[package]]
1162 | name = "thiserror"
1163 | version = "1.0.63"
1164 | source = "registry+https://github.com/rust-lang/crates.io-index"
1165 | checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724"
1166 | dependencies = [
1167 | "thiserror-impl",
1168 | ]
1169 |
1170 | [[package]]
1171 | name = "thiserror-impl"
1172 | version = "1.0.63"
1173 | source = "registry+https://github.com/rust-lang/crates.io-index"
1174 | checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261"
1175 | dependencies = [
1176 | "proc-macro2",
1177 | "quote",
1178 | "syn",
1179 | ]
1180 |
1181 | [[package]]
1182 | name = "time"
1183 | version = "0.3.36"
1184 | source = "registry+https://github.com/rust-lang/crates.io-index"
1185 | checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885"
1186 | dependencies = [
1187 | "deranged",
1188 | "itoa",
1189 | "num-conv",
1190 | "powerfmt",
1191 | "serde",
1192 | "time-core",
1193 | "time-macros",
1194 | ]
1195 |
1196 | [[package]]
1197 | name = "time-core"
1198 | version = "0.1.2"
1199 | source = "registry+https://github.com/rust-lang/crates.io-index"
1200 | checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
1201 |
1202 | [[package]]
1203 | name = "time-macros"
1204 | version = "0.2.18"
1205 | source = "registry+https://github.com/rust-lang/crates.io-index"
1206 | checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf"
1207 | dependencies = [
1208 | "num-conv",
1209 | "time-core",
1210 | ]
1211 |
1212 | [[package]]
1213 | name = "tinyvec"
1214 | version = "1.8.0"
1215 | source = "registry+https://github.com/rust-lang/crates.io-index"
1216 | checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938"
1217 | dependencies = [
1218 | "tinyvec_macros",
1219 | ]
1220 |
1221 | [[package]]
1222 | name = "tinyvec_macros"
1223 | version = "0.1.1"
1224 | source = "registry+https://github.com/rust-lang/crates.io-index"
1225 | checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
1226 |
1227 | [[package]]
1228 | name = "tokio"
1229 | version = "1.39.2"
1230 | source = "registry+https://github.com/rust-lang/crates.io-index"
1231 | checksum = "daa4fb1bc778bd6f04cbfc4bb2d06a7396a8f299dc33ea1900cedaa316f467b1"
1232 | dependencies = [
1233 | "backtrace",
1234 | "bytes",
1235 | "libc",
1236 | "mio",
1237 | "parking_lot",
1238 | "pin-project-lite",
1239 | "signal-hook-registry",
1240 | "socket2",
1241 | "tokio-macros",
1242 | "windows-sys 0.52.0",
1243 | ]
1244 |
1245 | [[package]]
1246 | name = "tokio-macros"
1247 | version = "2.4.0"
1248 | source = "registry+https://github.com/rust-lang/crates.io-index"
1249 | checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752"
1250 | dependencies = [
1251 | "proc-macro2",
1252 | "quote",
1253 | "syn",
1254 | ]
1255 |
1256 | [[package]]
1257 | name = "tokio-rustls"
1258 | version = "0.25.0"
1259 | source = "registry+https://github.com/rust-lang/crates.io-index"
1260 | checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f"
1261 | dependencies = [
1262 | "rustls",
1263 | "rustls-pki-types",
1264 | "tokio",
1265 | ]
1266 |
1267 | [[package]]
1268 | name = "tokio-util"
1269 | version = "0.7.11"
1270 | source = "registry+https://github.com/rust-lang/crates.io-index"
1271 | checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1"
1272 | dependencies = [
1273 | "bytes",
1274 | "futures-core",
1275 | "futures-sink",
1276 | "pin-project-lite",
1277 | "tokio",
1278 | ]
1279 |
1280 | [[package]]
1281 | name = "toml"
1282 | version = "0.8.16"
1283 | source = "registry+https://github.com/rust-lang/crates.io-index"
1284 | checksum = "81967dd0dd2c1ab0bc3468bd7caecc32b8a4aa47d0c8c695d8c2b2108168d62c"
1285 | dependencies = [
1286 | "serde",
1287 | "serde_spanned",
1288 | "toml_datetime",
1289 | "toml_edit",
1290 | ]
1291 |
1292 | [[package]]
1293 | name = "toml_datetime"
1294 | version = "0.6.7"
1295 | source = "registry+https://github.com/rust-lang/crates.io-index"
1296 | checksum = "f8fb9f64314842840f1d940ac544da178732128f1c78c21772e876579e0da1db"
1297 | dependencies = [
1298 | "serde",
1299 | ]
1300 |
1301 | [[package]]
1302 | name = "toml_edit"
1303 | version = "0.22.17"
1304 | source = "registry+https://github.com/rust-lang/crates.io-index"
1305 | checksum = "8d9f8729f5aea9562aac1cc0441f5d6de3cff1ee0c5d67293eeca5eb36ee7c16"
1306 | dependencies = [
1307 | "indexmap",
1308 | "serde",
1309 | "serde_spanned",
1310 | "toml_datetime",
1311 | "winnow",
1312 | ]
1313 |
1314 | [[package]]
1315 | name = "tower"
1316 | version = "0.4.13"
1317 | source = "registry+https://github.com/rust-lang/crates.io-index"
1318 | checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c"
1319 | dependencies = [
1320 | "futures-core",
1321 | "futures-util",
1322 | "pin-project",
1323 | "pin-project-lite",
1324 | "tokio",
1325 | "tokio-util",
1326 | "tower-layer",
1327 | "tower-service",
1328 | "tracing",
1329 | ]
1330 |
1331 | [[package]]
1332 | name = "tower-http"
1333 | version = "0.5.2"
1334 | source = "registry+https://github.com/rust-lang/crates.io-index"
1335 | checksum = "1e9cd434a998747dd2c4276bc96ee2e0c7a2eadf3cae88e52be55a05fa9053f5"
1336 | dependencies = [
1337 | "bitflags",
1338 | "bytes",
1339 | "futures-util",
1340 | "http",
1341 | "http-body",
1342 | "http-body-util",
1343 | "iri-string",
1344 | "pin-project-lite",
1345 | "tower",
1346 | "tower-layer",
1347 | "tower-service",
1348 | "tracing",
1349 | ]
1350 |
1351 | [[package]]
1352 | name = "tower-layer"
1353 | version = "0.3.2"
1354 | source = "registry+https://github.com/rust-lang/crates.io-index"
1355 | checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0"
1356 |
1357 | [[package]]
1358 | name = "tower-service"
1359 | version = "0.3.2"
1360 | source = "registry+https://github.com/rust-lang/crates.io-index"
1361 | checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52"
1362 |
1363 | [[package]]
1364 | name = "tracing"
1365 | version = "0.1.40"
1366 | source = "registry+https://github.com/rust-lang/crates.io-index"
1367 | checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef"
1368 | dependencies = [
1369 | "log",
1370 | "pin-project-lite",
1371 | "tracing-attributes",
1372 | "tracing-core",
1373 | ]
1374 |
1375 | [[package]]
1376 | name = "tracing-attributes"
1377 | version = "0.1.27"
1378 | source = "registry+https://github.com/rust-lang/crates.io-index"
1379 | checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
1380 | dependencies = [
1381 | "proc-macro2",
1382 | "quote",
1383 | "syn",
1384 | ]
1385 |
1386 | [[package]]
1387 | name = "tracing-core"
1388 | version = "0.1.32"
1389 | source = "registry+https://github.com/rust-lang/crates.io-index"
1390 | checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54"
1391 | dependencies = [
1392 | "once_cell",
1393 | ]
1394 |
1395 | [[package]]
1396 | name = "try-lock"
1397 | version = "0.2.5"
1398 | source = "registry+https://github.com/rust-lang/crates.io-index"
1399 | checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
1400 |
1401 | [[package]]
1402 | name = "unicode-bidi"
1403 | version = "0.3.15"
1404 | source = "registry+https://github.com/rust-lang/crates.io-index"
1405 | checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75"
1406 |
1407 | [[package]]
1408 | name = "unicode-ident"
1409 | version = "1.0.12"
1410 | source = "registry+https://github.com/rust-lang/crates.io-index"
1411 | checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
1412 |
1413 | [[package]]
1414 | name = "unicode-normalization"
1415 | version = "0.1.23"
1416 | source = "registry+https://github.com/rust-lang/crates.io-index"
1417 | checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5"
1418 | dependencies = [
1419 | "tinyvec",
1420 | ]
1421 |
1422 | [[package]]
1423 | name = "untrusted"
1424 | version = "0.9.0"
1425 | source = "registry+https://github.com/rust-lang/crates.io-index"
1426 | checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
1427 |
1428 | [[package]]
1429 | name = "url"
1430 | version = "2.5.2"
1431 | source = "registry+https://github.com/rust-lang/crates.io-index"
1432 | checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c"
1433 | dependencies = [
1434 | "form_urlencoded",
1435 | "idna",
1436 | "percent-encoding",
1437 | "serde",
1438 | ]
1439 |
1440 | [[package]]
1441 | name = "utf8parse"
1442 | version = "0.2.2"
1443 | source = "registry+https://github.com/rust-lang/crates.io-index"
1444 | checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
1445 |
1446 | [[package]]
1447 | name = "want"
1448 | version = "0.3.1"
1449 | source = "registry+https://github.com/rust-lang/crates.io-index"
1450 | checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e"
1451 | dependencies = [
1452 | "try-lock",
1453 | ]
1454 |
1455 | [[package]]
1456 | name = "wasi"
1457 | version = "0.11.0+wasi-snapshot-preview1"
1458 | source = "registry+https://github.com/rust-lang/crates.io-index"
1459 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
1460 |
1461 | [[package]]
1462 | name = "wasm-bindgen"
1463 | version = "0.2.92"
1464 | source = "registry+https://github.com/rust-lang/crates.io-index"
1465 | checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8"
1466 | dependencies = [
1467 | "cfg-if",
1468 | "wasm-bindgen-macro",
1469 | ]
1470 |
1471 | [[package]]
1472 | name = "wasm-bindgen-backend"
1473 | version = "0.2.92"
1474 | source = "registry+https://github.com/rust-lang/crates.io-index"
1475 | checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da"
1476 | dependencies = [
1477 | "bumpalo",
1478 | "log",
1479 | "once_cell",
1480 | "proc-macro2",
1481 | "quote",
1482 | "syn",
1483 | "wasm-bindgen-shared",
1484 | ]
1485 |
1486 | [[package]]
1487 | name = "wasm-bindgen-macro"
1488 | version = "0.2.92"
1489 | source = "registry+https://github.com/rust-lang/crates.io-index"
1490 | checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726"
1491 | dependencies = [
1492 | "quote",
1493 | "wasm-bindgen-macro-support",
1494 | ]
1495 |
1496 | [[package]]
1497 | name = "wasm-bindgen-macro-support"
1498 | version = "0.2.92"
1499 | source = "registry+https://github.com/rust-lang/crates.io-index"
1500 | checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7"
1501 | dependencies = [
1502 | "proc-macro2",
1503 | "quote",
1504 | "syn",
1505 | "wasm-bindgen-backend",
1506 | "wasm-bindgen-shared",
1507 | ]
1508 |
1509 | [[package]]
1510 | name = "wasm-bindgen-shared"
1511 | version = "0.2.92"
1512 | source = "registry+https://github.com/rust-lang/crates.io-index"
1513 | checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96"
1514 |
1515 | [[package]]
1516 | name = "windows-core"
1517 | version = "0.52.0"
1518 | source = "registry+https://github.com/rust-lang/crates.io-index"
1519 | checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"
1520 | dependencies = [
1521 | "windows-targets 0.52.6",
1522 | ]
1523 |
1524 | [[package]]
1525 | name = "windows-sys"
1526 | version = "0.48.0"
1527 | source = "registry+https://github.com/rust-lang/crates.io-index"
1528 | checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
1529 | dependencies = [
1530 | "windows-targets 0.48.5",
1531 | ]
1532 |
1533 | [[package]]
1534 | name = "windows-sys"
1535 | version = "0.52.0"
1536 | source = "registry+https://github.com/rust-lang/crates.io-index"
1537 | checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
1538 | dependencies = [
1539 | "windows-targets 0.52.6",
1540 | ]
1541 |
1542 | [[package]]
1543 | name = "windows-targets"
1544 | version = "0.48.5"
1545 | source = "registry+https://github.com/rust-lang/crates.io-index"
1546 | checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
1547 | dependencies = [
1548 | "windows_aarch64_gnullvm 0.48.5",
1549 | "windows_aarch64_msvc 0.48.5",
1550 | "windows_i686_gnu 0.48.5",
1551 | "windows_i686_msvc 0.48.5",
1552 | "windows_x86_64_gnu 0.48.5",
1553 | "windows_x86_64_gnullvm 0.48.5",
1554 | "windows_x86_64_msvc 0.48.5",
1555 | ]
1556 |
1557 | [[package]]
1558 | name = "windows-targets"
1559 | version = "0.52.6"
1560 | source = "registry+https://github.com/rust-lang/crates.io-index"
1561 | checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
1562 | dependencies = [
1563 | "windows_aarch64_gnullvm 0.52.6",
1564 | "windows_aarch64_msvc 0.52.6",
1565 | "windows_i686_gnu 0.52.6",
1566 | "windows_i686_gnullvm",
1567 | "windows_i686_msvc 0.52.6",
1568 | "windows_x86_64_gnu 0.52.6",
1569 | "windows_x86_64_gnullvm 0.52.6",
1570 | "windows_x86_64_msvc 0.52.6",
1571 | ]
1572 |
1573 | [[package]]
1574 | name = "windows_aarch64_gnullvm"
1575 | version = "0.48.5"
1576 | source = "registry+https://github.com/rust-lang/crates.io-index"
1577 | checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
1578 |
1579 | [[package]]
1580 | name = "windows_aarch64_gnullvm"
1581 | version = "0.52.6"
1582 | source = "registry+https://github.com/rust-lang/crates.io-index"
1583 | checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
1584 |
1585 | [[package]]
1586 | name = "windows_aarch64_msvc"
1587 | version = "0.48.5"
1588 | source = "registry+https://github.com/rust-lang/crates.io-index"
1589 | checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
1590 |
1591 | [[package]]
1592 | name = "windows_aarch64_msvc"
1593 | version = "0.52.6"
1594 | source = "registry+https://github.com/rust-lang/crates.io-index"
1595 | checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
1596 |
1597 | [[package]]
1598 | name = "windows_i686_gnu"
1599 | version = "0.48.5"
1600 | source = "registry+https://github.com/rust-lang/crates.io-index"
1601 | checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
1602 |
1603 | [[package]]
1604 | name = "windows_i686_gnu"
1605 | version = "0.52.6"
1606 | source = "registry+https://github.com/rust-lang/crates.io-index"
1607 | checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
1608 |
1609 | [[package]]
1610 | name = "windows_i686_gnullvm"
1611 | version = "0.52.6"
1612 | source = "registry+https://github.com/rust-lang/crates.io-index"
1613 | checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
1614 |
1615 | [[package]]
1616 | name = "windows_i686_msvc"
1617 | version = "0.48.5"
1618 | source = "registry+https://github.com/rust-lang/crates.io-index"
1619 | checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
1620 |
1621 | [[package]]
1622 | name = "windows_i686_msvc"
1623 | version = "0.52.6"
1624 | source = "registry+https://github.com/rust-lang/crates.io-index"
1625 | checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
1626 |
1627 | [[package]]
1628 | name = "windows_x86_64_gnu"
1629 | version = "0.48.5"
1630 | source = "registry+https://github.com/rust-lang/crates.io-index"
1631 | checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
1632 |
1633 | [[package]]
1634 | name = "windows_x86_64_gnu"
1635 | version = "0.52.6"
1636 | source = "registry+https://github.com/rust-lang/crates.io-index"
1637 | checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
1638 |
1639 | [[package]]
1640 | name = "windows_x86_64_gnullvm"
1641 | version = "0.48.5"
1642 | source = "registry+https://github.com/rust-lang/crates.io-index"
1643 | checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
1644 |
1645 | [[package]]
1646 | name = "windows_x86_64_gnullvm"
1647 | version = "0.52.6"
1648 | source = "registry+https://github.com/rust-lang/crates.io-index"
1649 | checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
1650 |
1651 | [[package]]
1652 | name = "windows_x86_64_msvc"
1653 | version = "0.48.5"
1654 | source = "registry+https://github.com/rust-lang/crates.io-index"
1655 | checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
1656 |
1657 | [[package]]
1658 | name = "windows_x86_64_msvc"
1659 | version = "0.52.6"
1660 | source = "registry+https://github.com/rust-lang/crates.io-index"
1661 | checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
1662 |
1663 | [[package]]
1664 | name = "winnow"
1665 | version = "0.6.16"
1666 | source = "registry+https://github.com/rust-lang/crates.io-index"
1667 | checksum = "b480ae9340fc261e6be3e95a1ba86d54ae3f9171132a73ce8d4bbaf68339507c"
1668 | dependencies = [
1669 | "memchr",
1670 | ]
1671 |
1672 | [[package]]
1673 | name = "zeroize"
1674 | version = "1.8.1"
1675 | source = "registry+https://github.com/rust-lang/crates.io-index"
1676 | checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde"
1677 |
--------------------------------------------------------------------------------
/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "gitfetch"
3 | version = "0.1.1"
4 | edition = "2021"
5 | authors = ["FabricSoul"]
6 | description = "A command-line tool to fetch and display Git contribution information"
7 | repository = "https://github.com/FabricSoul/gitfetch"
8 | license = "GPL-3.0"
9 | readme = "README.md"
10 | keywords = ["git", "github", "contributions", "cli", "tui"]
11 | categories = ["command-line-utilities", "development-tools"]
12 |
13 | [dependencies]
14 | clap = "4.5.9"
15 | chrono = "0.4.38"
16 | colored = "2.1.0"
17 | octocrab = "0.38.0"
18 | serde_json = "1.0.120"
19 | anyhow = "1.0.86"
20 | thiserror = "1.0.63"
21 | tokio = { version = "1.39.2", features = ["full"] }
22 | toml = "0.8.16"
23 | serde = "1.0.204"
24 |
25 | [profile.release]
26 | opt-level = 3
27 | lto = true
28 | codegen-units = 1
29 | panic = 'abort'
30 | strip = true
31 |
--------------------------------------------------------------------------------
/Formula/gitfetch.rb:
--------------------------------------------------------------------------------
1 | class Gitfetch < Formula
2 | desc "A command-line tool to fetch and display Git contribution information"
3 | homepage "https://github.com/FabricSoul/gitfetch"
4 | url "https://github.com/FabricSoul/gitfetch/archive/0.1.1.tar.gz"
5 | sha256 "7931778c658de43fa4d85864f4fb7ee22a32000cbbf95fc2a73d6f60721622d5"
6 | license "GPL-3.0"
7 |
8 | depends_on "rust" => :build
9 |
10 | def install
11 | system "cargo", "install", *std_cargo_args
12 | end
13 |
14 | test do
15 | assert_match "gitfetch", shell_output("#{bin}/gitfetch --version")
16 | end
17 | end
18 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 |
635 | Copyright (C) 2024 FabricSoul
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | Copyright (C) 2024 FabricSoul
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------
/PKGBUILD:
--------------------------------------------------------------------------------
1 | # Maintainer: FabricSoul
2 | pkgname=gitfetch
3 | pkgver=0.1.1
4 | pkgrel=1
5 | pkgdesc="A command-line tool to fetch and display Git contribution information"
6 | arch=('x86_64' 'aarch64')
7 | url="https://github.com/FabricSoul/gitfetch"
8 | license=('GPL3')
9 | depends=()
10 | makedepends=('rust' 'cargo')
11 | source=("$pkgname-$pkgver.tar.gz::https://github.com/FabricSoul/gitfetch/archive/$pkgver.tar.gz")
12 | sha256sums=("ca30f159d6b2eb8829b06ad1a72f053dbbe456acf62d8407f7e8a038191547b5") # This will be automatically updated by the GitHub Action
13 |
14 | build() {
15 | cd "$pkgname-$pkgver"
16 | cargo build --release --locked
17 | }
18 |
19 | package() {
20 | cd "$pkgname-$pkgver"
21 | install -Dm755 "target/release/$pkgname" "$pkgdir/usr/bin/$pkgname"
22 | install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
23 | install -Dm644 "README.md" "$pkgdir/usr/share/doc/$pkgname/README.md"
24 | }
25 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Gitfetch
2 |
3 | Gitfetch is a command-line information tool written in Rust, inspired by [Neofetch](https://github.com/dylanaraps/neofetch). It provides a visually appealing way to display Git contribution information.
4 | 
5 |
6 | ## Table of Contents
7 |
8 | - [Features](#features)
9 | - [Installation](#installation)
10 | - [Usage](#usage)
11 | - [Configuration](#configuration)
12 | - [Troubleshooting](#troubleshooting)
13 | - [Roadmap](#roadmap)
14 | - [Contributing](#contributing)
15 | - [License](#license)
16 |
17 | ## Features
18 |
19 | - Prints out contribution information similar to how Neofetch displays system information
20 | - Automatically detects the global Git user
21 | - Allows specifying any user and year for contribution data
22 | - Customizable contribution graph and output color
23 |
24 | ## Installation
25 |
26 | ### Prerequisites
27 |
28 | - Git (optional, for global user detection)
29 |
30 | ### Arch Linux
31 |
32 | ```bash
33 | yay -S gitfetch
34 | ```
35 |
36 | or
37 |
38 | ```bash
39 | paru -S gitfetch
40 | ```
41 |
42 | ### MacOS
43 |
44 | ```bash
45 | brew tap fabricsoul/gitfetch https://github.com/FabricSoul/gitfetch
46 | brew install gitfetch
47 | ```
48 |
49 | ### Installing from crates.io
50 |
51 | Install Gitfetch directly from crates.io using Cargo:
52 |
53 | ```bash
54 | cargo install --locked gitfetch
55 | ```
56 |
57 | ## Usage
58 |
59 | 1. Generate a new [GitHub Token](https://github.com/settings/tokens) with the `read:user` scope to fetch data from GitHub.
60 |
61 | 2. Add your token to Gitfetch:
62 |
63 | ```bash
64 | gitfetch add-token
65 | ```
66 |
67 | 3. Run Gitfetch:
68 |
69 | ```bash
70 | gitfetch
71 | ```
72 |
73 | ### Optional Arguments
74 |
75 | - `-u` or `--user`: Specify a GitHub username
76 | - `-y` or `--year`: Specify a year for contribution data
77 |
78 | Example:
79 |
80 | ```bash
81 | gitfetch -u FabricSoul -y 2023
82 | ```
83 |
84 | ## Configuration
85 |
86 | Gitfetch can be customized using a configuration file located at `~/.config/gitfetch/config.toml`. This file allows you to personalize the appearance and behavior of Gitfetch.
87 |
88 | ### Configuration File Structure
89 |
90 | The `config.toml` file is divided into three main sections:
91 |
92 | 1. `[graph_colors]`: Defines the colors for different contribution levels in the graph.
93 | 2. `[text_colors]`: Sets the color for informational text.
94 | 3. `[graph_data]`: Configures the thresholds for contribution levels.
95 |
96 | ### Detailed Configuration Options
97 |
98 | #### [graph_colors]
99 |
100 | This section defines the colors for the contribution graph. Colors are specified in RGB format.
101 |
102 | ```toml
103 | [graph_colors]
104 | level1 = "39,168,68" # Light green for low contributions
105 | level2 = "45,135,67" # Medium green
106 | level3 = "31,97,51" # Dark green
107 | level4 = "23,70,38" # Very dark green for high contributions
108 | ```
109 |
110 | - Each level represents a different intensity of contributions.
111 | - Values should be comma-separated RGB values (0-255 for each component).
112 |
113 | #### [text_colors]
114 |
115 | This section sets the color for the informational text displayed alongside the graph.
116 |
117 | ```toml
118 | [text_colors]
119 | info_color = "86,182,194" # Light blue for info text
120 | ```
121 |
122 | - Specified as comma-separated RGB values.
123 |
124 | #### [graph_data]
125 |
126 | This section defines the thresholds for each contribution level in the graph.
127 |
128 | ```toml
129 | [graph_data]
130 | percentiles = [30, 60, 80, 100]
131 | ```
132 |
133 | - The `percentiles` array contains four values representing the breakpoints for each contribution level.
134 | - Values are percentiles of the user's contribution range.
135 | - In this example:
136 | - 0-30th percentile: level1 color
137 | - 31-60th percentile: level2 color
138 | - 61-80th percentile: level3 color
139 | - 81-100th percentile: level4 color
140 |
141 | ### Example Configuration
142 |
143 | Here's a complete example of a `config.toml` file:
144 |
145 | ```toml
146 | [graph_colors]
147 | level1 = "39,168,68"
148 | level2 = "45,135,67"
149 | level3 = "31,97,51"
150 | level4 = "23,70,38"
151 |
152 | [text_colors]
153 | info_color = "86,182,194"
154 |
155 | [graph_data]
156 | percentiles = [30, 60, 80, 100]
157 | ```
158 |
159 | ### Applying Configuration Changes
160 |
161 | After modifying the `config.toml` file:
162 |
163 | 1. Save the changes.
164 | 2. Run Gitfetch again. The new configuration will be automatically applied.
165 |
166 | ### Resetting to Default Configuration
167 |
168 | To reset to the default configuration:
169 |
170 | 1. Delete the `config.toml` file.
171 | 2. Run Gitfetch. A new `config.toml` file with default values will be created.
172 |
173 | ## Troubleshooting
174 |
175 | If you encounter issues with your configuration:
176 |
177 | - Ensure all RGB values are within the 0-255 range.
178 | - Check that the `percentiles` array has exactly four values.
179 | - Verify that the `config.toml` file is properly formatted TOML.
180 |
181 | If problems persist, you can temporarily rename or remove the `config.toml` file to use the default configuration while troubleshooting.
182 |
183 | [... rest of the README unchanged ...]
184 |
185 | ## Roadmap
186 |
187 | - [x] Customize the graph color
188 | - [x] Customize output text color
189 | - [x] Customize graph display
190 | - [x] Use `git` to get username
191 | - [x] Specify a user
192 | - [x] Specify a year
193 | - [x] Display highest contribution
194 | - [x] Display longest streak
195 | - [x] Display current streak
196 | - [ ] Add support for other Git hosting platforms
197 |
198 | ## Contributing
199 |
200 | We welcome contributions to Gitfetch! Here's how you can help:
201 |
202 | 1. Fork the project
203 | 2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
204 | 3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
205 | 4. Push to the branch (`git push origin feature/AmazingFeature`)
206 | 5. Open a pull request
207 |
208 | ## License
209 |
210 | This project is licensed under the GPL-3.0 License - see the [LICENSE](LICENSE) file for details.
211 |
212 | ---
213 |
214 | **Note:** Gitfetch is under active development. Features and documentation may be incomplete or subject to change. We appreciate your feedback and contributions!
215 |
--------------------------------------------------------------------------------
/image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FabricSoul/gitfetch/b5e90baceb85c6b2c56ab9208facd167844f431f/image.png
--------------------------------------------------------------------------------
/src/config_manager.rs:
--------------------------------------------------------------------------------
1 | use anyhow::{Context, Result};
2 | use serde::{Deserialize, Serialize};
3 | use std::fs;
4 | use std::path::PathBuf;
5 |
6 | #[derive(Debug, Deserialize, Serialize)]
7 | pub struct Config {
8 | pub github_token: Option,
9 | pub graph_colors: Option,
10 | pub text_colors: Option,
11 | pub graph_data: Option,
12 | }
13 |
14 | #[derive(Debug, Deserialize, Serialize)]
15 | pub struct GraphColors {
16 | pub level1: String,
17 | pub level2: String,
18 | pub level3: String,
19 | pub level4: String,
20 | }
21 |
22 | #[derive(Debug, Deserialize, Serialize)]
23 | pub struct TextColors {
24 | pub info_color: String,
25 | }
26 |
27 | #[derive(Debug, Deserialize, Serialize)]
28 | pub struct GraphData {
29 | pub percentiles: [usize; 4],
30 | }
31 | impl Default for Config {
32 | fn default() -> Self {
33 | Config {
34 | github_token: None,
35 | graph_colors: Some(GraphColors {
36 | level1: "13,68,41".to_string(),
37 | level2: "1,108,49".to_string(),
38 | level3: "38,166,65".to_string(),
39 | level4: "57,211,83".to_string(),
40 | }),
41 | text_colors: Some(TextColors {
42 | info_color: "0,255,255".to_string(),
43 | }),
44 | graph_data: Some(GraphData {
45 | percentiles: [0, 30, 60, 90],
46 | }),
47 | }
48 | }
49 | }
50 |
51 | fn get_config_path() -> PathBuf {
52 | let home = std::env::var("HOME").expect("HOME environment variable not set");
53 | PathBuf::from(home)
54 | .join(".config")
55 | .join("gitfetch")
56 | .join("config.toml")
57 | }
58 |
59 | pub fn read_config() -> Result {
60 | let config_path = get_config_path();
61 | let default_config = Config::default();
62 | if config_path.exists() {
63 | let config_str = fs::read_to_string(&config_path)
64 | .with_context(|| format!("Failed to read config file: {:?}", config_path))?;
65 | let mut config: Config = toml::from_str(&config_str)
66 | .with_context(|| format!("Failed to parse config file: {:?}", config_path))?;
67 |
68 | // Merge with default config
69 | if config.graph_colors.is_none() {
70 | config.graph_colors = default_config.graph_colors;
71 | }
72 | if config.text_colors.is_none() {
73 | config.text_colors = default_config.text_colors;
74 | }
75 | if config.graph_data.is_none() {
76 | config.graph_data = default_config.graph_data;
77 | }
78 |
79 | Ok(config)
80 | } else {
81 | Ok(Config::default())
82 | }
83 | }
84 |
85 | fn save_config(config: &Config) -> Result<()> {
86 | let config_path = get_config_path();
87 | let config_dir = config_path.parent().unwrap();
88 | fs::create_dir_all(config_dir)
89 | .with_context(|| format!("Failed to create config directory: {:?}", config_dir))?;
90 | let config_str =
91 | toml::to_string_pretty(config).with_context(|| "Failed to serialize config")?;
92 | fs::write(&config_path, config_str)
93 | .with_context(|| format!("Failed to write config file: {:?}", config_path))?;
94 | Ok(())
95 | }
96 |
97 | pub fn add_token(token: &str) -> Result<()> {
98 | let mut config = read_config()?;
99 | config.github_token = Some(token.to_string());
100 | save_config(&config)?;
101 | println!("Token added successfully.");
102 | Ok(())
103 | }
104 |
--------------------------------------------------------------------------------
/src/contribution_analyzer.rs:
--------------------------------------------------------------------------------
1 | use chrono::NaiveDate;
2 |
3 | pub struct ContributionData {
4 | pub total: u32,
5 | pub longest_streak: u32,
6 | pub current_streak: u32,
7 | pub max_contributions: u32,
8 | pub daily_contributions: Vec<(NaiveDate, u32)>,
9 | }
10 |
11 | pub fn calculate_contribution_ranges(
12 | daily_contributions: &[(NaiveDate, u32)],
13 | percentiles: &[usize; 4],
14 | ) -> Vec {
15 | let mut contributions: Vec = daily_contributions
16 | .iter()
17 | .map(|&(_, count)| count)
18 | .filter(|&count| count > 0) // Exclude days with zero contributions
19 | .collect();
20 |
21 | if contributions.is_empty() {
22 | return vec![0, 1, 2, 3, 4]; // Default range if no contributions
23 | }
24 |
25 | contributions.sort_unstable();
26 |
27 | // Calculate Q1, Q3, and IQR for outlier detection
28 | let q1_index = contributions.len() / 4;
29 | let q3_index = 3 * contributions.len() / 4;
30 | let q1 = contributions[q1_index] as f64;
31 | let q3 = contributions[q3_index] as f64;
32 | let iqr = q3 - q1;
33 |
34 | // Define outlier threshold (1.5 times IQR)
35 | let outlier_threshold = (q3 + 1.5 * iqr).round() as u32;
36 |
37 | // Filter out outliers
38 | let filtered_contributions: Vec = contributions
39 | .into_iter()
40 | .filter(|&count| count <= outlier_threshold)
41 | .collect();
42 |
43 | if filtered_contributions.is_empty() {
44 | return vec![0, 1, 2, 3, 4]; // Fallback if all values are considered outliers
45 | }
46 |
47 | let max_contribution = *filtered_contributions.last().unwrap();
48 |
49 | // Calculate percentiles
50 | let mut ranges = vec![0]; // Always start with 0 for no contributions
51 |
52 | for &p in &percentiles[1..] {
53 | let index = p * filtered_contributions.len() / 100;
54 | let value = filtered_contributions[index.min(filtered_contributions.len() - 1)];
55 | if value > *ranges.last().unwrap() {
56 | ranges.push(value);
57 | }
58 | }
59 |
60 | // Add the maximum contribution (excluding outliers) as the last range
61 | if max_contribution > *ranges.last().unwrap() {
62 | ranges.push(max_contribution);
63 | }
64 |
65 | // Ensure we have 5 distinct values
66 | while ranges.len() < 5 {
67 | let last = *ranges.last().unwrap();
68 | let new_value = if last < max_contribution {
69 | last + 1
70 | } else {
71 | last
72 | };
73 | ranges.push(new_value);
74 | }
75 |
76 | ranges
77 | }
78 |
--------------------------------------------------------------------------------
/src/errors.rs:
--------------------------------------------------------------------------------
1 | use thiserror::Error;
2 |
3 | #[derive(Error, Debug)]
4 | pub enum FetchError {
5 | #[error("Failed to parse year: {0}")]
6 | YearParseError(#[from] std::num::ParseIntError),
7 |
8 | #[error("Failed to create date")]
9 | DateCreationError,
10 |
11 | #[error("GitHub API error: {0}")]
12 | GitHubApiError(#[from] octocrab::Error),
13 |
14 | #[error("Unexpected response format")]
15 | UnexpectedResponseFormat,
16 | }
17 |
--------------------------------------------------------------------------------
/src/github_client.rs:
--------------------------------------------------------------------------------
1 | use crate::contribution_analyzer::ContributionData;
2 | use crate::errors::FetchError;
3 | use chrono::NaiveDate;
4 | use octocrab::Octocrab;
5 | use serde_json::Value;
6 |
7 | pub async fn fetch_contributions(
8 | username: &str,
9 | year: &str,
10 | year_specified: bool,
11 | octocrab: Octocrab,
12 | ) -> Result {
13 | let query: &str;
14 | let response: serde_json::Value;
15 |
16 | if year_specified {
17 | let year_int: i32 = year.parse()?;
18 | let from = format!("{}-01-01T00:00:00Z", year_int);
19 | let to = format!("{}-12-31T23:59:59Z", year_int);
20 |
21 | query = r#"
22 | query($userName:String!, $from:DateTime!, $to:DateTime!) {
23 | user(login: $userName) {
24 | contributionsCollection(from: $from, to: $to) {
25 | contributionCalendar {
26 | totalContributions
27 | weeks {
28 | contributionDays {
29 | contributionCount
30 | date
31 | }
32 | }
33 | }
34 | }
35 | }
36 | }
37 | "#;
38 |
39 | response = octocrab
40 | .graphql(&serde_json::json!({
41 | "query": query,
42 | "variables": {
43 | "userName": username,
44 | "from": from,
45 | "to": to
46 | }
47 | }))
48 | .await?;
49 | } else {
50 | query = r#"
51 | query($userName:String!) {
52 | user(login: $userName) {
53 | contributionsCollection {
54 | contributionCalendar {
55 | totalContributions
56 | weeks {
57 | contributionDays {
58 | contributionCount
59 | date
60 | }
61 | }
62 | }
63 | }
64 | }
65 | }
66 | "#;
67 |
68 | response = octocrab
69 | .graphql(&serde_json::json!({
70 | "query": query,
71 | "variables": {
72 | "userName": username
73 | }
74 | }))
75 | .await?;
76 | }
77 |
78 | parse_contribution_data(&response)
79 | }
80 |
81 | fn parse_contribution_data(value: &Value) -> Result {
82 | let calendar = &value["data"]["user"]["contributionsCollection"]["contributionCalendar"];
83 |
84 | let total = calendar["totalContributions"]
85 | .as_u64()
86 | .ok_or(FetchError::UnexpectedResponseFormat)? as u32;
87 |
88 | let mut daily_contributions = Vec::new();
89 | let mut longest_streak = 0;
90 | let mut max_contributions = 0;
91 | let mut streak = 0;
92 |
93 | if let Some(weeks) = calendar["weeks"].as_array() {
94 | for week in weeks {
95 | if let Some(days) = week["contributionDays"].as_array() {
96 | for day in days {
97 | let count = day["contributionCount"]
98 | .as_u64()
99 | .ok_or(FetchError::UnexpectedResponseFormat)?
100 | as u32;
101 | let date = NaiveDate::parse_from_str(
102 | day["date"]
103 | .as_str()
104 | .ok_or(FetchError::UnexpectedResponseFormat)?,
105 | "%Y-%m-%d",
106 | )
107 | .map_err(|_| FetchError::DateCreationError)?;
108 |
109 | daily_contributions.push((date, count));
110 |
111 | if count > 0 {
112 | streak += 1;
113 | longest_streak = longest_streak.max(streak);
114 | max_contributions = max_contributions.max(count);
115 | } else {
116 | streak = 0;
117 | }
118 | }
119 | }
120 | }
121 | }
122 |
123 | // Calculate current streak
124 | let current_streak = daily_contributions
125 | .iter()
126 | .rev()
127 | .take_while(|(_, count)| *count > 0)
128 | .count() as u32;
129 |
130 | Ok(ContributionData {
131 | total,
132 | longest_streak,
133 | current_streak,
134 | max_contributions,
135 | daily_contributions,
136 | })
137 | }
138 |
--------------------------------------------------------------------------------
/src/graph_generator.rs:
--------------------------------------------------------------------------------
1 | use crate::contribution_analyzer::calculate_contribution_ranges;
2 | use chrono::{Datelike, Duration, Local, NaiveDate};
3 | use colored::Colorize;
4 | use colored::CustomColor;
5 |
6 | use crate::config_manager::{Config, GraphColors, TextColors};
7 |
8 | pub fn generate_contribution_graph(
9 | daily_contributions: &[(NaiveDate, u32)],
10 | year_specified: bool,
11 | config: &Config,
12 | ) -> String {
13 | let mut graph = String::new();
14 | let current_date = Local::now().naive_local().date();
15 | let months = [
16 | "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec",
17 | ];
18 |
19 | // Calculate the date range
20 | let start_date = daily_contributions
21 | .first()
22 | .map(|(date, _)| *date)
23 | .unwrap_or(current_date);
24 | let end_date = daily_contributions
25 | .last()
26 | .map(|(date, _)| *date)
27 | .unwrap_or(current_date);
28 | let total_days = (end_date - start_date).num_days() as usize;
29 | let num_weeks = (total_days / 7) + 1;
30 |
31 | let percentiles = config
32 | .graph_data
33 | .as_ref()
34 | .map(|data| data.percentiles)
35 | .unwrap_or([0, 30, 60, 90]);
36 |
37 | // Calculate contribution ranges
38 | let contribution_ranges = calculate_contribution_ranges(daily_contributions, &percentiles);
39 | // Calculate column-based month spans
40 | let month_spans = calculate_month_spans(start_date, end_date, num_weeks, year_specified);
41 |
42 | // Add month names with proper spacing
43 | graph += " ";
44 | for (month, span) in month_spans.iter() {
45 | graph += &format!("{: "Mon",
53 | 3 => "Wed",
54 | 5 => "Fri",
55 | _ => " ",
56 | };
57 | graph += &format!("{} ", weekday);
58 | for week in 0..num_weeks {
59 | let index = week * 7 + day;
60 | if index < daily_contributions.len() {
61 | let (_, count) = daily_contributions[index];
62 | let symbol = match count {
63 | 0 => " ",
64 | c if c <= contribution_ranges[1] => "░░",
65 | c if c <= contribution_ranges[2] => "▒▒",
66 | c if c <= contribution_ranges[3] => "▓▓",
67 | _ => "██",
68 | };
69 | graph += symbol;
70 | } else {
71 | graph += " ";
72 | }
73 | }
74 | graph += "\n";
75 | }
76 | graph += "\nLess ░░ ▒▒ ▓▓ ██ More\n";
77 | graph
78 | }
79 |
80 | pub fn print_colored_graph(graph: &str, info: &[String], config: &Config) {
81 | let graph_lines: Vec<&str> = graph.lines().collect();
82 |
83 | // Print the first line
84 | println!("{}", graph_lines[0]);
85 |
86 | // Define default graph colors
87 | let default_graph_colors = GraphColors {
88 | level1: "13,68,41".to_string(),
89 | level2: "1,108,49".to_string(),
90 | level3: "38,166,65".to_string(),
91 | level4: "57,211,83".to_string(),
92 | };
93 |
94 | // Get graph colors from config or use defaults
95 | let graph_colors = config
96 | .graph_colors
97 | .as_ref()
98 | .unwrap_or(&default_graph_colors);
99 |
100 | // Print graph
101 | for (_index, graph_line) in graph_lines.iter().enumerate().skip(1) {
102 | for c in graph_line.chars() {
103 | let colored_char = match c {
104 | '░' => c
105 | .to_string()
106 | .custom_color(get_color(&graph_colors.level1).unwrap_or(CustomColor {
107 | r: 13,
108 | g: 68,
109 | b: 41,
110 | })),
111 | '▒' => c
112 | .to_string()
113 | .custom_color(get_color(&graph_colors.level2).unwrap_or(CustomColor {
114 | r: 1,
115 | g: 108,
116 | b: 49,
117 | })),
118 | '▓' => c
119 | .to_string()
120 | .custom_color(get_color(&graph_colors.level3).unwrap_or(CustomColor {
121 | r: 38,
122 | g: 166,
123 | b: 65,
124 | })),
125 | '█' => c
126 | .to_string()
127 | .custom_color(get_color(&graph_colors.level4).unwrap_or(CustomColor {
128 | r: 57,
129 | g: 211,
130 | b: 83,
131 | })),
132 | _ => c.to_string().normal(),
133 | };
134 | print!("{}", colored_char);
135 | }
136 | println!();
137 | }
138 |
139 | // Print separator
140 | println!();
141 |
142 | // Define default text colors
143 | let default_text_colors = TextColors {
144 | info_color: "0,255,255".to_string(), // Cyan
145 | };
146 |
147 | // Get text colors from config or use defaults
148 | let text_colors = config.text_colors.as_ref().unwrap_or(&default_text_colors);
149 |
150 | // Print colored info
151 | for (index, info_line) in info.iter().enumerate() {
152 | if index == 0 {
153 | let parts: Vec<&str> = info_line.split('@').collect();
154 | print!(
155 | "{}@",
156 | parts[0]
157 | .custom_color(get_color(&text_colors.info_color).unwrap_or(CustomColor {
158 | r: 255,
159 | g: 255,
160 | b: 255
161 | }))
162 | .bold()
163 | );
164 | println!(
165 | "{}",
166 | parts[1]
167 | .custom_color(get_color(&text_colors.info_color).unwrap_or(CustomColor {
168 | r: 255,
169 | g: 255,
170 | b: 255
171 | }))
172 | .bold()
173 | );
174 | } else {
175 | let parts: Vec<&str> = info_line.split(": ").collect();
176 | if parts.len() == 2 {
177 | print!(
178 | "{}: ",
179 | parts[0]
180 | .custom_color(get_color(&text_colors.info_color).unwrap_or(CustomColor {
181 | r: 0,
182 | g: 255,
183 | b: 255
184 | }))
185 | .bold()
186 | );
187 | println!("{}", parts[1]);
188 | } else {
189 | println!("{}", info_line);
190 | }
191 | }
192 | }
193 | }
194 |
195 | fn calculate_month_spans(
196 | start_date: NaiveDate,
197 | end_date: NaiveDate,
198 | num_weeks: usize,
199 | year_specified: bool,
200 | ) -> Vec<(usize, usize)> {
201 | let mut month_spans = Vec::new();
202 | let mut current_date = start_date;
203 | let mut span_start = 0;
204 | let mut current_month = (current_date.year(), current_date.month0() as usize);
205 |
206 | for week in 0..num_weeks {
207 | let week_start_month = (current_date.year(), current_date.month0() as usize);
208 | let week_end = current_date + Duration::days(6);
209 |
210 | if week_start_month != current_month || (year_specified && week == num_weeks - 1) {
211 | // Month changed or last week reached
212 | let span = week - span_start;
213 | if span > 0 {
214 | month_spans.push((current_month.1, span));
215 | }
216 |
217 | if year_specified && week_start_month != current_month {
218 | // If year is specified and month changed, add empty spans for skipped months
219 | let mut next_month = (current_month.1 + 1) % 12;
220 | while next_month != week_start_month.1 {
221 | month_spans.push((next_month, 0));
222 | next_month = (next_month + 1) % 12;
223 | }
224 | }
225 |
226 | current_month = week_start_month;
227 | span_start = week;
228 | }
229 |
230 | current_date = week_end + Duration::days(1);
231 | if current_date > end_date {
232 | break;
233 | }
234 | }
235 |
236 | // // Add the last month if it's not empty
237 | if span_start < num_weeks {
238 | month_spans.push((current_month.1, num_weeks - span_start));
239 | }
240 |
241 | // Ensure all months are represented when year is specified
242 | if year_specified {
243 | let mut full_year_spans = vec![(0, 0); 12];
244 | for (month, span) in month_spans {
245 | full_year_spans[month] = (month, span);
246 | }
247 | month_spans = full_year_spans;
248 | }
249 | // Remove the first index if the span is lesser than 3
250 | if !year_specified {
251 | if let Some(&(_, span)) = month_spans.first() {
252 | if span < 3 {
253 | month_spans.remove(0);
254 | }
255 | }
256 | }
257 |
258 | // Ensure we don't have an empty graph if the date range is too short
259 | if month_spans.is_empty() {
260 | month_spans.push((start_date.month0() as usize, 1));
261 | }
262 | month_spans
263 | }
264 |
265 | fn get_color(color_str: &str) -> Result {
266 | let parts: Vec<&str> = color_str.split(',').collect();
267 | if parts.len() != 3 {
268 | anyhow::bail!("Invalid color format. Expected 'r,g,b'");
269 | }
270 | Ok(CustomColor {
271 | r: parts[0].parse()?,
272 | g: parts[1].parse()?,
273 | b: parts[2].parse()?,
274 | })
275 | }
276 |
--------------------------------------------------------------------------------
/src/main.rs:
--------------------------------------------------------------------------------
1 | use anyhow::Result;
2 | mod contribution_analyzer;
3 | use chrono::Local;
4 | mod errors;
5 | mod github_client;
6 | mod graph_generator;
7 | use clap::{arg, Command as clapCommand};
8 | use core::result::Result::Ok;
9 | use errors::FetchError;
10 | use github_client::fetch_contributions;
11 | use graph_generator::{generate_contribution_graph, print_colored_graph};
12 | use octocrab::Octocrab;
13 | use std::process::Command;
14 |
15 | mod config_manager;
16 | #[tokio::main]
17 | async fn main() -> Result<()> {
18 | let matches = clapCommand::new("gitfetch")
19 | .version("0.1.0")
20 | .about("Fetch and display GitHub contributions")
21 | .arg(arg!(-u --username ).required(false))
22 | .arg(arg!(-y --year ).required(false))
23 | .subcommand(
24 | clapCommand::new("add-token")
25 | .about("Add GitHub access token")
26 | .arg(arg!( "GitHub access token")),
27 | )
28 | .get_matches();
29 | if let Some(matches) = matches.subcommand_matches("add-token") {
30 | let token = matches.get_one::("TOKEN").unwrap();
31 | return config_manager::add_token(token);
32 | }
33 |
34 | let config = config_manager::read_config()?;
35 | let username = match matches.get_one::("username") {
36 | Some(name) => name.to_string(),
37 | None => match get_git_global_username() {
38 | Some(name) => name,
39 | None => {
40 | eprintln!("Error: No username provided and couldn't fetch git global user.");
41 | eprintln!("Please provide a username with -u or set your git global user.name");
42 | std::process::exit(1);
43 | }
44 | },
45 | };
46 |
47 | let year_specified = matches.contains_id("year");
48 | let year = matches
49 | .get_one::("year")
50 | .cloned()
51 | .unwrap_or_else(|| Local::now().format("%Y").to_string());
52 |
53 | let token = match config.github_token {
54 | Some(ref token) => token,
55 | None => {
56 | eprintln!("GitHub token not found in config. Please run 'gitfetch add-token ' to add your token.");
57 | std::process::exit(1);
58 | }
59 | };
60 |
61 | let octocrab = Octocrab::builder()
62 | .personal_token(token.to_string())
63 | .build()?;
64 |
65 | // Fetch contribution data
66 | let contributions = match fetch_contributions(&username, &year, year_specified, octocrab).await
67 | {
68 | Ok(data) => data,
69 | Err(e) => {
70 | eprintln!("Error fetching contributions: {}", e);
71 | match e {
72 | FetchError::YearParseError(_) => {
73 | eprintln!("Invalid year format provided");
74 | }
75 | FetchError::DateCreationError => {
76 | eprintln!("Failed to create a valid date");
77 | }
78 | FetchError::GitHubApiError(api_error) => {
79 | eprintln!("GitHub API error: {}", api_error);
80 | }
81 | FetchError::UnexpectedResponseFormat => {
82 | eprintln!("Received unexpected response format from GitHub");
83 | }
84 | }
85 | std::process::exit(1);
86 | }
87 | };
88 |
89 | let graph =
90 | generate_contribution_graph(&contributions.daily_contributions, year_specified, &config);
91 |
92 | // Prepare info text
93 | let info = vec![
94 | format!("{}@{}", username, year),
95 | format!("Total contributions: {}", contributions.total),
96 | format!("Longest Streak: {} days", contributions.longest_streak),
97 | format!("Current Streak: {} days", contributions.current_streak),
98 | format!(
99 | "Most Contributions in a Day: {}",
100 | contributions.max_contributions
101 | ),
102 | ];
103 |
104 | // Print colored graph
105 | print_colored_graph(&graph, &info, &config);
106 |
107 | Ok(())
108 | }
109 |
110 | fn get_git_global_username() -> Option {
111 | let output = Command::new("git")
112 | .args(["config", "--global", "user.name"])
113 | .output()
114 | .ok()?;
115 |
116 | if output.status.success() {
117 | String::from_utf8(output.stdout)
118 | .ok()
119 | .map(|s| s.trim().to_string())
120 | } else {
121 | None
122 | }
123 | }
124 |
--------------------------------------------------------------------------------