Skip to main content
Version: Next

data tag

Luban supports record-level tag marking, and each data can have 0 or more tags. tag can be used to identify a record as a comment, either to filter the export, or to instruct the validator not to check this record.

Format Introduction

In different file formats, the way to fill in the record tag is similar, you can also refer to luban_examples/DataTables/Data/tag_datas directory examples.

excel format

Fill in the tag in the first column of the record.

tag

json format

{
"__tag__": "dev",
"id": 1,
"name":"xxx"
}

lua format

return {
__tag__ = "dev",
id = 1,
name = "xxx",
}

xml format

<data>
<__tag__>dev</__tag__>
<id>1</id>
<name>xxx</name>
</data>

yaml format

__tag__ : dev
id : 1
name: xxx

special tag name

There are some special tag names that are used for special meaning.

  • ##. Indicates that this record is annotated and will never be exported
  • unchecked. Indicates that the validator does not check this record

Record filter export

There are several occasions where filter export is used

  • Some records are only used for internal testing and do not want to be exported for official release
  • Some records want different versions for testing and publishing
  • Some simple multi-version management, such as a record is only exported in a certain version or branch

Use the command line parameter --includeTag or --excludeTag to include or exclude the data of the specified tag. The following is an example of usage.

##varidname
##typeintstring
##iddesc1comment
1item1export forever
##2item2never export
test4item4--excludeTag do not export when testing
TEST5item5Do not export when --excludeTag test
dev6item6--excludeTag dev does not export
7item7export forever