Git Product home page Git Product logo

top-languages-readme's Introduction

Top-Langauges - Readme

preview

Add development language usage statistics on your Profile Readme.

Did not need to fork this repository.

Usage

  1. Go to your Profile Readme

  2. move to <username>/<username>/actions

  3. Click New workflow

  4. Set up a workflow yourself

  5. Delete the default content

  6. copy the following code and paste it to your new workflow

    name: Top-Languages Readme
    
    on:
        workflow_dispatch:
        schedule:
            # Runs at 15:20 UTC
            - cron: '20 15 * * *'
    
    permissions:
        contents: write
    
    jobs:
        update-readme:
            name: Update this repo's README
            runs-on: ubuntu-latest
            steps:
            - name: Extract branch name
              id: extract_branch
              if: github.event_name != 'pull_request'
              shell: bash
              run: |
                echo "##[set-output name=BRANCH_NAME;]$(echo ${GITHUB_REF#refs/heads/})"
    
            - name: Generate and update README
              uses: stephanoskomnenos/top-languages-readme@master
              with:
                BRANCH_NAME: ${{ steps.extract_branch.outputs.BRANCH_NAME }}
  7. Add a comment to your README.md like this:

    <!--START_SECTION:top_language-->
    <!--END_SECTION:top_language-->
  8. Go to Action menu

  9. Click Top-Languages Readme under All workflows

  10. Click Run workflow

Including private repository

  1. Move to Github Settings -> Developer settings -> Personal access tokens -> Generate new token

  2. Check repo

  3. Click generate token

  4. Copy token

    token generated

  5. Go to your Profile Readme

  6. Move to Settings -> Secrets

  7. Click New Secret

  8. input GH_TOKEN in Name

  9. input the copied token in Value

  10. Click Add secret

  11. Edit you workflow file

    name: Top-Languages Readme
    
    on:
        workflow_dispatch:
        schedule:
            # Runs at 15:20 UTC
            - cron: '20 15 * * *'
    
    permissions:
        contents: write
    
    jobs:
        update-readme:
            name: Update this repo's README
            runs-on: ubuntu-latest
            steps:
            - name: Extract branch name
              id: extract_branch
              if: github.event_name != 'pull_request'
              shell: bash
              run: |
                echo "##[set-output name=BRANCH_NAME;]$(echo ${GITHUB_REF#refs/heads/})"
    
            - name: Generate and update README
              uses: stephanoskomnenos/top-languages-readme@master
              with:
                GH_TOKEN: ${{ secrets.GH_TOKEN }}
                BRANCH_NAME: ${{ steps.extract_branch.outputs.BRANCH_NAME }}

With option (Optional)

name: Top-Languages Readme

on:
    workflow_dispatch:
    schedule:
        # Runs at 15:20 UTC
        - cron: '20 15 * * *'

permissions:
    contents: write

jobs:
    update-readme:
        name: Update this repo's README
        runs-on: ubuntu-latest
        steps:
        - name: Extract branch name
          id: extract_branch
          if: github.event_name != 'pull_request'
          shell: bash
          run: |
            echo "##[set-output name=BRANCH_NAME;]$(echo ${GITHUB_REF#refs/heads/})"

        - name: Generate and update README
          uses: stephanoskomnenos/top-languages-readme@master
          with:
            BRANCH_NAME: ${{ steps.extract_branch.outputs.BRANCH_NAME }}
            COMMIT_MESSAGE: "Updated the Graph with new Metrics" # Optional
            USERNAME: <username> # Optional
            LINE_FORMAT: "$NAME   $SIZE $BAR  $PERCENT" # Optional
            LIST_COUNT: 10 # Optional
            BLOCKS: "░█" # Optional
            BAR_WIDTH: 25 # Optional
            SHOW_TOTAL: false # Optional
            TOP_TOTAL: false # Optional
            SHOW_TOTAL_SEPARATOR: true # Optional
  • BLOCKS styles:

    • default : ░█
    BLOCKS default example (55.5%)
    O ██████
    ░█ ██████░░░░
    ░▒▓█ █████▓░░░░
    ⣀⣄⣤⣦⣶⣷⣿ ⣿⣿⣿⣿⣿⣶⣀⣀⣀⣀
    ⣀⣄⣆⣇⣧⣷⣿ ⣿⣿⣿⣿⣿⣧⣀⣀⣀⣀
    ▁▂▃▄▅▆▇█ █████▅▁▁▁▁
    ▏▎▍▌▋▊▉█ █████▋▏▏▏▏
    ○◔◐◕⬤ ⬤⬤⬤⬤⬤◕○○○○
    □◱◧▣■ ■■■■■▣□□□□
    □◱▨▩■ ■■■■■▩□□□□
    □▨▩■ ■■■■■▩□□□□
    □◱▥▦■ ■■■■■▦□□□□

top-languages-readme's People

Contributors

ryuanerin avatar stephanoskomnenos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.