提交 22576c94 编写于 作者: aaronchen2k2k's avatar aaronchen2k2k

close task#7902

上级 0854444e
......@@ -5,12 +5,12 @@ version: 1.0
fields:
- field: letters
from: base.name.letters.v1.yaml
from: name.letters.v1.yaml
use: letters
postfix: "\t"
- field: numbers
from: base.name.numbers.v1.yaml
from: name.numbers.v1.yaml
use: numbers
postfix: "\t"
......@@ -27,89 +27,89 @@ fields:
postfix: "\t"
- field: enreal
from: base.name.enreal.v1.yaml
from: name.enreal.v1.yaml
use: common
prefix: "["
postfix: "]\t"
- field: enreal_male
from: base.name.enreal.v1.yaml
from: name.enreal.v1.yaml
use: male_common
prefix: "["
postfix: "]\t"
- field: enreal_female
from: base.name.enreal.v1.yaml
from: name.enreal.v1.yaml
use: female_with_middle
prefix: "["
postfix: "]\t"
- field: cnreal
from: base.name.cnreal.v1.yaml
from: name.cnreal.v1.yaml
use: two
prefix: "["
postfix: "]\t"
- field: cnreal_male
from: base.name.cnreal.v1.yaml
from: name.cnreal.v1.yaml
use: male_three
prefix: "["
postfix: "]\t"
- field: cnreal_female
from: base.name.cnreal.v1.yaml
from: name.cnreal.v1.yaml
use: female_four
prefix: "["
postfix: "]\t"
- field: enaccount_common
from: base.name.enaccount.v1.yaml
from: name.enaccount.v1.yaml
use: common
prefix: ""
postfix: "\t"
- field: enaccount_underline
from: base.name.enaccount.v1.yaml
from: name.enaccount.v1.yaml
use: common_underline
prefix: "["
postfix: "]\t"
- field: enaccount_dot
from: base.name.enaccount.v1.yaml
from: name.enaccount.v1.yaml
use: common_dot
prefix: "["
postfix: "]\t"
- field: enaccount_reverse
from: base.name.enaccount.v1.yaml
from: name.enaccount.v1.yaml
use: reverse
prefix: "["
postfix: "]\t"
- field: cnaccount_common
from: base.name.cnaccount.v1.yaml
from: name.cnaccount.v1.yaml
use: common
prefix: "["
postfix: "]\t"
- field: cnaccount_underline
from: base.name.cnaccount.v1.yaml
from: name.cnaccount.v1.yaml
use: common_underline
prefix: "["
postfix: "]\t"
- field: cnaccount_dot
from: base.name.cnaccount.v1.yaml
from: name.cnaccount.v1.yaml
use: common_dot
prefix: "["
postfix: "]\t"
- field: cnaccount_reverse
from: base.name.cnaccount.v1.yaml
from: name.cnaccount.v1.yaml
use: reverse
prefix: "["
postfix: "]\t"
- field: cnaccount_family
from: base.name.cnaccount.v1.yaml
from: name.cnaccount.v1.yaml
use: family
prefix: "["
postfix: "]\t"
- field: cnaccount_given
from: base.name.cnaccount.v1.yaml
from: name.cnaccount.v1.yaml
use: given
prefix: "["
postfix: "]\t"
\ No newline at end of file
......@@ -5,92 +5,92 @@ version: 1.0
fields:
- field: one_number_at_common
from: base.domain.domain.v1.yaml
from: domain.domain.v1.yaml
use: one_number_at_common
prefix: ""
postfix: "\t"
- field: one_number_at_cn
from: base.domain.domain.v1.yaml
from: domain.domain.v1.yaml
use: one_number_at_cn
prefix: ""
postfix: "\t"
- field: one_number_at_new
from: base.domain.domain.v1.yaml
from: domain.domain.v1.yaml
use: one_number_at_new
prefix: ""
postfix: "\t"
- field: one_letter_at_common
from: base.domain.domain.v1.yaml
from: domain.domain.v1.yaml
use: one_letter_at_common
prefix: ""
postfix: "\t"
- field: one_letter_at_cn
from: base.domain.domain.v1.yaml
from: domain.domain.v1.yaml
use: one_letter_at_cn
prefix: ""
postfix: "\t"
- field: one_letter_at_new
from: base.domain.domain.v1.yaml
from: domain.domain.v1.yaml
use: one_letter_at_new
prefix: ""
postfix: "\t"
- field: numbers_at_common
from: base.domain.domain.v1.yaml
from: domain.domain.v1.yaml
use: numbers_at_common
prefix: ""
postfix: "\t"
- field: numbers_at_cn
from: base.domain.domain.v1.yaml
from: domain.domain.v1.yaml
use: numbers_at_cn
prefix: ""
postfix: "\t"
- field: numbers_at_new
from: base.domain.domain.v1.yaml
from: domain.domain.v1.yaml
use: numbers_at_new
prefix: ""
postfix: "\t"
- field: letters_at_common
from: base.domain.domain.v1.yaml
from: domain.domain.v1.yaml
use: letters_at_common
prefix: ""
postfix: "\t"
- field: letters_at_cn
from: base.domain.domain.v1.yaml
from: domain.domain.v1.yaml
use: letters_at_cn
prefix: ""
postfix: "\t"
- field: letters_at_new
from: base.domain.domain.v1.yaml
from: domain.domain.v1.yaml
use: letters_at_new
prefix: ""
postfix: "\t"
- field: mixed_at_common
from: base.domain.domain.v1.yaml
from: domain.domain.v1.yaml
use: mixed_at_common
prefix: ""
postfix: "\t"
- field: mixed_at_cn
from: base.domain.domain.v1.yaml
from: domain.domain.v1.yaml
use: mixed_at_cn
prefix: ""
postfix: "\t"
- field: mixed_at_new
from: base.domain.domain.v1.yaml
from: domain.domain.v1.yaml
use: mixed_at_new
prefix: ""
postfix: "\t"
- field: enaccount_at_common
from: base.domain.domain.v1.yaml
from: domain.domain.v1.yaml
use: enaccount_at_common
prefix: ""
postfix: "\t"
- field: cnaccount_at_cn
from: base.domain.domain.v1.yaml
from: domain.domain.v1.yaml
use: cnaccount_at_cn
prefix: ""
postfix: "\t"
......
......@@ -5,45 +5,45 @@ version: 1.0
fields:
- field: number_with_esp
from: base.email.email.v1.yaml
from: email.email.v1.yaml
use: number_with_esp
prefix: ""
postfix: "\t"
- field: number_with_self
from: base.email.email.v1.yaml
from: email.email.v1.yaml
use: number_with_self
prefix: ""
postfix: "\t"
- field: letter_with_esp
from: base.email.email.v1.yaml
from: email.email.v1.yaml
use: letter_with_esp
prefix: ""
postfix: "\t"
- field: letter_with_self
from: base.email.email.v1.yaml
from: email.email.v1.yaml
use: letter_with_self
prefix: ""
postfix: "\t"
- field: western_with_esp
from: base.email.email.v1.yaml
from: email.email.v1.yaml
use: western_with_esp
prefix: ""
postfix: "\t"
- field: western_with_self
from: base.email.email.v1.yaml
from: email.email.v1.yaml
use: western_with_self
prefix: ""
postfix: "\t"
- field: pinyin_with_esp
from: base.email.email.v1.yaml
from: email.email.v1.yaml
use: pinyin_with_esp
prefix: ""
postfix: "\t"
- field: pinyin_with_self
from: base.email.email.v1.yaml
from: email.email.v1.yaml
use: pinyin_with_self
prefix: ""
postfix: "\t"
\ No newline at end of file
......@@ -4,5 +4,5 @@ author: automated export
version: "1.0"
fields:
- field: id
from: base.name.cnaccount.v1.yaml
from: name.cnaccount.v1.yaml
use: common
\ No newline at end of file
......@@ -4,141 +4,141 @@ author: zentao
version: "1.0"
fields:
- field: cnfull
from: base.country.v1.yaml
from: country.v1.yaml
use: cnfull
prefix: ""
postfix: "\t"
- field: cnshort
from: base.country.v1.yaml
from: country.v1.yaml
use: cnshort
prefix: ""
postfix: "\t"
- field: enfull
from: base.country.v1.yaml
from: country.v1.yaml
use: enfull
prefix: ""
postfix: "\t"
- field: enshort
from: base.country.v1.yaml
from: country.v1.yaml
use: enshort
prefix: ""
postfix: "\t"
- field: areacode
from: base.country.v1.yaml
from: country.v1.yaml
use: areacode
prefix: ""
postfix: "\t"
# 亚洲国家
- field: asia_cnfull
from: base.country.v1.yaml
from: country.v1.yaml
use: asia_cnfull
prefix: ""
postfix: "\t"
- field: asia_cnshort
from: base.country.v1.yaml
from: country.v1.yaml
use: asia_cnshort
prefix: ""
postfix: "\t"
- field: asia_enfull
from: base.country.v1.yaml
from: country.v1.yaml
use: asia_enfull
prefix: ""
postfix: "\t"
- field: asia_areacode
from: base.country.v1.yaml
from: country.v1.yaml
use: asia_areacode
prefix: ""
postfix: "\t"
# 欧洲国家
- field: europe_cnfull
from: base.country.v1.yaml
from: country.v1.yaml
use: europe_cnfull
prefix: ""
postfix: "\t"
- field: europe_cnshort
from: base.country.v1.yaml
from: country.v1.yaml
use: europe_cnshort
prefix: ""
postfix: "\t"
- field: europe_enfull
from: base.country.v1.yaml
from: country.v1.yaml
use: europe_enfull
prefix: ""
postfix: "\t"
- field: europe_areacode
from: base.country.v1.yaml
from: country.v1.yaml
use: europe_areacode
prefix: ""
postfix: "\t"
# 北美国家
- field: north_america_cnfull
from: base.country.v1.yaml
from: country.v1.yaml
use: north_america_cnfull
prefix: ""
postfix: "\t"
- field: north_america_cnshort
from: base.country.v1.yaml
from: country.v1.yaml
use: north_america_cnshort
prefix: ""
postfix: "\t"
- field: north_america_enfull
from: base.country.v1.yaml
from: country.v1.yaml
use: north_america_enfull
prefix: ""
postfix: "\t"
- field: north_america_areacode
from: base.country.v1.yaml
from: country.v1.yaml
use: north_america_areacode
prefix: ""
postfix: "\t"
# 南美国家
- field: south_america_cnfull
from: base.country.v1.yaml
from: country.v1.yaml
use: south_america_cnfull
prefix: ""
postfix: "\t"
- field: south_america_cnshort
from: base.country.v1.yaml
from: country.v1.yaml
use: south_america_cnshort
prefix: ""
postfix: "\t"
- field: south_america_enfull
from: base.country.v1.yaml
from: country.v1.yaml
use: south_america_enfull
prefix: ""
postfix: "\t"
- field: south_america_areacode
from: base.country.v1.yaml
from: country.v1.yaml
use: south_america_areacode
prefix: ""
postfix: "\t"
# 大洋洲国家
- field: oceania_cnfull
from: base.country.v1.yaml
from: country.v1.yaml
use: oceania_cnfull
prefix: ""
postfix: "\t"
- field: oceania_cnshort
from: base.country.v1.yaml
from: country.v1.yaml
use: oceania_cnshort
prefix: ""
postfix: "\t"
- field: oceania_enfull
from: base.country.v1.yaml
from: country.v1.yaml
use: oceania_enfull
prefix: ""
postfix: "\t"
- field: oceania_areacode
from: base.country.v1.yaml
from: country.v1.yaml
use: oceania_areacode
prefix: ""
postfix: "\t"
\ No newline at end of file
......@@ -4,37 +4,37 @@ author: zentao
version: "1.0"
fields:
- field: monthday_common
from: base.time.monthday.v1.yaml
from: time.monthday.v1.yaml
use: common
prefix: ""
postfix: "\t"
- field: monthday_with_line
from: base.time.monthday.v1.yaml
from: time.monthday.v1.yaml
use: with_line
prefix: ""
postfix: "\t"
- field: monthday_chinese
from: base.time.monthday.v1.yaml
from: time.monthday.v1.yaml
use: chinese
prefix: ""
postfix: "\t"
- field: date_common
from: base.time.date.v1.yaml
from: time.date.v1.yaml
use: common
prefix: ""
postfix: "\t"
- field: date_with_line
from: base.time.date.v1.yaml
from: time.date.v1.yaml
use: with_line
prefix: ""
postfix: "\t"
- field: date_chinese
from: base.time.date.v1.yaml
from: time.date.v1.yaml
use: chinese
prefix: ""
postfix: "\t"
\ No newline at end of file
......@@ -79,6 +79,7 @@ type FieldSimple struct {
Format string `yaml:"format"`
Rand bool `yaml:"rand"`
Type string `yaml:"type"`
Refer string `yaml:"refer"`
LoopStart int `yaml:"-"`
LoopEnd int `yaml:"-"`
......@@ -116,8 +117,8 @@ type DefExport struct {
}
type DefFieldExport struct {
Field string `yaml:"field"`
Prefix string `yaml:"prefix"`
Postfix string `yaml:"postfix"`
Prefix string `yaml:"prefix,omitempty"`
Postfix string `yaml:"postfix,omitempty"`
Select string `yaml:"select,omitempty"`
Where string `yaml:"where,omitempty"`
......@@ -133,7 +134,7 @@ type Article struct {
}
type ArticleField struct {
Field string `yaml:"field"`
Range string `yaml:"range"`
Range string `yaml:"range,omitempty"`
Prefix string `yaml:"prefix,omitempty"`
Postfix string `yaml:"postfix,omitempty"`
}
......
......@@ -68,10 +68,6 @@ func convertSentYaml(filePath, dist string) (yamlPaths []string) {
prefix += sect.Val
if prefix != "" && sectIndex == len(sent) - 1 { // last section
//if strings.LastIndex(prefix, "\n\n") == len(prefix) - 2 {
// prefix = prefix[:len(prefix) - 1]
//}
field := model.DefFieldExport{Field: fieldSeq, Prefix: prefix}
conf.XFields = append(conf.XFields, field)
prefix = ""
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册