diff options
| author | 2013-06-09 18:10:22 +0200 | |
|---|---|---|
| committer | 2013-06-09 18:10:23 +0200 | |
| commit | 16af85004c84d0d6c626b4f8424ce9647669a0c1 (patch) | |
| tree | 025d479862d376dbc17e934f4ed20031c8cd97d1 /module/remote/create_jstypes.py | |
| parent | adapted to jshint config (diff) | |
| download | pyload-16af85004c84d0d6c626b4f8424ce9647669a0c1.tar.xz | |
moved everything from module to pyload
Diffstat (limited to 'module/remote/create_jstypes.py')
| -rw-r--r-- | module/remote/create_jstypes.py | 36 | 
1 files changed, 0 insertions, 36 deletions
| diff --git a/module/remote/create_jstypes.py b/module/remote/create_jstypes.py deleted file mode 100644 index 90afa4c96..000000000 --- a/module/remote/create_jstypes.py +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -from os.path import abspath, dirname, join - -path = dirname(abspath(__file__)) -module = join(path, "..") - -import apitypes -from apitypes_debug import enums - -# generate js enums -def main(): - -    print "generating apitypes.js" - -    f = open(join(module, 'web', 'app', 'scripts', 'utils', 'apitypes.js'), 'wb') -    f.write("""// Autogenerated, do not edit! -/*jslint -W070: false*/ -define([], function() { -\t'use strict'; -\treturn { -""") - -    for name in enums: -        enum = getattr(apitypes, name) -        values = dict([(attr, getattr(enum, attr)) for attr in dir(enum) if not attr.startswith("_")]) - -        f.write("\t\t%s: %s,\n" % (name, str(values))) - -    f.write("\t};\n});") -    f.close() - - -if __name__ == "__main__": -    main() | 
