Publisher review:datafy.rb is a tool to take a file and create a data: URI for it. datafy.rb is a tool to take a file and create a data: URI for it.
The data: URI scheme is described in RFC 2397. In short, if its a text file (MIME type text/*), the file is URL-encoded, the URI is built like this: "data:" MIME type "," URL-encoded file contents datafying "Here is some text to datafy." with text/plain as the content type looks like this: data:text/plain,Here is some text to datafy. For files with a binary MIME type (anything other than text/*), the file is base64 encoded and the URI is built like this: "data:" MIME type ";base64," base64-encoded file contents datafying "Here is some text to datafy." with application/octet-stream as the content type looks like this: data:application/octet stream; base64,SGVyZSBpcyBzb21lIHRleHQgdG8gZGF0YWZ5Lgo=
datafy.rb can be called with a filename and will attempt to determine the file using file(1) if it exists on your system, and supports the -i option for outputting the MIME type, otherwise the mime type must be specified with -m. datafy.rb can also read a file from stdin, the mime type must be specified in this mode. datafy.rb can also be called with -u url and will download the url and its attached pages (img src=, link href=), datafy them, make relative a href links absolute, and send the page to stdout.
datafy.rb is a Ruby script for Development Tools scripts design by segment7.
It runs on following operating system: Windows / Linux / Mac OS / BSD / Solaris.
Operating system:Windows / Linux / Mac OS / BSD / Solaris