- Python 100%
| src/omgstatus | ||
| LICENSE.txt | ||
| pyproject.toml | ||
| README.md | ||
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.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:
- French: Liste d'émojis
- English: Emoji list
- Spanish: Lista de emojis
- Italian: Elenco degli emoji
- German: Emoji-Liste
You can also specify only one language.
emoji-name-languages = "fr"
Examples of use
-
To list your own status:
$ omgstatusBy default,
omgstatusprint your own status.You can filter by date with the
--sinceargument:$ omgstatus --since 1dThe unity format of
sinceduration is here. It supports french and english usual suffixes.Fo examples,
--since 1dor--since 1Jis 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
-nor--number:$ omgstatus -g -n 5Will print the global five latest status.
You can combine
--sinceand--number. -
To show someone else statuses:
$ omgstatus @adamOr using the option
--addressYou can also use
--sinceand--numberwith someone else statuses. -
To show the geral status log use
-gor--statuslogTo print the 10 last statuses:
$ omgstatus -g -n 10or to print every status since 5 hours:
$ omgstatus --statuslog --since 5h -
To show the content of a specific status:
$ omgstatus @address ^status_idExample:
$ omgstatus @adam ^638e5d13620ed⚠️ You must provide the address with the status, the API hasn't a search by id function.
-
To send a new status:
You must provide an emoji along with the status.
$ omgstatus 🤖 I am a robotYou can also use the name of the emoji with the colon notation:
:robot:.$ omgstatus :robot: I am a robotCheck
emoji-name-languagesfrom 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 🤖 -
To edit use a status:
Use the
--editor-eoption. It will open the status content in you configured editor (from theEDITORenvironment variable).You can edit a old status by specifying the status ID.
$ omgstatus -e ^695c7d3b8c516Or a new status:
$ omgstatus -e 🎉 PartyAnd the content will be edited in your editor before sending it.
Tips: You can amend your last status with
-land-e.$ omgstatus -e -l -
To delete a status:
Use the
--deleteoption.$ omgstatus --delete ^695c7d3b8c516Tips: You can delete your last status with
-land--delete.$ omgstatus --delete -l -
To manage a bio status:
Use the
--bioargument.$ 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 -eOr send it as a normal status from
stdinor 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