Skip to main content

A CLI tool to publish status on status.lol

Project description

omgstatus

A command-line interface tool for managing status on paste.lol, a service of omg.lol.
It does only that but it does it well.

You can access every status of someone on the web at "https://status.lol/

". Mines are here: https://status.lol/ache.

TODO:

  • Add the ability to read global status
  • Add an helper
  • Add a real README.md
    • Define use-cases
    • Details configuration options

Table of Contents

Installation

To install the tool, you can use pip:

$ pip install lolbin

But the recommanded way is via pipx:

$ pipx install lolbin

You can run it with uv:

$ uv run lolbin

Configuration

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

address = "your_address"
bearer_token = "your_bearer_token"
filters=["@rom", "USA", "iran", "Trump"]
emoji-name-languages = ["fr", "aliases"]

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'.

If you don't want to store you API token inside a config file, you can call external command to retrieve it from you secret manager.

With the backtick syntax for command substitution:

bearer_token = "`bws secret get XXXXXX` | jq .key --raw-output"

Or with the dollard based one:

bearer_token = "$ pass api.omg.lol/token_lolbin"

Filters

You can filter out the status authors and by words.

  • To filter someone's status use the @ notation: "@test" to filter the status from the address "test".
  • To filter status with the word USA, add the filter "USA".

The filters will be applyed independantly to list of statuses only, not to single one. That mean that the filters: filters = ["@ache", "USA"] will hide all the status of ache and every status that contains the word "USA".

The filters are configurable only via the configuration file, not as arguments.

Languages of emoji short names

You can configure the language(s) to use for emoji short names with emoji-name-languages.

emoji-name-languages = ["fr", "aliases", "full", "es"]

Will select the first matching emoji in the same order that the language are specified.

The list of short emoji names is not standardized but follows that of emojiterra:

You can also specify only one language.

emoji-name-languages = "fr"

Examples of use

  1. To list your own status:

    $ omgstatus
    

    By default, omgstatus print your own status.

    You can filter by date with the --since argument:

    $ omgstatus --since 1d
    

    The unity format of since duration is here. It supports french and english usual suffixes.

    Fo examples, --since 1d or --since 1J is since 1 day. 3y is 3 years, 35m is 35 minutes but 35M is 35 months.

         Format should be DD/MM/YYYY, but support also suffixes:
    
         | Sfx. | Value   | Lang  | Done |
         +======+=========+=======+======+
         | J/j  | 1 day   |  fr   |    |
         | D/d  | 1 day   |  en   |    |
         |  M   | 1 month | en/fr |    |
         | A/a  | 1 year  |  fr   |    |
         | Y/y  | 1 year  |  en   |    |
         |  S   | 1 week  |  fr   |    |
         | W/w  | 1 week  |  en   |    |
         |  m   | 1 min   | fr/en |    |
         |  s   | 1 sec   | fr/en |    |
         | H/h  | 1 sec   | fr/en |    |
         """
    

    You can also specify a maximum number of status to fetch with -n or --number:

    $ omgstatus -g -n 5
    

    Will print the global five latest status.

    You can combine --since and --number.

  2. To show someone else statuses:

    $ omgstatus @adam
    

    Or using the option --address

    You can also use --since and --number with someone else statuses.

  3. To show the geral status log use -g or --statuslog

    To print the 10 last statuses:

    $ omgstatus -g -n 10
    

    or to print every status since 5 hours:

    $ omgstatus --statuslog --since 5h
    
  4. To show the content of a specific status:

    $ omgstatus @address ^status_id
    

    Example:

    $ omgstatus @adam ^638e5d13620ed
    

    ⚠️ You must provide the address with the status, the API hasn't a search by id function.

  5. To send a new status:

    You must provide an emoji along with the status.

    $ omgstatus 🤖 I am a robot
    

    You can also use the name of the emoji with the colon notation: :robot:.

    $ omgstatus :robot: I am a robot
    

    Check emoji-name-languages from the configuration file to have more information about emoji short names.

    You can also send a status from stdin. The languages are configurable in the configuration file in the field emoji-name-languages.

    $ echo "I'm a robot" | omgstatus 🤖
    
  6. To edit use a status:

    Use the --edit or -e option. It will open the status content in you configured editor (from the EDITOR environment variable).

    You can edit a old status by specifying the status ID.

    $ omgstatus -e ^695c7d3b8c516
    

    Or a new status:

    $ omgstatus -e 🎉 Party
    

    And the content will be edited in your editor before sending it.

    Tips: You can amend your last status with -l and -e.

    $ omgstatus -e -l
    
  7. To delete a status:

    Use the --delete option.

    $ omgstatus --delete ^695c7d3b8c516
    

    Tips: You can delete your last status with -l and --delete.

    $ omgstatus --delete -l
    
  8. To manage a bio status:

    Use the --bio argument.

    $ omgstatus --bio
    🌆 Digital identity
    
                                                            Ache
    
     Eternal student in computer science. Self-taught developer, now engineer.
    
     GNU\Linux, C, C++, Python, Math, self-hosted,…
    
    $ omgstatus --bio @adam
                                                            Adam Newbold
    
    
    
     Running Neatnik and building omg.lol. Catch me on social.lol!
    

    You can edit your bio with --edit:

    $ omgstatus --bio -e
    

    Or send it as a normal status from stdin or comman--line.

    $ echo "My awesome bio !" | omgstatus --bio
    $ omgstatus --bio My awesome bio \!
    

Similar projects

  • clilol: A CLI that support all the APIs of omg.lol. But too inconvenient to use for me for paste, ideal for status.
  • omglolcli: A CLI that support some of the APIs of omg.lol. Nice but incomplet.

License

omgstatus is distributed under the terms of the MIT license.

Requirements

  • Python 3.10 or higher, Python syntax
  • requests library, for HTTP requests to the api.omg.lol API.
  • tomli library, for configuration
  • rich library, for markdown support

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

omgstatus-1.1.0.tar.gz (26.7 kB view details)

Uploaded Source

Built Distribution

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

omgstatus-1.1.0-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file omgstatus-1.1.0.tar.gz.

File metadata

  • Download URL: omgstatus-1.1.0.tar.gz
  • Upload date:
  • Size: 26.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.16.5 cpython/3.14.3 HTTPX/0.28.1

File hashes

Hashes for omgstatus-1.1.0.tar.gz
Algorithm Hash digest
SHA256 afa13e0a312f1ebc695fc7059f0cbc7124a3da0611a29a526ba16025b2de0a03
MD5 63c68e7a10a0861cb429828bc5af18df
BLAKE2b-256 47494db46b3c629e6c8163950aad1b248bc215fc529edf3491b35d2614d757b6

See more details on using hashes here.

File details

Details for the file omgstatus-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: omgstatus-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.16.5 cpython/3.14.3 HTTPX/0.28.1

File hashes

Hashes for omgstatus-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 210796af9bfe72f1f16b2f46f580789091b5faeaf9e0cc26f56c96c0a2ccc1b6
MD5 eab0ca9fd92867e5d3f45a0852919b5e
BLAKE2b-256 0621060955e49b6738bdca6b71e4e04f3f053d144e9b87b95d1c335d3ad142bf

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