अपना README बदलें

कमांड को --readme से अपने README की ओर इंगित करें, या कार्ड URL तर्कों के रूप में दें। यह हर URL को उस कार्ड के साथ दिखाता है जिसमें वह बदला, छोड़े गए URL की सूची देता है, फिर कॉन्फ़िग दिखाता है या उसे --output में लिखता है। उदाहरण के लिए, नीचे का README उसके बाद वाला कॉन्फ़िग बन जाता है।

shell
npx profile-graphics migrate --readme README.md --output profile-graphics.yml
npx profile-graphics migrate "https://github-readme-stats.vercel.app/api?username=octocat"
README.md
![Stats](https://github-readme-stats.vercel.app/api?username=octocat&theme=tokyonight&hide_border=true)
![Languages](https://github-readme-stats.vercel.app/api/top-langs?username=octocat&layout=compact&langs_count=8)
![Streak](https://streak-stats.demolab.com?user=octocat&theme=tokyonight)
![Trophies](https://github-profile-trophy.vercel.app/?username=octocat&column=4&row=2)
profile-graphics.yml
# yaml-language-server: $schema=https://unpkg.com/profile-graphics/profile-graphics.schema.json
provider:
  type: github
  user: octocat
charts:
  - summary
  - langs
  - streak
  - trophy
theme:
  preset: tokyo-night
svg:
  frame: none
cards:
  langs:
    style: donut-compact
    count: 8
  trophy:
    columns: 4
    max: 8

फिर क्विकस्टार्ट से वर्कफ़्लो जोड़ें और पुराने इमेज URL को बनी हुई फ़ाइलों से बदलें।

समर्थित कार्ड

सेवा URL में शामिल है कार्ड
github-readme-stats /api summary
github-readme-stats /api/top-langs langs
github-readme-stats /api/wakatime coding-languages
github-readme-streak-stats streak-stats streak
github-profile-trophy github-profile-trophy trophy
github-readme-activity-graph activity-graph activity
github-profile-summary-cards profile-details, productive-time, stats, repos-per-language, most-commit-language profile-details, productive-time, summary, langs

विकल्पों का मिलान

उनका विकल्प profile-graphics
username, user provider.user
theme theme.preset
hide_border=true svg.frame: none
locale calendar.locale
layout cards.langs.style
langs_count cards.langs.count
hide cards.langs.exclude
column, row cards.trophy.columns, cards.trophy.max
days cards.activity.days

थीम के नाम 43 प्रीसेट से मिलाए जाते हैं, tokyonight, onedark, gruvbox, dark और highcontrast जैसे उपनामों सहित। layout=compact, donut-compact स्टाइल बनता है, और donut, donut-vertical और pie, donut बनते हैं।

सेल्फ़-होस्टिंग के लिए सीधे बदलने वाले URL

अगर आप अपना कार्ड सर्वर चलाते हैं (profile-graphics serve या profile-graphics/server हैंडलर), तो पुराने इमेज URL रख सकते हैं और सिर्फ़ डोमेन बदल सकते हैं: सर्वर github-readme-stats और github-readme-streak-stats के पाथ और क्वेरी पैरामीटर का जवाब उसी मिलान से देता है जो migrate इस्तेमाल करता है।

README.md
![Stats](https://cards.example.com/api?username=octocat&show_icons=true&theme=radical)
![Languages](https://cards.example.com/api/top-langs?username=octocat&layout=compact)
![Streak](https://cards.example.com/?user=octocat&theme=dark)
पाथ कार्ड
/api summary
/api/top-langs langs
/api/pin repo-card
/api/wakatime wakatime
/streak, /?user= streak
उनका पैरामीटर profile-graphics
username, user provider.user
hide, show cards.summary.metrics
hide_rank, rank_icon cards.summary.show_rank, rank_style
include_all_commits provider.commits_scope: all
count_private provider.count_private
commits_year calendar.year
number_format, short_numbers svg.number_format
custom_title, hide_title cards.<card>.title, hide_title
card_width, card_height cards.<card>.width, height
hide_border, border_radius svg.frame: none, svg.frame_radius
disable_animations svg.animation: none
theme, locale theme.preset, calendar.locale
title_color, icon_color theme.colors.chart.accent, accent2
text_color, bg_color, border_color theme.colors.text, background, border
layout, langs_count, hide cards.langs.style, count, exclude
exclude_repo provider.exclude_repos
repo, show_owner, description_lines_count cards.repo_card.repo, show_owner, description_lines
layout, langs_count, display_format cards.wakatime.layout, limit, display_format
hide, range, hide_progress cards.wakatime.hide, range, layout: list
mode, exclude_days, date_format cards.streak.mode, exclude_days, date_format
hide_total_contributions, hide_current_streak, hide_longest_streak cards.streak.show
type output.format
background, border theme.colors.background, border
ring, fire, currStreakNum, sideNums, currStreakLabel, sideLabels, dates, stroke cards.streak.colors
  • अनजान पैरामीटर अनदेखे किए जाते हैं, और show_icons, line_height, text_bold, number_precision, size_weight, count_weight और stats_format भी। अमान्य मान पर पैरामीटर का नाम बताने वाले संदेश के साथ 400 मिलता है।
  • मेल खाते प्रीसेट के बिना थीम डिफ़ॉल्ट थीम पर लौटती है; रंग # के साथ या बिना हेक्स मान होते हैं, और bg_color, 30,e96443,904e95 जैसा ग्रेडिएंट भी लेता है।
  • कार्ड सर्वर टोकन से GitHub के लिए बनते हैं। कोई क्वेरी टोकन, API होस्ट, डेटा स्रोत या आउटपुट कभी नहीं बदलती: api_domain समर्थित नहीं है, और /api/wakatime सर्वर की WAKATIME_API_KEY वाला अकाउंट दिखाता है।
  • streak-stats का type=json समर्थित नहीं है; /github/<user>.json आँकड़े JSON में लौटाता है।

अंतर

  • मेल खाते प्रीसेट के बिना थीम हटा दी जाती है, और कॉन्फ़िग नेटिव ऑटो थीम पर लौट आता है।
  • उन सेवाओं के कस्टम रंग, शीर्षक और दूसरे विकल्प साथ नहीं आते; उन्हें theme.colors, svg.frame_title और cards से सेट करें।
  • पहला मिला यूज़रनेम लिया जाता है; न मिले तो कॉन्फ़िग में your-username लिखा होता है।
  • कॉन्फ़िग हमेशा provider: github इस्तेमाल करता है; GitLab या Codeberg के लिए इसे बदलें।