12 个版本 (6 个稳定版)
| 2.0.2 | 2024年5月28日 |
|---|---|
| 2.0.1 | 2024年5月14日 |
| 1.1.0 | 2024年5月9日 |
| 0.10.1 | 2024年5月6日 |
| 0.8.1 | 2024年5月5日 |
在 命令行工具 中排名 171
每月下载量 824
34KB
717 行
Pastol 是 paste.lol 非官方命令行界面 (CLI)
Pastol 允许用户直接从命令行与 paste.lol 服务交互。
让您快速方便地分享文本和文件。
用法
pastol <COMMAND>
命令
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)
安装
-
安装 rust 和 cargo。
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -
安装 pastol。
-
使用 binstall (更好)
-
安装 binstall
Linux 和 macOS
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bashWindows
Set-ExecutionPolicy Unrestricted -Scope Process; iex (iwr "https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.ps1").Content -
安装 pastol
cargo binstall pastol
-
-
不使用 binstall
-
如果在 Linux 或 可能 macOS(需要反馈)
-
macOS (Homebrew)
brew install openssl@3 -
macOS (MacPorts)
sudo port install openssl -
Arch Linux
sudo pacman -S pkg-config openssl -
Debian 和 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
-
-
安装软件包。
cargo install pastol -
-
设置
-
设置用户和 API 密钥。
pastol --setuser your_username --setapikey your_api_key # if the env var api_omg_lol is set it will be used instead -
例如:adam。
pastel --setuser adam --setapikey a321dwageaawdwadw您的 API 密钥存储在本地配置文件中。Linux 示例路径
.config/pastol/config.toml
- 可选:将所有新的或更新的粘贴板设置为未列出/隐藏。
pastol --setunlist true
示例
-
上传文件。
pastol example.txt -
将粘贴板作为文件下载。
pastol download example-title-as-apears-on-the-url -
上传带有自定义标题的文件。
pastol add example.txt -t "Example Title" -
上传带有自定义内容的文件。
pastol add example.txt -c "This is the content of the example file." -
上传自定义。
pastol add -t title-example -c "pastebin content example" -
删除粘贴板。
pastol remove hello-world -
列出所有列出的粘贴板。
pastol list -
查看粘贴板。
pastol view example -
按标题搜索粘贴板。
pastol search exa
构建
-
安装 cargo
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -
克隆仓库
git clone https://github.com/M1n-74316D65/Pastol -
如果在 Linux 或 可能 macOS()
-
macOS (Homebrew)
brew install openssl@3 -
macOS (MacPorts)
sudo port install openssl -
Arch Linux
sudo pacman -S pkg-config openssl -
Debian 和 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
-
-
构建
- 使用 just. (请使用此选项)
- 如果尚未安装,请安装 just
- 查看 justfile 以获取可用命令。
- 使用 cargo
-
cargo build - 这是 pastol 可执行文件的位置
./target/debug/pastol
-
- 使用 just. (请使用此选项)
更多信息请查看 justfile 或使用 just。
LOL
依赖项
~15–29MB
~470K SLoC