12 releases (6 stable)
2.0.2 | May 28, 2024 |
---|---|
2.0.1 | May 14, 2024 |
1.1.0 | May 9, 2024 |
0.10.1 | May 6, 2024 |
0.8.1 | May 5, 2024 |
#182 in Command line utilities
34KB
717 lines
Pastol is paste.lol Unofficial Command Line Interface (CLI)
Pastol enables users to interact with paste.lol service directly from the command line.
Allows you to share text and files quickly and conveniently.
Usage
pastol <COMMAND>
Commands:
add Create or update a pastebin on paste.lol
remove || rm - Remove a pastebin on paste.lol
download || dl - Download by title a pastebin
list || ls - List all pastebins
view || cat - View by title the pastebin
search || find - Search by title for pastebins
settings || config - Change the settings
help Print this message or the help of the given subcommand(s)
Install
-
Install rust and cargo.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
-
Install pastol.
-
With binstall (better)
-
Install binstall
Linux and macOS
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
Windows
Set-ExecutionPolicy Unrestricted -Scope Process; iex (iwr "https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.ps1").Content
-
Install pastol
cargo binstall pastol
-
-
Without binstall
-
If on Linux or maybe macOS(feedback needed):
-
macOS (Homebrew)
brew install openssl@3
-
macOS (MacPorts)
sudo port install openssl
-
Arch Linux
sudo pacman -S pkg-config openssl
-
Debian and Ubuntu
sudo apt-get install pkg-config libssl-dev
-
Fedora
sudo dnf install pkg-config perl-FindBin openssl-devel
-
Alpine Linux
apk add pkgconfig openssl-dev
-
openSUSE
sudo zypper in libopenssl-devel
-
-
Install the crate.
cargo install pastol
-
-
Setup
-
Set user and API key.
pastol --setuser your_username --setapikey your_api_key # if the env var api_omg_lol is set it will be used instead
-
Exampe as adam.
pastel --setuser adam --setapikey a321dwageaawdwadw
Your API key is stored locally in the config file. Linux example path:
.config/pastol/config.toml
- OPTIONAL: Set all the new or updated pastebin to unlisted/hidden.
pastol --setunlist true
Examples
-
Upload a file.
pastol example.txt
-
Download a pastebin as a file.
pastol download example-title-as-apears-on-the-url
-
Upload a file with custom title.
pastol add example.txt -t "Example Title"
-
Upload a file with custom content.
pastol add example.txt -c "This is the content of the example file."
-
Upload a custom.
pastol add -t title-example -c "pastebin content example"
-
Remove a pastebin.
pastol remove hello-world
-
List all listed pastebins.
pastol list
-
View the pastebin.
pastol view example
-
Search by title for pastebins.
pastol search exa
Build
-
Install cargo
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
-
Clone the repo
git clone https://github.com/M1n-74316D65/Pastol
-
If on Linux install or maybe macos():
-
macOS (Homebrew)
brew install openssl@3
-
macOS (MacPorts)
sudo port install openssl
-
Arch Linux
sudo pacman -S pkg-config openssl
-
Debian and Ubuntu
sudo apt-get install pkg-config libssl-dev
-
Fedora
sudo dnf install pkg-config perl-FindBin openssl-devel
-
Alpine Linux
apk add pkgconfig openssl-dev
-
openSUSE
sudo zypper in libopenssl-devel
-
-
Build
- Using just. (use this pls)
- Install just if not installed
- check the justfile to see available commands.
- Using cargo
-
cargo build
- This is the path of the pastol executable:
./target/debug/pastol
-
- Using just. (use this pls)
For more info check the justfile or use just.
LOL
Dependencies
~16–31MB
~500K SLoC