Package: gist-neko
gist-nekoCLI for downloading all gists from a specified user.Requirementsrequestsis used to get information from the Github API and download the gists (if you don't use -g/--git to download using git).Note thatrequestswill not download submodules but git will.If you want to build this on your own, you can install the requirements withpipinstall-rrequirements.txtor install the package by runningpipinstallgist-nekoPython's nativeos(used to check for whether a folder exists or not),argparse(parse return request and set command argument),subprocess(callgit cloneandgit pullon gists) andsetuptools(used to build the script) packages are also used.How it worksI send requests tohttps://api.github.com/users/{username}/gists, depending on the arguments passed to the script, I either download all the gists in specified user's account with eitherrequestsorgit.You can run the script withgist-neko-u<github-username>-t<github-personal-access-token>(optional-youwilljustdownloadthepublicgistsinsteadofallgists)-e(optional-meansyouwillbeusingenvironmentvariables.Thisoverrides-uand-t)-g(optional-meansyouwillbedownloadingusinggit)-gu<github-username>(thiswillset<github-username>asenvironmentvariable)-gpat<github-personal-access-token>(thiswillset<github-personal-access-token>asenvironmentvariable)ExamplesSetting Environment VariablesThis will set the specifiedGithub usernameandpersonal access tokenas yourGITHUB_USERNAMEandGITHUB_PERSONAL_ACCESS_TOKENenvironment variable respectively. On Linux this is a bit buggy.gist-neko-gu<github-username>-gpat<github-personal-access-token>This will set the specifiedGithub usernameas yourGITHUB_USERNAMEenvironment variable. On Linux this is a bit buggy.gist-neko-gu<github-username>This will set the specifiedpersonal access tokenas yourGITHUB_PERSONAL_ACCESS_TOKENenvironment variable. On Linux this is a bit buggy.gist-neko-gpat<github-personal-access-token>Public Gists without Environment VariablesThis will use the specifiedGithub usernameand download allpublic gistsusingrequests.gist-neko-u<github-username>-t<github-personal-access-token>This will use the specifiedGithub usernameand download allpublic gistsusinggit.gist-neko-u<github-username>-t<github-personal-access-token>-g<anything>Public and Private Gists without Environment VariablesThis will use the specifiedGithub usernameandpersonal access tokenand download allpublic and private gistsusingrequests.gist-neko-u<github-username>-t<github-personal-access-token>This will use the specifiedGithub usernameandpersonal access tokenand download allpublic and private gistsusinggit.gist-neko-u<github-username>-t<github-personal-access-token>-g<anything>Public and Private Gists with Environment VariablesThis will use theGithub usernameandpersonal access tokenin theenvironment variablesand download allpublic and private gistsusingrequests.gist-neko-e<anything>This will use theGithub usernameandpersonal access tokenin theenvironment variablesand download allpublic and private gistsusinggit.gist-neko-e<anything>-g<anything>Public and Private Gists with Environment Variables (Overriding passed Username and Personal Access Token)This willignorethe passedGithub usernameandpersonal access tokeninstead usingenvironment variablesand download allpublic and private gistsusingrequests.gist-neko-u<github-username>-t<github-personal-access-token>-e<anything>This willignorethe passedGithub usernameandpersonal access tokeninstead usingenvironment variablesand download allpublic and private gistsusinggit.gist-neko-u<github-username>-t<github-personal-access-token>-e<anything>-g<anything>Simplified ExamplesIf you want to only download your gists (public), you can dogist-neko-u<your-username>If you want to only download your gists (public and private), you can either dogist-neko-u<your-username>-t<your-personal-access-token>or you can put your information on environment variables and dogist-neko-e<anything>If you want to download other people's gists (public), you can dogist-neko-u<their-username>If you want to download other people's gists (public and private), you can dogist-neko-u<their-username>-t<their-personal-access-token>