code2gist


Namecode2gist JSON
Version 0.0.17 PyPI version JSON
download
home_page
Summarycode2gist is a Python package that makes sharing your code easier than ever. Send code to ChatGPT-4's browser without going over the character limit.
upload_time2023-06-20 14:32:52
maintainer
docs_urlNone
authorCameron Spears
requires_python>=3.11,<4.0
licenseGPL-3.0
keywords python github gist upload
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # code2gist 📦

`code2gist` is a Python package that makes sharing your code projects easier than ever. With a simple command, it lets you upload your code files to GitHub's Gist. `code2gist` is available on [PyPI](https://pypi.org/project/code2gist/).

The package works hand-in-hand with OpenAI's ChatGPT-4's 'Browse with Bing' feature. Send codebases without going over the character limit using a secret URL. 🗜️

Another key feature of `code2gist` is its ability to handle a wide range of text-based file types, not just Python files. 📄

In addition, `code2gist` comes with a `prune` feature that provides a clean way to remove all the gists created by this tool from your GitHub account. 🌳

## Installation ⚙️

The recommended way to install `code2gist` is via `pipx`:

```
pipx install code2gist
```

`pipx` ensures the package and its dependencies are isolated from your global Python environment. Moreover, `pipx` automatically adds the installed package to your PATH, so you can run `code2gist` from any directory in the command line. 🧠

If you haven't installed `pipx` yet, you can do it by running `python3 -m pip install --user pipx` and then `python3 -m pipx ensurepath`.

You can still install the package via pip, but you will have to add the package directory to your PATH manually 😒:

```
pip install code2gist
```

### Adding code2gist Directory to the PATH Environment Variable 👣

Here are step-by-step instructions to add the code2gist directory to your PATH environment variable on Windows:

1. Open the **Control Panel**.
2. Navigate to **System and Security > System**.
3. Click on the **Advanced system settings** link on the left panel.
4. Click **Environment Variables**.
5. Under the **System Variables** section, find and double-click the variable **PATH**.
6. Click **New**.
7. Add the directory where code2gist is installed. For example, if you have Python 3.11 installed, the directory might look like this: `C:\...\Python311\Scripts`
8. Click **OK** to close all windows and save the changes.

After following these steps, your system should recognize code2gist commands from any directory in the command line. 👍

### GitHub Token 🔑

`code2gist` requires a GitHub token to function. You need to create a new token with the `gist` scope (which allows it to create gists). Follow [this guide](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) to create a new token.

Once you have your token, you should store it in the "GITHUB_TOKEN" environment variable. Here are the steps to set this variable in Windows:

1. Open the Control Panel.
2. Search for "Environment Variables".
3. Click on "Edit the system environment variables".
4. In the System Properties window that appears, click the "Environment Variables..." button.
5. In the Environment Variables window, click the "New..." button under the "User variables" section.
6. Enter "GITHUB_TOKEN" as the variable name and your token as the variable value.
7. Click "OK" on all open windows to apply the changes.

Please ensure that you have this variable set before using the package. ✅

## Usage 🚀

### Uploading Files 📤

To use `code2gist`, simply use the following command:

```
code2gist .
```

This command will upload all Python files in the current directory to a private Gist on your GitHub account. The Gist will be titled with the name of the current directory, followed by "[code2gist]".

If you want to include files with different extensions, you can specify them using the `--ext` option:

```
code2gist . --ext .txt .md .py
```

This command will include all text, Markdown, and Python files in the upload.

### Deleting Gists 🗑️

The `prune` feature allows you to delete all gists created by `code2gist`:

```
code2gist --prune
```

Running this command will delete all your gists with "[code2gist]" in the description.

## .gitignore and .code2gistignore Support ✅

`code2gist` respects `.gitignore` and `.code2gistignore` rules. Files that match a rule in either file will be skipped. 🦘

## Note 📝

The gists created by `code2gist` are private by default, providing a safe way for you to share your code without making it publicly available.

Please remember that `code2gist` is a tool for sharing code and should not be used to share sensitive information. Always ensure that your files do not contain any confidential data before uploading them.

## License ⚖️

`code2gist` is licensed under the [GNU General Public License v3.0](https://www.gnu.org/licenses/gpl-3.0.en.html).

------

We hope `code2gist` serves as a valuable tool in your development toolkit. Happy coding! 💻👨‍💻

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "code2gist",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.11,<4.0",
    "maintainer_email": "",
    "keywords": "python,github,gist,upload",
    "author": "Cameron Spears",
    "author_email": "flames.garish-0i@icloud.com",
    "download_url": "https://files.pythonhosted.org/packages/8d/95/96bcb321c4dead758f77ade8cb156c378259a793b1092db36ca76b25394f/code2gist-0.0.17.tar.gz",
    "platform": null,
    "description": "# code2gist \ud83d\udce6\n\n`code2gist` is a Python package that makes sharing your code projects easier than ever. With a simple command, it lets you upload your code files to GitHub's Gist. `code2gist` is available on [PyPI](https://pypi.org/project/code2gist/).\n\nThe package works hand-in-hand with OpenAI's ChatGPT-4's 'Browse with Bing' feature. Send codebases without going over the character limit using a secret URL. \ud83d\udddc\ufe0f\n\nAnother key feature of `code2gist` is its ability to handle a wide range of text-based file types, not just Python files. \ud83d\udcc4\n\nIn addition, `code2gist` comes with a `prune` feature that provides a clean way to remove all the gists created by this tool from your GitHub account. \ud83c\udf33\n\n## Installation \u2699\ufe0f\n\nThe recommended way to install `code2gist` is via `pipx`:\n\n```\npipx install code2gist\n```\n\n`pipx` ensures the package and its dependencies are isolated from your global Python environment. Moreover, `pipx` automatically adds the installed package to your PATH, so you can run `code2gist` from any directory in the command line. \ud83e\udde0\n\nIf you haven't installed `pipx` yet, you can do it by running `python3 -m pip install --user pipx` and then `python3 -m pipx ensurepath`.\n\nYou can still install the package via pip, but you will have to add the package directory to your PATH manually \ud83d\ude12:\n\n```\npip install code2gist\n```\n\n### Adding code2gist Directory to the PATH Environment Variable \ud83d\udc63\n\nHere are step-by-step instructions to add the code2gist directory to your PATH environment variable on Windows:\n\n1. Open the **Control Panel**.\n2. Navigate to **System and Security > System**.\n3. Click on the **Advanced system settings** link on the left panel.\n4. Click **Environment Variables**.\n5. Under the **System Variables** section, find and double-click the variable **PATH**.\n6. Click **New**.\n7. Add the directory where code2gist is installed. For example, if you have Python 3.11 installed, the directory might look like this: `C:\\...\\Python311\\Scripts`\n8. Click **OK** to close all windows and save the changes.\n\nAfter following these steps, your system should recognize code2gist commands from any directory in the command line. \ud83d\udc4d\n\n### GitHub Token \ud83d\udd11\n\n`code2gist` requires a GitHub token to function. You need to create a new token with the `gist` scope (which allows it to create gists). Follow [this guide](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) to create a new token.\n\nOnce you have your token, you should store it in the \"GITHUB_TOKEN\" environment variable. Here are the steps to set this variable in Windows:\n\n1. Open the Control Panel.\n2. Search for \"Environment Variables\".\n3. Click on \"Edit the system environment variables\".\n4. In the System Properties window that appears, click the \"Environment Variables...\" button.\n5. In the Environment Variables window, click the \"New...\" button under the \"User variables\" section.\n6. Enter \"GITHUB_TOKEN\" as the variable name and your token as the variable value.\n7. Click \"OK\" on all open windows to apply the changes.\n\nPlease ensure that you have this variable set before using the package. \u2705\n\n## Usage \ud83d\ude80\n\n### Uploading Files \ud83d\udce4\n\nTo use `code2gist`, simply use the following command:\n\n```\ncode2gist .\n```\n\nThis command will upload all Python files in the current directory to a private Gist on your GitHub account. The Gist will be titled with the name of the current directory, followed by \"[code2gist]\".\n\nIf you want to include files with different extensions, you can specify them using the `--ext` option:\n\n```\ncode2gist . --ext .txt .md .py\n```\n\nThis command will include all text, Markdown, and Python files in the upload.\n\n### Deleting Gists \ud83d\uddd1\ufe0f\n\nThe `prune` feature allows you to delete all gists created by `code2gist`:\n\n```\ncode2gist --prune\n```\n\nRunning this command will delete all your gists with \"[code2gist]\" in the description.\n\n## .gitignore and .code2gistignore Support \u2705\n\n`code2gist` respects `.gitignore` and `.code2gistignore` rules. Files that match a rule in either file will be skipped. \ud83e\udd98\n\n## Note \ud83d\udcdd\n\nThe gists created by `code2gist` are private by default, providing a safe way for you to share your code without making it publicly available.\n\nPlease remember that `code2gist` is a tool for sharing code and should not be used to share sensitive information. Always ensure that your files do not contain any confidential data before uploading them.\n\n## License \u2696\ufe0f\n\n`code2gist` is licensed under the [GNU General Public License v3.0](https://www.gnu.org/licenses/gpl-3.0.en.html).\n\n------\n\nWe hope `code2gist` serves as a valuable tool in your development toolkit. Happy coding! \ud83d\udcbb\ud83d\udc68\u200d\ud83d\udcbb\n",
    "bugtrack_url": null,
    "license": "GPL-3.0",
    "summary": "code2gist is a Python package that makes sharing your code easier than ever. Send code to ChatGPT-4's browser without going over the character limit.",
    "version": "0.0.17",
    "project_urls": null,
    "split_keywords": [
        "python",
        "github",
        "gist",
        "upload"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "76112c7651f6867a5e13a35a7856cb0273548c2084fe01a8255962816d8fa10b",
                "md5": "381feaf497490e6e3ca6459ffb107854",
                "sha256": "d9b8bea0f96e9d48aa0bba5d1b6b45e489af45c4e1026c1b6f5f7b56ca2eb185"
            },
            "downloads": -1,
            "filename": "code2gist-0.0.17-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "381feaf497490e6e3ca6459ffb107854",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11,<4.0",
            "size": 17813,
            "upload_time": "2023-06-20T14:32:51",
            "upload_time_iso_8601": "2023-06-20T14:32:51.184435Z",
            "url": "https://files.pythonhosted.org/packages/76/11/2c7651f6867a5e13a35a7856cb0273548c2084fe01a8255962816d8fa10b/code2gist-0.0.17-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8d9596bcb321c4dead758f77ade8cb156c378259a793b1092db36ca76b25394f",
                "md5": "33bb11e2617b7b8a2e6a6a2283ee0adc",
                "sha256": "43a3f97baf9fe8b199f985b825eaa1b823cba0ca21423c9d85cb3a58ec04529f"
            },
            "downloads": -1,
            "filename": "code2gist-0.0.17.tar.gz",
            "has_sig": false,
            "md5_digest": "33bb11e2617b7b8a2e6a6a2283ee0adc",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11,<4.0",
            "size": 16852,
            "upload_time": "2023-06-20T14:32:52",
            "upload_time_iso_8601": "2023-06-20T14:32:52.564679Z",
            "url": "https://files.pythonhosted.org/packages/8d/95/96bcb321c4dead758f77ade8cb156c378259a793b1092db36ca76b25394f/code2gist-0.0.17.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-20 14:32:52",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "code2gist"
}
        
Elapsed time: 0.10809s