DEV Community

Robin Winslow
Robin Winslow

Posted on

1 1

New fancify-text Python module

I just made a new Python module and CLI tool called fancify-text for transforming text into fancy unicode representations:

$ fancify-bold "hello world"
𝗡𝗲𝗹𝗹𝗼 π˜„π—Όπ—Ώπ—Ήπ—±
$ fancify-bolditalics "hello world"
π™π™šπ™‘π™‘π™€ 𝙬𝙀𝙧𝙑𝙙
$ fancify-upsidedown "hello world"
plΙΉoʍ ollǝΙ₯
Enter fullscreen mode Exit fullscreen mode

I'm hoping to use it in an automatic tool for turning blog posts into twitter threads that I'm working on.

I stole the code

I can't say I wrote it - I basically stole it from @Secret-chest, and repackaged their code. They did all the hard work of finding the appropriate unicode characters.

I don't know if they mind. There's no license on the code so technically it's their copyright, but I contacted them to ask if they want control of the module. They're welcome to it if they want.

I just made it into a class, wrote a lot of boilerplate code around it for different function names and CLI entrypoints. And now you can use it.

Try it out

On the command-line:

$ pip3 install fancify-text
$ fancify-script "hello world"
𝒽𝑒𝓁𝓁𝓅 π“π“…π“ˆπ“π’Ή
Enter fullscreen mode Exit fullscreen mode

Or in Python:

In [1]: from fancify_text import blue

In [2]: print(blue("hello world"))
πŸ‡­ πŸ‡ͺ πŸ‡± πŸ‡± πŸ‡΄    πŸ‡Ό πŸ‡΄ πŸ‡· πŸ‡± πŸ‡© 
Enter fullscreen mode Exit fullscreen mode

Speedy emails, satisfied customers

Postmark Image

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

Sentry image

See why 4M developers consider Sentry, β€œnot bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

πŸ‘‹ Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay