gists-gone


Namegists-gone JSON
Version 0.0.2 PyPI version JSON
download
home_pageNone
SummaryA CLI that gives you more granular control over bulk deletion of your Github gists.
upload_time2024-07-26 14:28:29
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT License Copyright (c) 2024 Ben Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords gists github
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <h1 align=center> gists-gone </h2>

<p align="center">
     <a href="https://github.com/ben-n93/gists-gone/actions/workflows/tests.yml"><img src="https://github.com/ben-n93/gists-gone/actions/workflows/tests.yml/badge.svg" alt="Testing"></a>
    <a href="https://codecov.io/gh/ben-n93/gists-gone" ><img src="https://codecov.io/gh/ben-n93/gists-gone/graph/badge.svg?token=FO4QA8CUF5"/></a>
    <a href="https://pypi.org/project/gists-gone/"><img src="https://img.shields.io/pypi/pyversions/gists-gone" alt="versions"></a>
</p>

`gists-gone` is a command-line tool that gives you more granular control over bulk deletion of your Github gists.

For example, if you want to only delete your public Python gists:

```
gists-gone -l Python -v public
```

## Getting started

### Prerequisites

In order to use this tool you'll need a Github access token with the **"Gists" user permissions (write)**. 

Once you have this token you can pass it to the tool directly:

```
gists-gone --token ghp_abc123
```

... or you can create an environmental variable called `GITHUB_API_TOKEN`, the value of which is your access token.

### Installation

```
pip install gists-gone
```

## Usage

### Deleting everything 

To delete *all* your gists simply run the tool with no arguments:

```
gists-gone
```

You will get a warning message before proceeding (which can be overriden with the `--force` option, although I caution against this):

```
Are you sure you proceed with the deletion?
10 gists will be deleted.
[Y/n]
```

### Filtering

`gists-gone` have 3 different options, all of which can be combined for specifying the type of gists to included in the deletion.

#### Languages 

You can specify gists in particular languages you want deleted:

```
gists-gone --languages SQL Python
```

Note that the name of the languages is case-sensitive.

For gists you want deleted that that have no language (or Github doesn't recognise) you can specify Unknown:

```
gists-gone -l Unknown
```

#### Visbility

Using the `-visibility` option you can specify whether you want to delete public or secret gists:

```
gists-gone -v secret
gists-gone -v public
```

#### Date range

With the `--date_range` option you can specify to delete gists created on a particular date:

```
gists-gone -dr 2024-04-01
```

Or between two dates:

```
gists-gone -dr 2018-04-01 2024-01-01
```

Dates should be passed in YYYY-MM-DD format.

#### Examples

Deleting secret gists created from 2020-01-01 onwards:

```
gists-gone -v secret -dr 2020-01-01 2100-01-01
```

Deleting Rust gists created on a particular date:

```
gists-gone -l Rust -dr 2024-11-07
```

### Limitations

Note that a maximum of 3000 gists can be retrieved by the tool at any one time, due to a limitation imposed by the API.

However you can simply rerun the tool after you've deleted some gists or if you're feeling fancy you can invoke the command multiple times with a loop:

```sh
for i in {1..5}
do
  gists-gone --force # Be careful with this option!
done
```

The Github API also has a personal rate limit of 5,000 requests per hour so bear in mind you'll have to wait an hour if you want to delete more than 3000 gists.

## Roadmap

I would like to eventually add more options for specifying the types of gists to be deleted:

- [ ]  Filtering a gist's description using regex 
- [ ]  Starred or unstarred
- [ ]  Updated date

## Warning

I've done my best to unit test this tool as thoroughly as possible but as there is no way to retrieve a gist once it's deleted I caution you to not use this tool if you have any particularly important or sensitive gists that you do not want accidentally deleted.

I do not take responsibility for any unintended outcomes or damages.

That said, if you do notice anything wrong please raise an issue!


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "gists-gone",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "Ben Nour <hello@ben-nour.com>",
    "keywords": "gists, Github",
    "author": null,
    "author_email": "Ben Nour <author@example.com>",
    "download_url": "https://files.pythonhosted.org/packages/5b/a0/6a2f5d55bd35257bf3904e74fc697827190abc77732f257a3006486b3b0f/gists_gone-0.0.2.tar.gz",
    "platform": null,
    "description": "<h1 align=center> gists-gone </h2>\n\n<p align=\"center\">\n     <a href=\"https://github.com/ben-n93/gists-gone/actions/workflows/tests.yml\"><img src=\"https://github.com/ben-n93/gists-gone/actions/workflows/tests.yml/badge.svg\" alt=\"Testing\"></a>\n    <a href=\"https://codecov.io/gh/ben-n93/gists-gone\" ><img src=\"https://codecov.io/gh/ben-n93/gists-gone/graph/badge.svg?token=FO4QA8CUF5\"/></a>\n    <a href=\"https://pypi.org/project/gists-gone/\"><img src=\"https://img.shields.io/pypi/pyversions/gists-gone\" alt=\"versions\"></a>\n</p>\n\n`gists-gone` is a command-line tool that gives you more granular control over bulk deletion of your Github gists.\n\nFor example, if you want to only delete your public Python gists:\n\n```\ngists-gone -l Python -v public\n```\n\n## Getting started\n\n### Prerequisites\n\nIn order to use this tool you'll need a Github access token with the **\"Gists\" user permissions (write)**. \n\nOnce you have this token you can pass it to the tool directly:\n\n```\ngists-gone --token ghp_abc123\n```\n\n... or you can create an environmental variable called `GITHUB_API_TOKEN`, the value of which is your access token.\n\n### Installation\n\n```\npip install gists-gone\n```\n\n## Usage\n\n### Deleting everything \n\nTo delete *all* your gists simply run the tool with no arguments:\n\n```\ngists-gone\n```\n\nYou will get a warning message before proceeding (which can be overriden with the `--force` option, although I caution against this):\n\n```\nAre you sure you proceed with the deletion?\n10 gists will be deleted.\n[Y/n]\n```\n\n### Filtering\n\n`gists-gone` have 3 different options, all of which can be combined for specifying the type of gists to included in the deletion.\n\n#### Languages \n\nYou can specify gists in particular languages you want deleted:\n\n```\ngists-gone --languages SQL Python\n```\n\nNote that the name of the languages is case-sensitive.\n\nFor gists you want deleted that that have no language (or Github doesn't recognise) you can specify Unknown:\n\n```\ngists-gone -l Unknown\n```\n\n#### Visbility\n\nUsing the `-visibility` option you can specify whether you want to delete public or secret gists:\n\n```\ngists-gone -v secret\ngists-gone -v public\n```\n\n#### Date range\n\nWith the `--date_range` option you can specify to delete gists created on a particular date:\n\n```\ngists-gone -dr 2024-04-01\n```\n\nOr between two dates:\n\n```\ngists-gone -dr 2018-04-01 2024-01-01\n```\n\nDates should be passed in YYYY-MM-DD format.\n\n#### Examples\n\nDeleting secret gists created from 2020-01-01 onwards:\n\n```\ngists-gone -v secret -dr 2020-01-01 2100-01-01\n```\n\nDeleting Rust gists created on a particular date:\n\n```\ngists-gone -l Rust -dr 2024-11-07\n```\n\n### Limitations\n\nNote that a maximum of 3000 gists can be retrieved by the tool at any one time, due to a limitation imposed by the API.\n\nHowever you can simply rerun the tool after you've deleted some gists or if you're feeling fancy you can invoke the command multiple times with a loop:\n\n```sh\nfor i in {1..5}\ndo\n  gists-gone --force # Be careful with this option!\ndone\n```\n\nThe Github API also has a personal rate limit of 5,000 requests per hour so bear in mind you'll have to wait an hour if you want to delete more than 3000 gists.\n\n## Roadmap\n\nI would like to eventually add more options for specifying the types of gists to be deleted:\n\n- [ ]  Filtering a gist's description using regex \n- [ ]  Starred or unstarred\n- [ ]  Updated date\n\n## Warning\n\nI've done my best to unit test this tool as thoroughly as possible but as there is no way to retrieve a gist once it's deleted I caution you to not use this tool if you have any particularly important or sensitive gists that you do not want accidentally deleted.\n\nI do not take responsibility for any unintended outcomes or damages.\n\nThat said, if you do notice anything wrong please raise an issue!\n\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024 Ben  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "A CLI that gives you more granular control over bulk deletion of your Github gists.",
    "version": "0.0.2",
    "project_urls": {
        "homepage": "https://github.com/ben-n93/gists-gone/",
        "repository": "https://github.com/ben-n93/gists-gone"
    },
    "split_keywords": [
        "gists",
        " github"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "77fcfd9ee689c7ea3510dc4250e50c06252a9b74262c0ebc30536bd8ab364c76",
                "md5": "8a31de366468862274e3ed94c51fc3aa",
                "sha256": "bfeb094d1b13889ced33b428135a34e533a0e349f87cc4cce19bc65b7289b579"
            },
            "downloads": -1,
            "filename": "gists_gone-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8a31de366468862274e3ed94c51fc3aa",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 7161,
            "upload_time": "2024-07-26T14:28:28",
            "upload_time_iso_8601": "2024-07-26T14:28:28.039359Z",
            "url": "https://files.pythonhosted.org/packages/77/fc/fd9ee689c7ea3510dc4250e50c06252a9b74262c0ebc30536bd8ab364c76/gists_gone-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5ba06a2f5d55bd35257bf3904e74fc697827190abc77732f257a3006486b3b0f",
                "md5": "09e91aed72cd36a3c06c9fef7799de58",
                "sha256": "bc20f4a9212f14c32637a2b690eadbfa193ebb70f74e62f57e64ee08aac4ab1a"
            },
            "downloads": -1,
            "filename": "gists_gone-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "09e91aed72cd36a3c06c9fef7799de58",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 8453,
            "upload_time": "2024-07-26T14:28:29",
            "upload_time_iso_8601": "2024-07-26T14:28:29.454467Z",
            "url": "https://files.pythonhosted.org/packages/5b/a0/6a2f5d55bd35257bf3904e74fc697827190abc77732f257a3006486b3b0f/gists_gone-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-26 14:28:29",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ben-n93",
    "github_project": "gists-gone",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "gists-gone"
}
        
Elapsed time: 0.27240s