Skip to content
This repository has been archived by the owner on Jun 3, 2018. It is now read-only.
/ img2Dataurls Public archive

It outputs file that has an array of dataurls, corresponding to image files with the given extension in the current directory, and returns the output filename.

License

Notifications You must be signed in to change notification settings

YujiSODE/img2Dataurls

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 

Repository files navigation

img2Dataurls

It outputs file that has an array of dataurls, corresponding to image files with the given extension in the current directory, and returns the output filename.
https://github.com/YujiSODE/img2Dataurls

Copyright (c) 2017 Yuji SODE <[email protected]>
This software is released under the MIT License.
See LICENSE or http://opensource.org/licenses/mit-license.php


0. data URL scheme

According to RFC 2397 (Masinter, 1998), data URL scheme is URL scheme that would work like 'immediate addressing', and this scheme has following form of URL:
data:[<mediatype>][;base64],<data>
RFC 2397 (Masinter, 1998) shows an example of using data URL scheme as an inline image in a HTML document as follows:
<IMG SRC="data:image/gif;base64,R0lGODdhM ... AA7" ALT="Larry">

1. Synopsis

Tcl
::img2Dataurls::getUrls exName1;
Shell
tclsh img2Dataurls.tcl exName1 ??exName2? ?exName3? ... ?exNameN??;

Parameters

  • exNameN: N-th name of image file extension

Script

  • img2Dataurls.tcl

2. Output

This script outputs a file that has an array of dataurls corresponding to image files with the given extension in the current directory.
Details of output file

  1. filename: dataurls_<exNameN><XXX>.tcl
    where <exNameN> and <XXX> are given file extension and numbers.
  2. file contents
    There are header section and body section.
    1. header section
      It has timestamp, directory and fileExtension.

      • timestamp: timestamp of execution
      • directory: path to the current directory
      • fileExtension: given file extension
    2. body section
      It has following format:
      #=== File: <matched filename> ===
      #dataurl
      set dataurls(<matched filename>) {<dataurl>};

3. Library list

4. Reference

About

It outputs file that has an array of dataurls, corresponding to image files with the given extension in the current directory, and returns the output filename.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages