Coder Social home page Coder Social logo

ezrc's Introduction

erzc

About

ezrc is a command line utility that packs data as C source code.
This approach to data handling provides a robust and portable solution when data is closely bound to source code.

Usage

ezrc [options] <files> 

Options

  • --help -h Display a brief help and usage message.
  • --version -v Display the program version and exit.
  • --output -o Specify the output file to write. If only one input file is given the base name is appended with .c. If multiple input files are specified ezrc will quit with an error.

Example Usage

A Single File

ezrc SunIcon.jpg

This will read SunIcon.jpg and create the file SunIcon.c. In this file there will be a unsigned char SunIcon_jpg[] with the contents and a unsigned int SunIcon_jpg_size with the size in bytes of contents.

To use the resource use a simple extern declararion like so:

extern unsigned char SunIcon_jpg[];
extern unsinged int SunIcon_jpg_size;

Multiple Files

ezrc Toon.vert Toon.frag ToonGradient.png -o resources.c

This will read the data from Toon.vert, Toon.frag and ToonGradient.png and write the file resources.c. The file will contain the variables Toon_vert, Toon_frag and ToonGradient_png with the respective data.

Building

All you need to build this package is a make and a C++ compiler. just invoke make and it should build all you need.

Errors, Bugs and Suggestions

Please report any errors, bugs and suggestions to:

https://github.com/rioki/ezrc

License

ezrc is distibuted under the MIT License.

ezrc's People

Contributors

rioki avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

ezrc's Issues

Output C Code

It may be a good idea to output C code. The advantage is that C code is way more portable and the actual code to implement is only a minor change in the application,

Update README

The README is out of date update error and contact information and other minor issues.

Write Header

It may be useful to write a header containing the forward references to data. The name should be constructed from the output name.

Update Output Comment

The current comment at the start of the output file still notes Iced Resources... well this is SO 2005... ;-)

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.