Coder Social home page Coder Social logo

tomquas / as-data-uri-cli Goto Github PK

View Code? Open in Web Editor NEW

This project forked from derhuerst/as-data-uri-cli

0.0 1.0 0.0 5 KB

Command line tool to encode data into a data URI.

Home Page: https://github.com/derhuerst/as-data-uri-cli#as-data-uri-cli

License: ISC License

JavaScript 100.00%

as-data-uri-cli's Introduction

as-data-uri-cli

Command line tool to encode data into a data URI.

Similar to data-uri-to-file-cli, but

  • only uses stdio instead of read and writing files
  • supports url-encoded data URIs (e.g. data:text/plain,hello%20world)
  • supports an optional charset

npm version build status ISC-licensed chat on gitter

Usage

Usage:
    as-data-uri [--url-encoded] [--mime mime-type] [--charset utf8]

Options:
    --url-encoded  -u  Url-encode instead of base64.
    --mime         -m  Specify a mime type. Default: text/plain.
    --charset      -c  Specify an optional charset (for text only).

Examples:
    echo -n 'hello world' | as-data-uri --mime text/plain --url-encoded
    cat picture.png | as-data-uri --mime image/png | pbcopy

If you have installed it:

echo -n 'Hello World!' | as-data-uri -m text/plain -u
# data:text/plain,hello%20world
cat foo.png | as-data-uri -m image/png
# data:image/png;base64,iVBORw0K…CYII=

Contributing

If you have a question or have difficulties using as-data-uri-cli, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, refer to the issues page.

as-data-uri-cli's People

Contributors

derhuerst avatar

Watchers

 avatar

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.