Git Product home page Git Product logo

btoa-atob's Introduction

btoa-atob

NodeJS-based command line utility to convert files to base64 and vice versa.

Warning

You're probably better off using a more established btoa/atob converter, such as btoa.

Installation

If you have npm:

$ sudo npm install btoa-atob -g

If not:

$ sudo make install

Usage

See btoa --help and atob --help.

Flags:

-p	--prefix		The content of the file before output.
-s	--suffix		The content of the file after output.
-o	--output-to-file	The file to write the output to. If not specified, write to stdout.

Examples

Convert file-a into base64 and write the data to file-b

$ btoa file-a -o file-b

Convert a string from stdin back from base64 and output to stdout

$ echo "ZXhhbXBsZQo=" | atob

Convert contents of file-a to base64 and write into a javascript file assigning it to a var called filedata

$ btoa file-a -p "var filedata = '" -s "'" -o filedata.js

MIT License

btoa-atob's People

Contributors

jussi-kalliokoski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

btoa-atob's Issues

can't get working .js string for use with audiolib

I've tried this with a bunch of different samples (all .wav) and none of them seem to work with the example shell script. I always get a DOM Exception: INVALID_CHARACTER_ERR (5).

I'm trying to create a .js sample for use in audioLib. The strings you included with audioLib.js all work great... I was wondering if the file has to be in a particular format? Big-Endian? 8-bit?

If you have any ideas let me know! I put a file I was unable to convert here:

http://www.charlie-roberts.com/misc/ClosedHat.wav

Thanks - Charlie

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.