Sign inSign up

davideferigato/lumix

By davideferigato

β€’Updated 3 months ago

Modular, multilingual CLI converter for 30+ units. Supports 5 languages

Image
Developer tools
0

10K+

davideferigato/lumix repository overview

β πŸ”„ Lumix

One CLI to convert everything – from temperature to Morse code, in 5 languages.

PyPI version Python versions License: MIT Code style: black Tests codecov Docker Pulls Documentation DOI

Lumix is a modular, multilingual command-line converter for physical units, digital data, time, security tools, and creative utilities. Designed to be easily extensible, it features shell autocompletion – all in one sleek package.

🌐 Supported languages: English, Italian, French, Spanish, Japanese. βš™οΈ Modular core: add your own converters in minutes.

β πŸ“‹ Table of contents


⁠✨ Features

  • 🌍 Multilingual by design – Use Lumix in your native language (en, it, fr, es, jp).
  • 🧩 Modular architecture – Each converter is independent; adding a new one is as simple as creating a new folder.
  • πŸš€ Rich set of converters – From physical units to digital data, from time zones to creative tools (see reference table⁠).
  • ⌨️ Shell autocompletion – Works with bash and zsh via argcomplete.
  • 🐳 Docker‑ready – Run Lumix anywhere without installing dependencies.
  • πŸ§ͺ Fully tested – High test coverage with pytest.

β πŸ€” Why Lumix instead of units or qalc?

FeatureLumixGNU Unitsqalc
Multilingual CLI (5 languages)βœ…βŒβŒ
30+ categories out of the boxβœ…βœ…βœ…
Shell autocompletionβœ… (argcomplete)❌❌
Modular, add your own converter in 5 minβœ…βŒβŒ
Docker image with 0 configβœ…βŒβŒ
Native hashing, IP tools, Morseβœ…βŒβŒ
Open source, Python, easily hackableβœ…βŒβŒ

Lumix is not just another unit converter – it's a pluggable framework for CLI conversions, designed to be extended by developers and used by anyone in their native language.


β πŸ“¦ Installation

pip install lumix
⁠From source
git clone https://github.com/davideferigato/lumix.git
cd lumix
python -m venv venv && source venv/bin/activate   # or `venv\Scripts\activate` on Windows
pip install --upgrade pip
pip install -e .

β πŸš€ Basic Usage

lumix --help

Lumix follows a simple pattern:

lumix <language> <converter> from <source> to <target> <value>

For example:

lumix en temperature from C to F 36.5
lumix it temperatura da C a F 36,5      # Italian uses comma as decimal separator

β πŸ“Š Complete converter reference (30+ categories)

CategoryExample commandInput unitsOutput units
Temperaturelumix en temperature from C to F 36.5C, F, KC, F, K
Currencylumix en currency from EUR to USD 50EUR, USD, GBP, JPY, ...EUR, USD, GBP, JPY, ...
Number baseslumix en base from dec to hex 255dec, bin, hex, octdec, bin, hex, oct
Weightlumix en weight from kg to lb 75kg, lb, oz, g, mg, st, tsame
Lengthlumix en length from m to ft 1.80m, km, cm, mm, mi, yd, ft, in, nmisame
Volumelumix en volume from l to gal 2l, ml, m3, gal, qt, pt, cup, fl ozsame
Arealumix en area from m2 to ft2 50m2, km2, ft2, mi2, ha, acre, cm2, mm2, yd2, in2same
Speedlumix en speed from km/h to mph 130km/h, mph, m/s, knsame
Timelumix en time from days to hours 3s, min, h, d, wsame
Energylumix en energy from J to kcal 500J, kJ, cal, kcal, Wh, kWh, eVsame
Pressurelumix en pressure from bar to psi 2Pa, bar, atm, mmHg, psisame
Powerlumix en power from W to hp 1000W, kW, hpsame
Digital Datalumix en data from MB to GB 1500B, KB, MB, GB, TBsame
Bitratelumix en bitrate from Mbps to Kbps 100bps, kbps, Mbps, Gbps, Tbpssame
Hashlumix en hash sha256 "hello world"md5, sha1, sha224, sha256, sha384, sha512hash string
Colorlumix en color from rgb to hex 255,255,255rgb, hexrgb, hex
IP Toolslumix en iptools cidr-to-range 192.168.1.0/24CIDR, IP, binaryrange, binary, netmask, etc.
Time Zoneslumix en timezones from Europe/Rome to Asia/Tokyo "2025-08-02 14:00"any IANA timezoneany IANA timezone
Datelumix en date from us to iso 08/02/2025us, iso, eu, jpus, iso, eu, jp
Calendarlumix en calendar diff 2025-01-01 2025-12-31YYYY-MM-DDdays
Agelumix en age from 1990-05-23YYYY-MM-DDyears
Passwordslumix en passwords generate length 16 symbols truelength, symbols flagrandom password
Countrylumix en country from code to name ITcountry codecountry name
Languagelumix en language from name to code "Italian"language nameISO code
Unit Symbolslumix en unitsymbols from W to "unit name"symbol or namesymbol, name, type
Romanlumix en roman from 20251‑3999Roman numeral
Morselumix en morse to-text "... --- ..."text or Morsetext or Morse
Timezone Botlumix en timezonebot what-time Tokyocity namecurrent local time
Spokenlumix en spoken from 123456integernumber in words (en/it)
Phoneticlumix en phonetic for CIAOtextNATO phonetic alphabet

⁠⏩ Shell Autocompletion

Lumix integrates with argcomplete to provide smart tab completion.

pip install argcomplete
eval "$(register-python-argcomplete lumix)"
# Add the eval line to your ~/.bashrc or ~/.zshrc to make it permanent

Note: Autocompletion is still under active improvement.


⁠🐳 Docker

Run Lumix in a container without any local installation:

docker build -t lumix .
docker run --rm lumix en temperature from C to F 36.5

⁠πŸ§ͺ Testing

We use pytest for unit tests. To run the full suite:

pytest tests/

Each module has its own test file (test_<module>.py) to ensure reliability.


β πŸ™ Acknowledgements

Tag summary

Content type

Image

Digest

sha256:3b8eb549a…

Size

52.1 MB

Last updated

3 months ago

docker pull davideferigato/lumix