Skip to content

Commit 0d72072

Browse files
authored
GitHub contributions (raycast#626)
* Add GitHub Contributions Script * Add GitHub Contributions Script * raycast#626 - Move to Dev Utils / Github , Image moved, refresh hto 2h * raycast#626 - @unnamedd - fix: Add Light and Dark mode icon
1 parent fc4dcb2 commit 0d72072

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
3+
# Required parameters:
4+
# @raycast.schemaVersion 1
5+
# @raycast.title GitHub Contributions
6+
# @raycast.mode inline
7+
# @raycast.refreshTime 2h
8+
9+
# Optional parameters:
10+
# @raycast.packageName GitHub Contributions
11+
# @raycast.icon images/github-logo.png
12+
# @raycast.iconDark images/github-logo-iconDark.png
13+
14+
# Documentation:
15+
# @raycast.description Show GitHub user contributions from the current year
16+
# @raycast.author Astrit
17+
# @raycast.authorURL https://github.com/astrit
18+
19+
# GitHub username is required
20+
username=""
21+
22+
url="https://github.com/users/${username}/contributions"
23+
result=$(curl -s $url )
24+
resultFilter=$(echo "$result" | sed -n -e '/<h2 class="f4 text-normal mb-2">/,/<\/h2>/p')
25+
resultCleanup=$(echo "$resultFilter" | sed -e 's/<[^>]*>//g')
26+
27+
echo $resultCleanup

0 commit comments

Comments
 (0)