Metadata-Version: 2.1
Name: pastebin-replace
Version: 0.1.1
Summary: Replace local files with code from a pastebin link
Project-URL: Homepage, https://github.com/etherealxx/pastebin-replace
Project-URL: Issues, https://github.com/etherealxx/pastebin-replace/issues
Author-email: Etherealxx <gwathon3@gmail.com>
License-File: LICENSE
Keywords: development,download,pastebin,productivity
Classifier: Environment :: Console
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Requires-Dist: click
Requires-Dist: requests
Description-Content-Type: text/markdown

# pastebin-replace

Small, simple python package to replace a file with raw code from Pastebin.

## Installation

#### From Source

```bash
pip install .
```

#### With pip (PyPI)

```bash
pip install pastebin-replace
```

## Usage

#### Within Python Script
```python
pbreplace(path, link)
```

#### Terminal
```bash
pbreplace <path> <link>
```

## Example

Suppose you have an empty file named `test.txt` located in `C:\Users\Yourname\Downloads\test.txt`. And you know a public Pastebin `https://pastebin.com/hcv2WRnX` containing some text. You want the content of `test.txt` to be like the text on the Pastebin link.

You can write this with Python:
```python
from pastebin_replace import pbreplace

pbreplace(r"C:\Users\Yourname\Downloads\test.txt", "https://pastebin.com/hcv2WRnX")
```

Or directly from terminal:
```bash
pbreplace C:\Users\Yourname\Downloads\test.txt https://pastebin.com/hcv2WRnX
```

### Note
Replaced file can't be recovered. Be careful on the path you provided.

### Background
Why did I make this? I need this package for a specific usage in my Google Colab workflow.

### Special Thanks
[pastebin-as-file](https://github.com/K0IN/pastebin-as-file) repo for the PyPI directory format. I'm a noob and just learned about Python package stuff tonight :D
Also [gdown](https://github.com/wkentaro/gdown) for pyproject.toml and `__main__.py` reference.