gist-neko


Namegist-neko JSON
Version 1.21 PyPI version JSON
download
home_pagehttps://github.com/NecRaul/gist-neko
SummaryCLI for downloading all gists from a specified user.
upload_time2024-02-24 10:20:52
maintainer
docs_urlNone
authorNecRaul
requires_python
license
keywords python gists downloader downloader gists gist-neko kuroneko
VCS
bugtrack_url
requirements requests
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # gist-neko

CLI for downloading all gists from a specified user.

## Requirements

`requests` is used to get information from the Github API and download the gists (if you don't use -g/--git to download using git).

Note that `requests` will not download submodules but git will.

If you want to build this on your own, you can install the requirements with

```Python
pip install -r requirements.txt
```

or install the package by running

```Python
pip install gist-neko
```

Python's native `os` (used to check for whether a folder exists or not), `argparse` (parse return request and set command argument), `subprocess` (call `git clone` and `git pull` on gists) and `setuptools` (used to build the script) packages are also used.

## How it works

I send requests to `https://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 either `requests` or `git`.

You can run the script with

```Python
gist-neko
    -u <github-username>
    -t <github-personal-access-token> (optional - you will just download the public gists instead of all gists)
    -e (optional - means you will be using environment variables. This overrides -u and -t)
    -g (optional - means you will be downloading using git)
    -gu <github-username> (this will set <github-username> as environment variable)
    -gpat <github-personal-access-token> (this will set <github-personal-access-token> as environment variable)
```

### Examples

#### Setting Environment Variables

This will set the specified **Github username** and **personal access token** as your `GITHUB_USERNAME` and `GITHUB_PERSONAL_ACCESS_TOKEN` environment variable respectively. On Linux this is a bit buggy.

```Python
gist-neko -gu <github-username> -gpat <github-personal-access-token>
```

This will set the specified **Github username** as your `GITHUB_USERNAME` environment variable. On Linux this is a bit buggy.

```Python
gist-neko -gu <github-username>
```

This will set the specified **personal access token** as your `GITHUB_PERSONAL_ACCESS_TOKEN` environment variable. On Linux this is a bit buggy.

```Python
gist-neko -gpat <github-personal-access-token>
```

#### Public Gists without Environment Variables

This will use the specified **Github username** and download all **public gists** using `requests`.

```Python
gist-neko -u <github-username> -t <github-personal-access-token>
```

This will use the specified **Github username** and download all **public gists** using `git`.

```Python
gist-neko -u <github-username> -t <github-personal-access-token> -g <anything>
```

#### Public and Private Gists without Environment Variables

This will use the specified **Github username** and **personal access token** and download all **public and private gists** using `requests`.

```Python
gist-neko -u <github-username> -t <github-personal-access-token>
```

This will use the specified **Github username** and **personal access token** and download all **public and private gists** using `git`.

```Python
gist-neko -u <github-username> -t <github-personal-access-token> -g <anything>
```

#### Public and Private Gists with Environment Variables

This will use the **Github username** and **personal access token** in the **environment variables** and download all **public and private gists** using `requests`.

```Python
gist-neko -e <anything>
```

This will use the **Github username** and **personal access token** in the **environment variables** and download all **public and private gists** using `git`.

```Python
gist-neko -e <anything> -g <anything>
```

#### Public and Private Gists with Environment Variables (Overriding passed Username and Personal Access Token)

This will **ignore** the passed **Github username** and **personal access token** instead using **environment variables** and download all **public and private gists** using `requests`.

```Python
gist-neko -u <github-username> -t <github-personal-access-token> -e <anything>
```

This will **ignore** the passed **Github username** and **personal access token** instead using **environment variables** and download all **public and private gists** using `git`.

```Python
gist-neko -u <github-username> -t <github-personal-access-token> -e <anything> -g <anything>
```

### Simplified Examples

If you want to only download your gists (public), you can do

```Python
gist-neko -u <your-username>
```

If you want to only download your gists (public and private), you can either do

```Python
gist-neko -u <your-username> -t <your-personal-access-token>
```

or you can put your information on environment variables and do

```Python
gist-neko -e <anything>
```

If you want to download other people's gists (public), you can do

```Python
gist-neko -u <their-username>
```

If you want to download other people's gists (public and private), you can do

```Python
gist-neko -u <their-username> -t <their-personal-access-token>
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/NecRaul/gist-neko",
    "name": "gist-neko",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "python,gists downloader,downloader,gists,gist-neko,kuroneko",
    "author": "NecRaul",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/3b/03/39f22223b4e89d80c512d5083cee33b84dd219acf760286eeada335ca528/gist_neko-1.21.tar.gz",
    "platform": null,
    "description": "# gist-neko\n\nCLI for downloading all gists from a specified user.\n\n## Requirements\n\n`requests` is used to get information from the Github API and download the gists (if you don't use -g/--git to download using git).\n\nNote that `requests` will not download submodules but git will.\n\nIf you want to build this on your own, you can install the requirements with\n\n```Python\npip install -r requirements.txt\n```\n\nor install the package by running\n\n```Python\npip install gist-neko\n```\n\nPython's native `os` (used to check for whether a folder exists or not), `argparse` (parse return request and set command argument), `subprocess` (call `git clone` and `git pull` on gists) and `setuptools` (used to build the script) packages are also used.\n\n## How it works\n\nI send requests to `https://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 either `requests` or `git`.\n\nYou can run the script with\n\n```Python\ngist-neko\n    -u <github-username>\n    -t <github-personal-access-token> (optional - you will just download the public gists instead of all gists)\n    -e (optional - means you will be using environment variables. This overrides -u and -t)\n    -g (optional - means you will be downloading using git)\n    -gu <github-username> (this will set <github-username> as environment variable)\n    -gpat <github-personal-access-token> (this will set <github-personal-access-token> as environment variable)\n```\n\n### Examples\n\n#### Setting Environment Variables\n\nThis will set the specified **Github username** and **personal access token** as your `GITHUB_USERNAME` and `GITHUB_PERSONAL_ACCESS_TOKEN` environment variable respectively. On Linux this is a bit buggy.\n\n```Python\ngist-neko -gu <github-username> -gpat <github-personal-access-token>\n```\n\nThis will set the specified **Github username** as your `GITHUB_USERNAME` environment variable. On Linux this is a bit buggy.\n\n```Python\ngist-neko -gu <github-username>\n```\n\nThis will set the specified **personal access token** as your `GITHUB_PERSONAL_ACCESS_TOKEN` environment variable. On Linux this is a bit buggy.\n\n```Python\ngist-neko -gpat <github-personal-access-token>\n```\n\n#### Public Gists without Environment Variables\n\nThis will use the specified **Github username** and download all **public gists** using `requests`.\n\n```Python\ngist-neko -u <github-username> -t <github-personal-access-token>\n```\n\nThis will use the specified **Github username** and download all **public gists** using `git`.\n\n```Python\ngist-neko -u <github-username> -t <github-personal-access-token> -g <anything>\n```\n\n#### Public and Private Gists without Environment Variables\n\nThis will use the specified **Github username** and **personal access token** and download all **public and private gists** using `requests`.\n\n```Python\ngist-neko -u <github-username> -t <github-personal-access-token>\n```\n\nThis will use the specified **Github username** and **personal access token** and download all **public and private gists** using `git`.\n\n```Python\ngist-neko -u <github-username> -t <github-personal-access-token> -g <anything>\n```\n\n#### Public and Private Gists with Environment Variables\n\nThis will use the **Github username** and **personal access token** in the **environment variables** and download all **public and private gists** using `requests`.\n\n```Python\ngist-neko -e <anything>\n```\n\nThis will use the **Github username** and **personal access token** in the **environment variables** and download all **public and private gists** using `git`.\n\n```Python\ngist-neko -e <anything> -g <anything>\n```\n\n#### Public and Private Gists with Environment Variables (Overriding passed Username and Personal Access Token)\n\nThis will **ignore** the passed **Github username** and **personal access token** instead using **environment variables** and download all **public and private gists** using `requests`.\n\n```Python\ngist-neko -u <github-username> -t <github-personal-access-token> -e <anything>\n```\n\nThis will **ignore** the passed **Github username** and **personal access token** instead using **environment variables** and download all **public and private gists** using `git`.\n\n```Python\ngist-neko -u <github-username> -t <github-personal-access-token> -e <anything> -g <anything>\n```\n\n### Simplified Examples\n\nIf you want to only download your gists (public), you can do\n\n```Python\ngist-neko -u <your-username>\n```\n\nIf you want to only download your gists (public and private), you can either do\n\n```Python\ngist-neko -u <your-username> -t <your-personal-access-token>\n```\n\nor you can put your information on environment variables and do\n\n```Python\ngist-neko -e <anything>\n```\n\nIf you want to download other people's gists (public), you can do\n\n```Python\ngist-neko -u <their-username>\n```\n\nIf you want to download other people's gists (public and private), you can do\n\n```Python\ngist-neko -u <their-username> -t <their-personal-access-token>\n```\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "CLI for downloading all gists from a specified user.",
    "version": "1.21",
    "project_urls": {
        "Documentation": "https://github.com/NecRaul/gist-neko#readme",
        "Homepage": "https://github.com/NecRaul/gist-neko",
        "Source": "https://github.com/NecRaul/gist-neko"
    },
    "split_keywords": [
        "python",
        "gists downloader",
        "downloader",
        "gists",
        "gist-neko",
        "kuroneko"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2716d5ba3fd19c132ee72d42efbb4fdf12b15a8cba98a3721e598d4863b2ffad",
                "md5": "33e725d6b4dcc0be279c9e15c18d17a5",
                "sha256": "f149f33b845795bb0f869aac4a4c4f7864adcdcaf7dc74bb40448f843a3ce6e8"
            },
            "downloads": -1,
            "filename": "gist_neko-1.21-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "33e725d6b4dcc0be279c9e15c18d17a5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 14463,
            "upload_time": "2024-02-24T10:20:50",
            "upload_time_iso_8601": "2024-02-24T10:20:50.272651Z",
            "url": "https://files.pythonhosted.org/packages/27/16/d5ba3fd19c132ee72d42efbb4fdf12b15a8cba98a3721e598d4863b2ffad/gist_neko-1.21-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3b0339f22223b4e89d80c512d5083cee33b84dd219acf760286eeada335ca528",
                "md5": "1bb695ab4f1b3ec737e8d5e8fa08eb6a",
                "sha256": "f9248427da3099cbd51bdfd4584e1c76170314a6010bfe4d17ec18aa463216f8"
            },
            "downloads": -1,
            "filename": "gist_neko-1.21.tar.gz",
            "has_sig": false,
            "md5_digest": "1bb695ab4f1b3ec737e8d5e8fa08eb6a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 13587,
            "upload_time": "2024-02-24T10:20:52",
            "upload_time_iso_8601": "2024-02-24T10:20:52.097212Z",
            "url": "https://files.pythonhosted.org/packages/3b/03/39f22223b4e89d80c512d5083cee33b84dd219acf760286eeada335ca528/gist_neko-1.21.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-24 10:20:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "NecRaul",
    "github_project": "gist-neko",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "requests",
            "specs": [
                [
                    ">=",
                    "2.31.0"
                ]
            ]
        }
    ],
    "lcname": "gist-neko"
}
        
Elapsed time: 0.30724s