Can I convert the font and SVG to base64 via offline OS X and Linux terminals?

0

I know how and I can convert the images to base64 via OS X and Linux terminals.

But I'm not sure if I can convert the fonts and the SVGs to base64 via offline OS X and Linux terminals.

I don't know any offline base64 apps that encode the images, fonts and SVG for OS X and linux. I know Coda 2 has base64 plugin, but it's bug and suffers a fail. TextMate has Emmet plugin that comes with base64 encoder, but I tried and it wasn't converted. Brackets has Emmet too, but Emmet doesn't have base64 plugin. These plugins convert only the images.

Gustavo Reis Costa

Posted 2014-11-12T21:02:54.450

Reputation: 103

Answers

1

On both systems you can use the base64 command.

Example:

cat test.svg | base64

to encode and

echo "<base64>" | base64 -d

and replace -d with -D on macOS.

The base64 utility comes preinstalled on most Linux distros as well as macOS.

Source: https://scottlinux.com/2012/09/01/encode-or-decode-base64-from-the-command-line/

Zeb McCorkle

Posted 2014-11-12T21:02:54.450

Reputation: 249