Skip to main content

A small python cli to manage paste.lol from cli

Project description

lolbin

A command-line interface tool for managing pastes on paste.lol, a service of omg.lol.

Features

  • Create/Update Paste - Allows you to create or update a paste with a specified title and content.
  • List Pastes - Lists all your pastes along with their titles and the time they were last modified.
  • Show Paste - Displays the content of a specific paste by its title.
  • Delete Paste - Deletes a specific paste by its title.
  • Help Message - Provides usage instructions for the tool.
  • Debug Mode - Prints the action to be performed, the paste name, username, and bearer token (but does not actually perform the action).

Installation

To install the tool, run the following command:

$ 

Configuration

To configure the tool, create a file ~/.config/lolbin/config.toml with the following content:

username = "your_username"
bearer_token = "your_bearer_token"

You can obtain a bearer token by logging in to the <omg.lol> website, in you account, at the end of the page, section 'API Key'.

Example of Use

  1. To create/update a paste:

    $ echo "My awesome content" | lolbin --paste my_awesome_paste
    

    If you want to paste content from a file, use the --file flag:

    $ echo "My awesome content" > my_content.txt
    $ lolbin --paste --file my_content.txt my_awesome_paste
    

    The --past part is optional, as the lolbin can deduct the action from the input.

    $ cat my_content.txt | lolbin --paste my_awesome_paste
    
    
  2. To list your pastes:

    $ lolbin --list
     - my_awesome_paste (10s ago)
    
  3. To show the content of a specific paste:

    $ lolbin --show my_awesome_paste
    My awesome content
    

    As with the --paste command, the --show command can be used without the --show part, since the lolbin can deduct the action from the input.

    $ lolbin my_awesome_paste
    My awesome content
    
  4. To delete a specific paste:

    $ lolbin --delete my_awesome_paste
    
  5. To edit a specific paste:

    $ lolbin --edit my_awesome_paste
    

    The editor will be opened with the content of the paste. The content will be replaced with the edited content. The editor is determined by the EDITOR environment variable. If it is not set, the vim is used.

  6. For help:

    $ lolbin --help
    
  7. To run in debug mode, use the --debug flag with any command:

    $ lolbin --debug --list
    

Requirements

  • Python 3.10 or higher
  • requests library
  • tomli library

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lolbin-0.0.1.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lolbin-0.0.1-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file lolbin-0.0.1.tar.gz.

File metadata

  • Download URL: lolbin-0.0.1.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.16.2 cpython/3.13.11 HTTPX/0.28.1

File hashes

Hashes for lolbin-0.0.1.tar.gz
Algorithm Hash digest
SHA256 ab955c529a0744d0cc3124f993abe3728b78ab097cbc93fe3a7bb4ea690696b0
MD5 daf0e35f070841fc8e5f132b7c055133
BLAKE2b-256 97aef773d444f54c310ce4a4f171c5cc5d63a6ed550f9dc36418cc620fd99be7

See more details on using hashes here.

File details

Details for the file lolbin-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: lolbin-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.16.2 cpython/3.13.11 HTTPX/0.28.1

File hashes

Hashes for lolbin-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4d0b16ff3dd7380a688389e2be4528be1c8e8c616bae28ea10d06d7f231cfbef
MD5 b3ae72fc6ada5cf76d4eac23e45f70c0
BLAKE2b-256 71f2ae8f1deedcf5ec1b0e5592a4d510478aa7ef537c6aa6a1fa0015cc887220

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page