Skip to content
Put files data into variables
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

File to variable

file2var is made with python3. It has no dependency other than python 3.2 or higher.

For example

Generate c files, Convert text files to cstring or binary files to c unsigned char[].

Example usage

$ ./file2var txt2str -p c -o ../src/programs *.glsl

output files are programs.h and programs.c

Javascript Example usage

$ ./file2var txt2str -p js -o ../src/programs.js *.glsl

output file is js file containing all .glsl files named with their filename

You can’t perform that action at this time.