Home

Awesome

English Chinese

proton

Proton is a excel export configuration file for the tool, you can export to xml, json, lua format, through external expansion can automatically generate the configuration to read the code, simple and flexible easy to use, indeed powerful.

Features

Generates an auto-read code

Use the "-c" parameter to generate a json file containing excel format information, each language can be automatically generated to achieve this code to read the tool, the specific format. Has achieved the C # language tools, other language users, can be realized, welcomed the realization of the code links for the needs of people to use.

Example

sample directory is a well configured under the direct use of the Windows example. Already contains a python3 environment, directly run __export.bat to complete the export. Need to add a new Excel file, modify the __export.py related array.

Command Line Parameters

usage python proton.py [-p filelist] [-f outfolder] [-e format]
Arguments 
-p      : input excel files, use , or ; or space to separate 
-f      : out folder
-e      : format, json or xml or lua     

Options
-s      :sign, controls whether the column is exported, defalut all export
-t      : suffix, export file suffix
-r      : the separator of object field, default is ; you can use it to change
-m      : use the count of multiprocesses to export, default is cpu count
-c      : a file path, save the excel structure to json, 
          the external program uses this file to automatically generate the read code      
-h      : print this help message and exit

Documentation

Wiki https://github.com/yanghuan/proton/wiki/document_en
FAQ https://github.com/yanghuan/proton/wiki/FAQ_en

License

Apache 2.0 license.


proton

proton是一个将excel导出为配置文件的工具,可以导出为xml、json、lua格式,通过外部扩展可支持自动生成读取配置的代码,简单灵活易于使用,确不失强大。

特点

后端程序(生成自动读取的代码)

使用“-c”参数可生成内含excel格式信息的json文件,各个语言可据此实现自动生成读取代码的工具,具体格式说明。已经实现了C#语言的工具,其他语言使用者,可自行实现,欢迎提供实现的代码链接,以供需要的同学使用。

实例工程

sample目录下是一个配置好了的可在windows下直接使用的实例。已经包含了python3环境,直接运行__export.bat即可完成导出。需要添加新的Excel文件,修改__export.py中相关数组,加入即可。

命令行参数

usage python proton.py [-p filelist] [-f outfolder] [-e format]
Arguments 
-p      : input excel files, use , or ; or space to separate 
-f      : out folder
-e      : format, json or xml or lua     

Options
-s      :sign, controls whether the column is exported, defalut all export
-t      : suffix, export file suffix
-r      : the separator of object field, default is ; you can use it to change
-m      : use the count of multiprocesses to export, default is cpu count
-c      : a file path, save the excel structure to json, 
          the external program uses this file to automatically generate the read code      
-h      : print this help message and exit

文档

格式说明 https://github.com/yanghuan/proton/wiki/document_zh
FAQ https://github.com/yanghuan/proton/wiki/FAQ_zh

交流讨论

许可证

Apache 2.0 license.