• Stars
    star
    118
  • Rank 289,329 (Top 6 %)
  • Language
    Crystal
  • License
    BSD 2-Clause "Sim...
  • Created almost 2 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

🦈🏳️‍⚧️🏳️‍🌈 Gay sharks at your local terminal - lolcat-like CLI tool

BLÅHAJ ascii art in trans flag colors

BLÅHAJ

Gay sharks at your local terminal


Code Of Conduct BSD-2-Clause ci action status

What is BLÅHAJ?

Apart from a cute cuddly shark plushie from IKEA, BLÅHAJ is a lolcat-like CLI tool that colorizes your input, shows flags and prints colorful sharks!

It has a wide variety of flags/colors to choose from and many options from flag size to whether to colorize by line, word or character.

Installation

Pre-built

You can download one of the statically-linked pre-built binaries from the releases page.

They are built & published by our lovely actions.

AUR

Arch Linux users can install the blahaj (or the blahaj-git) AUR package.

Docker

docker run --rm -it --name blahaj ghcr.io/geopjr/blahaj -h

Building

Dependencies

  • crystal - 1.8.0

Makefile

  • $ make (or $ make static on Alpine Linux for a static build)
  • # make install

FAQ

Why are only striped flags allowed?

Flags with eg. triangles, circles or symbols, need enough horizontal space to determine where and how to display them. BLÅHAJ can't know in advance how long the input is going to be.

Why are the stripes repeating instead of showing the flag in full?

Just like the previous question, BLÅHAJ can't know how long the text is going to be (vertically) since it colorizes the input as it comes in.

I would like to add a color scheme or flag

Great! Follow the Contributing section and modify data/colors.yaml.

flag name:
  color:
    - hex color
    - per
    - stripe
  alias:
    - aliases
    - if any

Examples

$ blahaj -h

BLÅHAJ v2.2.0

Usage:
    blahaj [arguments]
    blahaj [arguments] file
    command | blahaj [arguments]

Examples:
    blahaj -c trans ~/.bashrc
    blahaj -s -b
    neofetch | blahaj -c gay
    blahaj -f -c lesbian -m 4
    blahaj -w /etc/os-release

Arguments:
    -b, --background                 Color the background
    -s, --shark                      Shork
    -f, --flag                       Return a flag
    -i, --individual                 Color individual characters
    -w, --words                      Color individual words
    -m MULTIPLIER, --multiplier=MULTIPLIER
                                     Multiplier for the flag size (-f)
    -c FLAG, --colors=FLAG           Color scheme to use (Default: trans)
    -r, --random                     Use a random color scheme
    --flags                          List all available flags
    -h, --help                       Show this help

Shark (-s), flag (-f), flag with 2x multiplier (-f -m 2)

A screenshot of a terminal with the output of the command "blahaj -s -c pride && blahaj -f -c pan && blahaj -f -c aro -m 2". The output first shows a big ascii shark, colorized in the usual rainbow color scheme of the pride flag (red, orange, yellow, green, blue, purple) repeating (one color per line). Under it, a small pansexual flag (pink, yellow, light blue) and under it a big (2x) aromantic flag (green, light green, white, grey, black).

Pipe, individual characters instead of rows (-i)

A screenshot of a terminal with the output of the command "cowsay "1312" | blahaj -c gay -i". The output shows some ascii art produced by the "cowsay" command of a cow with a speech bubble of the text "1312". The whole cow ascii art is colored per character using the gay / nwlnw flag colors (Dark mix of blue and green, normal mix of blue and green, light mix of blue and green, white, light blueish-purple, normal blueish-purple, dark blueish-purple).

Read from file, background instead of foreground (-b), individual words instead of rows (-w)

Notice how the foreground color changes based on the background color.

A screenshot of a terminal with the output of the command "blahaj -b -c lesbian ./src/blahaj.cr". The output shows some example code of a crystal-lang http server (you can read it and more on https://crystal-lang.org/) with each word's background colored using the colors of the lesbian flag (Dark orange, orange, light orange, white, light pinkish-purple, pinkish-purple, dark pinkish-purple). The foreground color is white on the darker background colors and black on the rest.

Pipe, default color scheme

A screenshot of a terminal with the output of the command "echo -e "A\nHAT\nIN\nTIME\nUWU" | blahaj". The output shows the words "A HAT IN TIME UWU" (one per line) colored in the trans flag colors (light blue, light pink, white, light pink, light blue).

All images above include ALT text and you are encouraged to read it, if you find parts of them confusing, by using screen readers, hovering over them with your cursor or looking at the source.

Custom flags at runtime

You can pass a local ./data/colors.yaml file at runtime to the BLAHAJ_COLORS_YAML env var and BLÅHAJ will parse it. This can also be used to override the already defined flags.

A screenshot of a file in vscodium and a terminal window. The open file is named my_flags.yaml and lists an RGB flag in the same format as colors.yaml. The terminal window ran BLAHAJ_COLORS_YAML=./my_flags.yaml ./bin/blahaj -c rgb -f -m3 and outputed the rgb flag.

(The custom file needs to follow the ./data/colors.yaml format)

Contributing

  1. Read the Code of Conduct
  2. Fork it ( https://github.com/GeopJr/BLAHAJ/fork )
  3. Create your feature branch (git checkout -b my-new-feature)
  4. Commit your changes (git commit -am 'Add some feature')
  5. Push to the branch (git push origin my-new-feature)
  6. Create a new Pull Request

Sponsors

GeopJr Sponsors

More Repositories

1

Tuba

Browse the Fediverse
Vala
458
star
2

SveltePress

Documentation for humans.
Svelte
215
star
3

Collision

Check hashes for your files - A GUI tool to generate, compare and verify MD5, SHA-1, SHA-256, SHA-512, Blake3, CRC32 & Adler32 hashes.
Crystal
133
star
4

DNOME

Adwaita-inspired Discord Theme
Less
101
star
5

libadwaita.cr

libadwaita bindings for Crystal
Crystal
40
star
6

vite-plugin-dart

⚡ + 🎯 = 💖
JavaScript
28
star
7

Crycord

A Discord Client modification with plugins. Uses BeautifulDiscord's CSS injector.
Crystal
24
star
8

DrKahls-Time-Machine

An online Cuphead save Editor
HTML
23
star
9

exorcism

Corrupt your mp4 videos. Infinite and negative duration.
Svelte
18
star
10

ultimate-gtk4-crystal-guide

Learn how to create premium GTK4 apps in Crystal
18
star
11

block-revokes-async_wake

Just an ipa for blocking ocsp.apple.com
18
star
12

CO2

A GitHub action that notifies you about your website's carbon emissions and gives you some fun facts about it
JavaScript
15
star
13

create-crystal-app

An unopinionated user-friendly crystal init alternative
Crystal
14
star
14

Granz-cr

A Discord bot/framework(?) for Crystal
Crystal
10
star
15

PronounBird

Automatically add people's pronouns next to their name while your browse Twitter.
JavaScript
10
star
16

pog

A faster npm run & npx
Crystal
10
star
17

BeardBin

A Zero-Knowledge Encrypted Text/Code sharing project
Vue
10
star
18

argyle

An offline collection of online tools
Vue
9
star
19

sabo-tabby

🐈‍⬛🏳️‍⚧️ Extremely Fast Static File Server
Crystal
8
star
20

Shipwreck

Automatically create Crystal JSON mappings from input
JavaScript
8
star
21

MarketVSX

An extension that creates a bridge between vscode marketplace and open-vsx.
JavaScript
8
star
22

pixelfed-js

A js wrapper for the Pixelfed API following the PHP one
JavaScript
7
star
23

geopjr.dev

My personal webpage
SCSS
6
star
24

non-blocking-spawn

Crystal shard that spawns fibers in any worker thread BUT the current one
Crystal
6
star
25

cakepop

A modern theme for SveltePress
Svelte
5
star
26

matrixcr

A Work In Progress matrix.org API wrapper for Crystal
Crystal
4
star
27

gettext.cr

Crystal bindings for the GNU & Musl gettext library.
Crystal
4
star
28

tankionline.js

An API wrapper for Tanki Online ratings.
JavaScript
4
star
29

asar-cr

A crystal library to read from, pack into and extract from .asar archives.
Crystal
4
star
30

vitepressify

💎🖖 Convert Crystal docs into VitePress
Crystal
4
star
31

action-accessibility

Programming is for everyone. No matter what. This action helps achieve that. Uses TTS and OpenDyslexic to create alternative accessibility options on issues and PRs.
JavaScript
3
star
32

discord-tanki

Discord Rich Presence for Tanki Online, using electron and materializeCSS
JavaScript
3
star
33

Crycord-GUI

A GUI for Crycord written in Crystal, GTK and Glade
Crystal
3
star
34

sponsors.cr

Handle DNS records with ease
Crystal
3
star
35

JavaScriptCore.cr

JavaScriptCore bindings for Crystal
Crystal
3
star
36

Cydia_Repo

My cydia repo
HTML
2
star
37

tiny-stats-template

A tiny system monitor used as a template for GTK4 + Crystal apps
Crystal
2
star
38

GeopJr

Just a GH profile readme
JavaScript
2
star
39

SelectJelbrek

A non-A12 tweak to convert selected text to Jelbrek
Logos
2
star
40

blurhash-glib

[MIRROR] A GLib-based blurhash implementation partially ported from fast-blurhash including further optimizations.
Vala
1
star
41

Granz_bot

A Discord Bot written in ruby using discordrb
Ruby
1
star
42

SvelteGlass

Analyze Svelte Apps
Vue
1
star
43

crutter

Create Flutter Widgets from Crystal
Crystal
1
star
44

Krystal

A (very basic) Crystal-Lang Highlighter for Komodo Edit/IDE
Python
1
star
45

sandstorm

🚀 Fast 🖌️ Utility-first 🌈 CSS Colors 🎨 in < 100 LOC 💻
Crystal
1
star
46

discordcr.rocks

A simple guide to introduce people to discordcr
JavaScript
1
star
47

Crusic

A discordcr music bot that uses youtube-dl and ffmpeg to download and convert music to dca files
Crystal
1
star
48

misskey-mastoapi-ext-proposal

Misskey <=> Mastodon API compat extensions proposal
1
star