B*tch, I'm stylish
- π§ Getting started
- πͺ Introduction
- π§ͺ Script
- π Immense thanks to them awesome Sponsors
- π License & Copyright
Wouldn't life be easier without the overcomplication of the insanely-high amount of frameworks, links, and layers we usually apply to our way of interacting with software? No, right? My thoughts exactly! Independently of that, this time I'm bringing a simple Node.js project - a free, open-source, cross-platform JavaScript runtime environment letting developers create servers, web apps, command line tools, and scripts. Are you feeling curious about it? If you are, allow me to share some great news: you can interact with this project in two different ways!
Since BashMyCard is available on npm (the default and sexiest package manager for the JavaScript runtime environment), there are plenty of options you can choose from:
-
Access the package and get to know more about it through its dedicated npm site.
-
Summon my custom business card by running the following command:
npx juditlazaro-vcard
- Download the original package, which you'll find in this project:
npm install bash-my-card
Are you more into taking action, exploring, and adding some tweaks until the results truly satisfy your needs and preferences? Fear not, dear stranger! As usual, and since this is an open-source project, there's also room for that.
As stated before, if you are interested in playing with BashMyCard
, remember that you can always clone the repository:
$ git clone https://github.com/JuditKaramazov/BashMyCard.git
In this case, the structure that you will find is extremely simple:
/
βββ CODE_OF_CONDUCT.md
βββ index.js
βββ LICENSE
βββ package.json
And what truly matters here, besides some minor changes to the package.json information, is the content inside our index.js, which we can easily display in our terminal by running:
node index.js
Easy, right? Feel free to let me know if you enjoyed this little script, as you'll definitely find some ways to contact me thanks to this project! Ha, ha... God...
Tip
Whatever you decide to do, please remember to respect the Code of Conduct while interacting with the project and the platform itself. Thank you kindly!
No matter how many times I wondered why I keep adding links to my list of already-way-too-many links, I do believe I reached a point of no return where I simply can't find a way to stop myself from sharing portfolios, one blog, and this other blog, and social media I'm not even paying that much attention to, and business accounts I should (perhaps) be more responsive to...
Undoubtedly, all of them will vary in content. Our type of business and growth plans might determine where we should put our focus, and while social media isn't a digital billboard for our brand, it is supposed to be a portal to direct connection with our ideal customers and peers, and a pathway to powerful insights - or so I heard. But when is too much truly too much? Between you and I, are you using a link in bio tool
like Linktree, too?
Well, guess what: some days, I'm tired of the interwebz mayhem, and when days like such hit me, I stare at the void and wonder: "What if I generate something capable of delivering my contact details, like a card, which keeps people wondering if I am sending them a virus or a nice 'whatever' that I just programmed?"
And that's exactly what happened when I created BashMyCard, my dear and invisible reader.
While simple, this script provides what is supposed to:
- My name (Β‘hola, mamΓ‘! Β‘Salgo por la tele!)
- A brief introduction.
- The most relevant contact information and links that came to mind.
As for the main file itself (index.js), even though most of it is focused on the styles:
-
the
links array
contains multiple objects, each representing a social link (blog, GitHub, LinkedIn...), -
linkList
joins all the links together into one string, with each link on a new line, -
console.log()
outputs the formatted card by combining the intro and linkList inside a box:
const linkList = links.map((link) => `${link.name} ${link.url}`).join("\n");
console.log(boxen(intro + linkList, boxenOptions));
"Why are you even mentioning this, Judit?"
Because as you just saw, there is no need to make things complicated to achieve satisfying results.
In order to achieve these stylistic results, I kept it simple all the way long, and Boxen, a simple yet extremely efficient package allowing you to create customizable boxes in the terminal, played a huge part in it. Useful for highlighting information or framing important messages, Boxen
allows you to style borders, padding, margins...
import boxen from "boxen";
const boxenOptions = {
margin: 1,
padding: 1.3,
width: 62,
title: "@JuditKaramazov",
titleAlignment: "center",
borderStyle: "bold",
borderColor: "yellowBright",
};
As for Chalk, aka "terminal string styling done right", I couldn't have found better words to explain its usage. Chalk comes with an easy-to-use composable API where you just chain and nest the styles you want, easily define your own themes, and take advantage of console.log string substitution. Sounds tempting? As if allowing you to use different colors, backgrounds, boldness, and underlines for more vibrant output wasn't enough, together, Boxen
and Chalk
are powerful for building CLI applications where readability and visual design matter.
const intro = chalk("Hola! Here's ")
+ chalk.black.bgYellowBright("Judit LΓ‘zaro Moyano")
+ chalk(". Developer, philologist & tight-rope walker.\n\nNo conduzco, pero Kojima me guΓa.\n\n");
Now, try it yourself! π₯
ΒΏHay esperanza? Hay esperanza. It feels like most of us are running out of energy at this point, but independently of that, huge thanks β€οΈ to @Entreprises LEMRHALI
, our amazing, incredible, and underserved Sponsor who kept supporting this crazyness both through the bad and good moments.
Do you remember when we could look at ourselves in the mirror in Undertale? Despite everything, it's still you.
That's always been one of my favorite gaming moments, for whatever reason - and yes, indeed: despite everything, we are still here. It's still you. From the bottom of my heart, thank you kindly. And courage. Tons of it!
This work lives under the robust, solid, beautiful, and definitely scripted roof of the MIT License. That said, and only if you enjoyed what you found here, remember that you can make the Dinosaur extremely happy if you...