#cli #pastebin #code

app pastebin_gen

A command-line interface for writing PasteBin easily

11 releases (4 stable)

2.0.0 Feb 20, 2022
1.1.1 Feb 20, 2022
0.1.7 Feb 9, 2022

#1939 in Command line utilities

Download history 18/week @ 2023-10-29 1/week @ 2023-11-05 1/week @ 2023-11-12 2/week @ 2023-11-19 24/week @ 2023-11-26 33/week @ 2023-12-03 11/week @ 2023-12-17 22/week @ 2023-12-24 11/week @ 2024-01-07 9/week @ 2024-01-14 11/week @ 2024-01-21 22/week @ 2024-01-28 1/week @ 2024-02-04 39/week @ 2024-02-11

79 downloads per month

MIT license

12KB
137 lines

PasteBinGen

A command-line interface for creating pastes on PasteBin easily.

Feature Status
Set syntax highlighting Done
Set file name Done

Summary

  1. Requirements
  2. Installation
  3. Usage
  4. Example
  5. Help
  6. Limitations
  7. License

Requirements

  1. Rust

Installation

cargo install pastebin_gen

Usage

  1. API key of PasteBin.

    If it's the first time you're using the program, you should configure the API key of PasteBin. In order to do that, you need to create an account on PasteBin. After that, go to the API's documentation and find the section "Your Unique Developer API Key". Copy the key above and set the api key with the flag api-key alongside with the path of the file that you want to upload to PasteBin. If you run the program, but the API key is not avaiable, the program will crash.

  2. Paste format options

    If you want to see the format options for enabling syntax highlighting, see that list. If you don't set any formating option, it will have no syntax highlighting.

Example

pastebin_gen --api-key YOUR_API_KEY --path path/to/file --paste-format python --paste-name my_file_name

WARNING: --api-key is not necessary unless you're setting it for the first time or you want to replace the current one. Additionally, --paste-name and paste-format are optional flags.

Help

The usage is pretty straightforward. However, if you need help, try to run pastebin_gen --help.

Limitations

  1. Maximum 10 pastes per 24h

    The PasteBin's API does not allow a free user to create more than 10 folders within the 24 hour limit.

License

This project is licensed under the MIT license.

Dependencies

~8–22MB
~327K SLoC