mirror of
https://github.com/yawaflua/yawaflua.git
synced 2026-07-25 17:21:00 +03:00
Compare commits
154
Commits
22148eba30
..
main
@@ -1,54 +0,0 @@
|
|||||||
# Visit https://github.com/lowlighter/metrics#-documentation for full reference
|
|
||||||
name: Metrics
|
|
||||||
on:
|
|
||||||
# Schedule updates (each hour)
|
|
||||||
schedule: [{cron: "0 12 * * *"}]
|
|
||||||
# Lines below let you run workflow manually and on each commit
|
|
||||||
workflow_dispatch:
|
|
||||||
push: {branches: ["master", "main"]}
|
|
||||||
jobs:
|
|
||||||
github-metrics:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
steps:
|
|
||||||
- uses: lowlighter/metrics@latest
|
|
||||||
with:
|
|
||||||
# Your GitHub token
|
|
||||||
# The following scopes are required:
|
|
||||||
# - public_access (default scope)
|
|
||||||
# The following additional scopes may be required:
|
|
||||||
# - read:org (for organization related metrics)
|
|
||||||
# - read:user (for user related data)
|
|
||||||
# - read:packages (for some packages related data)
|
|
||||||
# - repo (optional, if you want to include private repositories)
|
|
||||||
token: ${{ secrets.METRICS_TOKEN }}
|
|
||||||
|
|
||||||
# Options
|
|
||||||
user: yawaflua
|
|
||||||
template: classic
|
|
||||||
base: header, activity, community, repositories, metadata
|
|
||||||
base_hireable: yes
|
|
||||||
config_timezone: Asia/Jerusalem
|
|
||||||
plugin_habits: yes
|
|
||||||
plugin_habits_charts_type: classic
|
|
||||||
plugin_habits_days: 14
|
|
||||||
plugin_habits_facts: yes
|
|
||||||
plugin_habits_from: 200
|
|
||||||
plugin_habits_languages_limit: 8
|
|
||||||
plugin_habits_languages_threshold: 0%
|
|
||||||
plugin_languages: yes
|
|
||||||
plugin_languages_analysis_timeout: 90
|
|
||||||
plugin_languages_analysis_timeout_repositories: 9.5
|
|
||||||
plugin_languages_categories: markup, programming
|
|
||||||
plugin_languages_colors: github
|
|
||||||
plugin_languages_details: percentage
|
|
||||||
plugin_languages_ignored: html, css, CMake
|
|
||||||
plugin_languages_limit: 10
|
|
||||||
plugin_languages_other: yes
|
|
||||||
plugin_languages_recent_categories: markup, programming
|
|
||||||
plugin_languages_recent_days: 14
|
|
||||||
plugin_languages_recent_load: 300
|
|
||||||
plugin_languages_sections: most-used
|
|
||||||
plugin_languages_threshold: 0%
|
|
||||||
repositories_affiliations: owner
|
|
||||||
@@ -0,0 +1,121 @@
|
|||||||
|
name: Language Stats
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule: [{cron: "0 0 * * *"}]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
language-stats:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Generate language SVG
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.METRICS_TOKEN }}
|
||||||
|
run: |
|
||||||
|
python3 << 'EOF'
|
||||||
|
import urllib.request, json, math
|
||||||
|
|
||||||
|
token = "${{ secrets.METRICS_TOKEN }}"
|
||||||
|
headers = {"Authorization": f"Bearer {token}", "Accept": "application/vnd.github+json"}
|
||||||
|
|
||||||
|
def get_repos(url):
|
||||||
|
repos = []
|
||||||
|
while url:
|
||||||
|
req = urllib.request.Request(url, headers=headers)
|
||||||
|
with urllib.request.urlopen(req) as r:
|
||||||
|
repos += json.loads(r.read())
|
||||||
|
link = r.headers.get('Link', '')
|
||||||
|
url = None
|
||||||
|
for part in link.split(','):
|
||||||
|
if 'rel="next"' in part:
|
||||||
|
url = part.split(';')[0].strip().strip('<>')
|
||||||
|
return repos
|
||||||
|
|
||||||
|
# все репы пользователя
|
||||||
|
all_repos = []
|
||||||
|
all_repos += get_repos("https://api.github.com/user/repos?per_page=100&affiliation=owner,collaborator,organization_member&visibility=all")
|
||||||
|
|
||||||
|
repo_names = list({r['full_name'] for r in all_repos})
|
||||||
|
print(f"Found {len(repo_names)} repositories")
|
||||||
|
|
||||||
|
ignored = {'HTML', 'CSS', 'CMake', 'Dockerfile', 'Makefile', 'YAML', 'JSON',
|
||||||
|
'XML', 'Markdown', 'Text', 'SVG', 'Batchfile', 'PowerShell',
|
||||||
|
'EditorConfig', 'Ini', 'TOML', 'Nix', 'SCSS', 'GLSL'}
|
||||||
|
skipped_repos = {'yawaflua/mt7902_temp'}
|
||||||
|
colors = {
|
||||||
|
'C#': '#178600', 'C++': '#f34b7d', 'JavaScript': '#f1e05a',
|
||||||
|
'TypeScript': '#3178c6', 'Go': '#00ADD8', 'Python': '#3572A5',
|
||||||
|
'Java': '#b07219', 'Vue': '#41b883', 'Shell': '#89e051'
|
||||||
|
}
|
||||||
|
|
||||||
|
langs = {}
|
||||||
|
for repo in repo_names:
|
||||||
|
if repo in skipped_repos:
|
||||||
|
continue
|
||||||
|
try:
|
||||||
|
req = urllib.request.Request(f"https://api.github.com/repos/{repo}/languages", headers=headers)
|
||||||
|
with urllib.request.urlopen(req) as r:
|
||||||
|
data = json.loads(r.read())
|
||||||
|
for lang, bytes_ in data.items():
|
||||||
|
if lang not in ignored:
|
||||||
|
langs[lang] = langs.get(lang, 0) + bytes_
|
||||||
|
except Exception as e:
|
||||||
|
print(f"Skip {repo}: {e}")
|
||||||
|
|
||||||
|
langs = dict(sorted(langs.items(), key=lambda x: x[1], reverse=True)[:10])
|
||||||
|
total = sum(langs.values())
|
||||||
|
|
||||||
|
if total == 0:
|
||||||
|
print("No data")
|
||||||
|
exit(1)
|
||||||
|
|
||||||
|
bar_width = 448
|
||||||
|
row_h = 30
|
||||||
|
padding = 16
|
||||||
|
bar_h = 8
|
||||||
|
header_h = 44
|
||||||
|
height = header_h + bar_h + padding + math.ceil(len(langs) / 2) * row_h + padding * 2
|
||||||
|
|
||||||
|
svg = f'<svg xmlns="http://www.w3.org/2000/svg" width="480" height="{height}" style="font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif;font-size:13px;">\n'
|
||||||
|
svg += f'<rect width="480" height="{height}" rx="6" fill="#fff" stroke="#e1e4e8"/>\n'
|
||||||
|
svg += f'<text x="16" y="28" font-size="15" font-weight="600" fill="#24292e">Most used languages</text>\n'
|
||||||
|
|
||||||
|
cx = 0
|
||||||
|
for lang, count in langs.items():
|
||||||
|
w = count / total * bar_width
|
||||||
|
color = colors.get(lang, '#ededed')
|
||||||
|
svg += f'<rect x="{16 + cx:.2f}" y="{header_h}" width="{w:.2f}" height="{bar_h}" fill="{color}"/>\n'
|
||||||
|
cx += w
|
||||||
|
|
||||||
|
for i, (lang, count) in enumerate(langs.items()):
|
||||||
|
col = i % 2
|
||||||
|
row = i // 2
|
||||||
|
lx = 16 + col * 232
|
||||||
|
ly = header_h + bar_h + padding + row * row_h + 14
|
||||||
|
pct = count / total * 100
|
||||||
|
color = colors.get(lang, '#ededed')
|
||||||
|
svg += f'<circle cx="{lx + 6}" cy="{ly - 4}" r="6" fill="{color}"/>\n'
|
||||||
|
svg += f'<text x="{lx + 18}" y="{ly}" fill="#24292e" font-size="12">{lang}</text>\n'
|
||||||
|
svg += f'<text x="{lx + 18}" y="{ly + 14}" fill="#586069" font-size="11">{pct:.1f}%</text>\n'
|
||||||
|
|
||||||
|
svg += '</svg>'
|
||||||
|
|
||||||
|
with open('languages.svg', 'w') as f:
|
||||||
|
f.write(svg)
|
||||||
|
print(f"Done: {len(langs)} languages, {total} bytes total")
|
||||||
|
for l, b in langs.items():
|
||||||
|
print(f" {l}: {b/total*100:.1f}%")
|
||||||
|
EOF
|
||||||
|
|
||||||
|
- name: Commit SVG
|
||||||
|
run: |
|
||||||
|
git config user.name "github-actions[bot]"
|
||||||
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
|
git add languages.svg
|
||||||
|
git diff --staged --quiet || git commit -m "Update languages.svg - [Skip GitHub Action]"
|
||||||
|
git push
|
||||||
|
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
# Visit https://github.com/lowlighter/metrics#-documentation for full reference
|
||||||
|
name: Metrics
|
||||||
|
on:
|
||||||
|
# Schedule updates (each hour)
|
||||||
|
schedule: [{cron: "0 0 * * *"}]
|
||||||
|
workflow_dispatch:
|
||||||
|
jobs:
|
||||||
|
github-metrics:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
steps:
|
||||||
|
- uses: lowlighter/metrics@latest
|
||||||
|
with:
|
||||||
|
# Your GitHub token
|
||||||
|
# The following scopes are required:
|
||||||
|
# - public_access (default scope)
|
||||||
|
# The following additional scopes may be required:
|
||||||
|
# - read:org (for organization related metrics)
|
||||||
|
# - read:user (for user related data)
|
||||||
|
# - read:packages (for some packages related data)
|
||||||
|
# - repo (optional, if you want to include private repositories)
|
||||||
|
token: ${{ secrets.METRICS_TOKEN }}
|
||||||
|
|
||||||
|
# Options
|
||||||
|
user: yawaflua
|
||||||
|
template: classic
|
||||||
|
base: header, activity, community, repositories, metadata
|
||||||
|
base_hireable: yes
|
||||||
|
base_indepth: yes
|
||||||
|
config_timezone: Asia/Jerusalem
|
||||||
|
plugin_steam: yes
|
||||||
|
plugin_steam_token: ${{ secrets.STEAM_TOKEN }}
|
||||||
|
plugin_steam_achievements_limit: 2
|
||||||
|
plugin_steam_games_limit: 1
|
||||||
|
plugin_steam_playtime_threshold: 2
|
||||||
|
plugin_steam_recent_games_limit: 1
|
||||||
|
plugin_steam_sections: player, most-played, recently-played
|
||||||
|
plugin_steam_user: "76561198810888396"
|
||||||
|
repositories_forks: yes
|
||||||
@@ -55,6 +55,8 @@ class AboutMe
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
### 🌱 I am currently studying for the frontend frameworks, such as Vue.js, React
|
### 🌱 I am currently studying for the frontend frameworks, such as Vue.js, React
|
||||||
|
|
||||||
### 💼 Available for hire! Contact me in [Discord](https://discord.com/users/945317832290336798), [Telegram](https://t.me/yawaflua) or [e-mail](mailto:yawaflua.il@gmail.com)
|
### 💼 Available for hire! Contact me in [Discord](https://discord.com/users/945317832290336798), [Telegram](https://t.me/yawaflua) or [e-mail](mailto:yawaflua.il@gmail.com)
|
||||||
|
|||||||
+156
-43
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 95 KiB |
@@ -0,0 +1,40 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="480" height="250" style="font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif;font-size:13px;">
|
||||||
|
<rect width="480" height="250" rx="6" fill="#fff" stroke="#e1e4e8"/>
|
||||||
|
<text x="16" y="28" font-size="15" font-weight="600" fill="#24292e">Most used languages</text>
|
||||||
|
<rect x="16.00" y="44" width="162.30" height="8" fill="#178600"/>
|
||||||
|
<rect x="178.30" y="44" width="69.96" height="8" fill="#f34b7d"/>
|
||||||
|
<rect x="248.26" y="44" width="52.24" height="8" fill="#f1e05a"/>
|
||||||
|
<rect x="300.50" y="44" width="43.81" height="8" fill="#3572A5"/>
|
||||||
|
<rect x="344.31" y="44" width="41.65" height="8" fill="#3178c6"/>
|
||||||
|
<rect x="385.96" y="44" width="40.81" height="8" fill="#41b883"/>
|
||||||
|
<rect x="426.77" y="44" width="27.39" height="8" fill="#b07219"/>
|
||||||
|
<rect x="454.16" y="44" width="9.77" height="8" fill="#00ADD8"/>
|
||||||
|
<rect x="463.93" y="44" width="0.07" height="8" fill="#89e051"/>
|
||||||
|
<circle cx="22" cy="78" r="6" fill="#178600"/>
|
||||||
|
<text x="34" y="82" fill="#24292e" font-size="12">C#</text>
|
||||||
|
<text x="34" y="96" fill="#586069" font-size="11">36.2%</text>
|
||||||
|
<circle cx="254" cy="78" r="6" fill="#f34b7d"/>
|
||||||
|
<text x="266" y="82" fill="#24292e" font-size="12">C++</text>
|
||||||
|
<text x="266" y="96" fill="#586069" font-size="11">15.6%</text>
|
||||||
|
<circle cx="22" cy="108" r="6" fill="#f1e05a"/>
|
||||||
|
<text x="34" y="112" fill="#24292e" font-size="12">JavaScript</text>
|
||||||
|
<text x="34" y="126" fill="#586069" font-size="11">11.7%</text>
|
||||||
|
<circle cx="254" cy="108" r="6" fill="#3572A5"/>
|
||||||
|
<text x="266" y="112" fill="#24292e" font-size="12">Python</text>
|
||||||
|
<text x="266" y="126" fill="#586069" font-size="11">9.8%</text>
|
||||||
|
<circle cx="22" cy="138" r="6" fill="#3178c6"/>
|
||||||
|
<text x="34" y="142" fill="#24292e" font-size="12">TypeScript</text>
|
||||||
|
<text x="34" y="156" fill="#586069" font-size="11">9.3%</text>
|
||||||
|
<circle cx="254" cy="138" r="6" fill="#41b883"/>
|
||||||
|
<text x="266" y="142" fill="#24292e" font-size="12">Vue</text>
|
||||||
|
<text x="266" y="156" fill="#586069" font-size="11">9.1%</text>
|
||||||
|
<circle cx="22" cy="168" r="6" fill="#b07219"/>
|
||||||
|
<text x="34" y="172" fill="#24292e" font-size="12">Java</text>
|
||||||
|
<text x="34" y="186" fill="#586069" font-size="11">6.1%</text>
|
||||||
|
<circle cx="254" cy="168" r="6" fill="#00ADD8"/>
|
||||||
|
<text x="266" y="172" fill="#24292e" font-size="12">Go</text>
|
||||||
|
<text x="266" y="186" fill="#586069" font-size="11">2.2%</text>
|
||||||
|
<circle cx="22" cy="198" r="6" fill="#89e051"/>
|
||||||
|
<text x="34" y="202" fill="#24292e" font-size="12">Shell</text>
|
||||||
|
<text x="34" y="216" fill="#586069" font-size="11">0.0%</text>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 2.5 KiB |
Reference in New Issue
Block a user