Tuesday, June 21, 2016

Batch file to print all public GitHub repositories for a given user

@echo off
@setlocal enableextensions enabledelayedexpansion

set gituser=vurdalakov

set curl=curl.exe

for /f "delims=" %%a in ('%curl% -i -s https://api.github.com/users/%gituser%/repos') do (
        set line=%%a
        if not !line!==!line:"name"=! (
            set line=!line:"=!
            set line=!line:name:=!
            set line=!line:,=!
            set line=!line: =!
            echo !line!
        )
    )
)


No comments:

Post a Comment