Skip to content

document_en

YANG Huan edited this page May 19, 2021 · 22 revisions

Detailed export rule description

1.Make the Sheet page available for export


Identifiers need to meet the C language naming rules, the following mentioned identifier are required.

2.Table Header Rules

Format 1 (common format, each row can be considered an object)


The first 4 behavior headers, which describe the format and information of the export, are explained below.

  • The first line is descriptive information
  • The second line is the type of the field information, there are basic types (int, string, double, bool), an array and the structure, will be described in detail later.
  • The third line is the field name, need to meet the definition of the identifier
  • The fourth line is the export tag, with the command line parameter "-s" to use, can control this column is exported
  • Starting at line 5, is the data section

Format 2 (configuration parameter format)


Column number is fixed to 5, respectively, the field name, field value, field type, export tags, description information, header only one row, the rest for the data part. This format is generally used to configure some global parameters or multi-language text information

3.The field type

Contains the basic types (int, string, double, bool), arrays and structures, with reference to the C language syntax design, simple and easy to understand, the following one by one

  • int ,Integer
  • string ,The string type
  • double ,Decimal
  • bool ,Fill in the value, 0 is false, the rest is true, fill in the string, then, false, no, off is false, true, yes, on is true (case insensitive)
  • [] ,An array type that can be nested with primitive types and structures. For example, the type is "int []", the value can be "[1,2,3,4,5]", the end of the "[]" may not fill in the simplified way "1,2,3,4,5"
  • {} ,The structure type, which can be nested with an array. Such as "{string Name: int Age}", the value can be "{Zhang :23}", the end of the "{}" may not fill out

,:as separators for arrays and structures, and if there is a conflict with a string, the string ,: needs to be escaped into \, \:

4.Comment (so that some data is not exported)

  • Line comment, the first row of the cell is empty or the first character is "#", that comment out this line, this line of data is not exported
  • Column comment, field names, field types are not filled out, this column is not complete, this column will not export
  • Paragraph comment, starting from a row, three consecutive lines are blank line, the subsequent line skip, are not derived

5.Merging multiple sheet pages


This configuration will merge the following configuration items into the first configuration item and export it.

Example

https://github.com/yanghuan/proton#example

Communication

Please Enjoy