Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gimmeuri

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gimmeuri

Converts a file to a datauri and copies it to the clipboard.

  • 0.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
2
Weekly downloads
 
Created
Source

I thought you might like a data uri.

gimmeuri gets you the datauri for a single file and copies it to your clipboard, or optionally saves it to a file. That's it.

Usage:

Copy the datauri for a file to your clipboard:

gimmeuri path/to/file

Advanced Usage:

Usage: gimmeuri [options] <file>

Options:

  -m, --max [bytes]       maximum file size to process (1048576)
  -s, --save-path [path]  path to save the daturi
  -V, --version           output the version number
  -h, --help              output usage information

Save Path

gimmeuri copies the specified file's data uri to the clipboard by default. It will instead be written to --save-path, if provided.

Max File Size

gimmeuri will exit(1) if the specified file is larger than the maximum file size. The default is 1048576 (1 megabyte), but can be overridden with the --max option.

TODO:

Provide an interface in JavaScript so you can use gimmeuri like this:

require('gimmeuri')(path, cb);

Do a better job with default mime-type parsing. Many files should be "text/plain" but get returned as "application/octet-stream". Markdown files, for instance.

Provide an option for forced mime-type coercion:

gimmeuri -f text/plain README.md

License:

MIT

FAQs

Package last updated on 01 Jul 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc