boinc/py/db_def_to_py

16 lines
268 B
Perl
Executable File

#!/usr/bin/env perl
## $Id$
## parse the db #defines to python.
## syntax: ./db_def_to_py < ../db/boinc_db.h > boinc_db.py
print "# Generated by db_def_to_py\n";
while (<>) {
if (/^\s*#define\s+([^\s]+)\s+([0-9]+)\s*$/) {
print qq/$1 = $2\n/;
}
}