Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bmarwell/social-metricbot

A metric bot for Mastodon, BlueSky and previously Twitter (now X)
https://github.com/bmarwell/social-metricbot

bluesky bluesky-bot bot mastodon mastodon-bot social-media social-network

Last synced: about 2 months ago
JSON representation

A metric bot for Mastodon, BlueSky and previously Twitter (now X)

Awesome Lists containing this project

README

        

= Social Metricbot
:icons: font
:toc: macro
:toclevels: 4

image:https://github.com/bmarwell/social-metricbot/actions/workflows/maven.yml/badge.svg[Maven CI,link=https://github.com/bmarwell/social-metricbot/actions/workflows/maven.yml]
image:https://img.shields.io/badge/License-Apache_2.0-blue.svg[License,link=https://opensource.org/licenses/Apache-2.0]
image:https://codecov.io/gh/bmarwell/social-metricbot/branch/main/graph/badge.svg?token=OkJW0qKkJs[codecov.io,link=https://codecov.io/gh/bmarwell/social-metricbot]
image:https://img.shields.io/badge/renovate-enabled-brightgreen.svg[Renovate,link=https://renovatebot.com]
image:https://img.shields.io/badge/AppServer-Open%20Liberty-blue[AppServer,link=https://openliberty.io/]

A metric bot for social networks like Mastodon, Bluesky (bsky), but not 𝕏 (formerly Twitter).
If mentioned with 'please' on a tweet containing imperial units, will reply with converted metric units for your convenience.

== Active bots

* https://bsky.app/profile/metricbot.de[+πŸ‡ΊπŸ‡Έ metricbot.de+] on πŸŒ€ Bluesky
* https://botsin.space/@metricbot[+πŸ‡ΊπŸ‡Έ @[email protected]+] on 🐘 Mastodon

== Inactive bots

* https://twitter.com/metricbot1/with_replies[+πŸ‡ΊπŸ‡Έ @metricbot1+] on 🐦 Twitter +
Due to unusable API (constraints as well as SDK quality).

== How to use

If you spot a tweet with metric units in it, create a reply and mention `@metricbot1 please` or `@metricbot1 convert please`.

For Mastodon, use `@[email protected] please` or `@[email protected] convert please`.

== Features

* find tweets with imperial units.
* can convert units to metrics and reply.

=== Currently implemented units

.Supported metric conversions in alphabetical order
|===
|Input Unit |Output Unit(s) |Example Input |Example output

|Calories (cal)
|Kilojoule (kJ)
|
|

|Cups (cup)
|Millilitres (ml)
|
|

|Fluid Ounce (fl.oz.)
|Millilitres (ml)
|
|

|Foots and Inches ('/"/ft)
|Centimetres (cm), Metres (m), Kilometres (km)
|
|

|Gallons
|Litres (L), cubic metres (mΒ²)
|
|

|Horse Power (hp)
|Kilowatts (kW)
|
|

|Miles
|Kilometres (km)
|
|

|Pints (pt)
|Litres (L), Millilitres (ml)
|
|

|Pounds (lb)
|Kilograms (kg)
|
|

|Tablespoons (tbsp)
|Grams (g)
|
|

|Teaspoons (tsp)
|Grams (g)
|
|

|Temperature: Degree Fahrenheit (Β°F)
|Temperature: Degree Celsius (Β°C)
|
|

|Weighted Ounce (oz.)
|Grams(g)
|
|
|===

No idea what makes the Celsius temperature more metric than Fahrenheit, but Fahrenheit is a very convenient unit.

== Configuration

See https://github.com/bmarwell/social-metricbot/wiki/Configuration[Wiki:Configuration].

== How to start

You can start this OpenLiberty docker container like this:

[source,bash]
----
docker run \
-p 9080:9080 \
-e IO_GITHUB_BMARWELL_SOCIAL_METRICBOT_H2_DB=jdbc:h2:file:/var/opt/metricbot.db \
-name metricbot \
io.github.bmarwell.social.metricbot/social-metricbot-app-ol-docker:latest
----