Replace local files with code from a pastebin link
Project description
pastebin-replace
Small, simple python package to replace a file with raw code from Pastebin.
Installation
From Source
pip install .
With pip (PyPI)
pip install pastebin-replace
Usage
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.
from pastebin_replace import pbreplace
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 repo for the PyPI directory format. I'm a noob and just learned about Python package stuff tonight :D
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pastebin_replace-0.1.0.tar.gz
(3.7 kB
view hashes)
Built Distribution
Close
Hashes for pastebin_replace-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 557eda969d2f4f6463098c923b19e41be11e627bb7959b6a2a1d4fc254698f00 |
|
MD5 | 0722a35e01fec7e56403cc1cb1987a70 |
|
BLAKE2b-256 | 22fab6a0fc5a28cf1e479d6215c43d6a198cf54e9aa6c26c65fe7045c40e53a0 |