Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
易企天创
zendata
提交
22576c94
Z
zendata
项目概览
易企天创
/
zendata
8 个月 前同步成功
通知
17
Star
2
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Z
zendata
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
22576c94
编写于
9月 17, 2020
作者:
aaronchen2k2k
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
close task#7902
上级
0854444e
变更
21
隐藏空白更改
内联
并排
Showing
21 changed file
with
79 addition
and
82 deletion
+79
-82
demo/test/test-account.yaml
demo/test/test-account.yaml
+18
-18
demo/test/test-domain.yaml
demo/test/test-domain.yaml
+17
-17
demo/test/test-email.yaml
demo/test/test-email.yaml
+8
-8
demo/test/test.yaml
demo/test/test.yaml
+1
-1
demo/test/test_country.yaml
demo/test/test_country.yaml
+25
-25
demo/test/test_date.yaml
demo/test/test_date.yaml
+6
-6
src/model/definition.go
src/model/definition.go
+4
-3
src/service/article.go
src/service/article.go
+0
-4
yaml/country/v1.yaml
yaml/country/v1.yaml
+0
-0
yaml/domain/domain.v1.yaml
yaml/domain/domain.v1.yaml
+0
-0
yaml/domain/esp.v1.yaml
yaml/domain/esp.v1.yaml
+0
-0
yaml/domain/postfix.v1.yaml
yaml/domain/postfix.v1.yaml
+0
-0
yaml/email/email.v1.yaml
yaml/email/email.v1.yaml
+0
-0
yaml/name/cnaccount.v1.yaml
yaml/name/cnaccount.v1.yaml
+0
-0
yaml/name/cnreal.v1.yaml
yaml/name/cnreal.v1.yaml
+0
-0
yaml/name/enaccount.v1.yaml
yaml/name/enaccount.v1.yaml
+0
-0
yaml/name/enreal.v1.yaml
yaml/name/enreal.v1.yaml
+0
-0
yaml/name/letters.v1.yaml
yaml/name/letters.v1.yaml
+0
-0
yaml/name/numbers.v1.yaml
yaml/name/numbers.v1.yaml
+0
-0
yaml/time/date.v1.yaml
yaml/time/date.v1.yaml
+0
-0
yaml/time/monthday.v1.yaml
yaml/time/monthday.v1.yaml
+0
-0
未找到文件。
demo/test/test-account.yaml
浏览文件 @
22576c94
...
...
@@ -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
demo/test/test-domain.yaml
浏览文件 @
22576c94
...
...
@@ -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
"
...
...
demo/test/test-email.yaml
浏览文件 @
22576c94
...
...
@@ -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
demo/test/test.yaml
浏览文件 @
22576c94
...
...
@@ -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
demo/test/test_country.yaml
浏览文件 @
22576c94
...
...
@@ -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
demo/test/test_date.yaml
浏览文件 @
22576c94
...
...
@@ -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
src/model/definition.go
浏览文件 @
22576c94
...
...
@@ -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"`
}
...
...
src/service/article.go
浏览文件 @
22576c94
...
...
@@ -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
=
""
...
...
yaml/
base/
country/v1.yaml
→
yaml/country/v1.yaml
浏览文件 @
22576c94
文件已移动
yaml/
base/
domain/domain.v1.yaml
→
yaml/domain/domain.v1.yaml
浏览文件 @
22576c94
文件已移动
yaml/
base/
domain/esp.v1.yaml
→
yaml/domain/esp.v1.yaml
浏览文件 @
22576c94
文件已移动
yaml/
base/
domain/postfix.v1.yaml
→
yaml/domain/postfix.v1.yaml
浏览文件 @
22576c94
文件已移动
yaml/
base/
email/email.v1.yaml
→
yaml/email/email.v1.yaml
浏览文件 @
22576c94
文件已移动
yaml/
base/
name/cnaccount.v1.yaml
→
yaml/name/cnaccount.v1.yaml
浏览文件 @
22576c94
文件已移动
yaml/
base/
name/cnreal.v1.yaml
→
yaml/name/cnreal.v1.yaml
浏览文件 @
22576c94
文件已移动
yaml/
base/
name/enaccount.v1.yaml
→
yaml/name/enaccount.v1.yaml
浏览文件 @
22576c94
文件已移动
yaml/
base/
name/enreal.v1.yaml
→
yaml/name/enreal.v1.yaml
浏览文件 @
22576c94
文件已移动
yaml/
base/
name/letters.v1.yaml
→
yaml/name/letters.v1.yaml
浏览文件 @
22576c94
文件已移动
yaml/
base/
name/numbers.v1.yaml
→
yaml/name/numbers.v1.yaml
浏览文件 @
22576c94
文件已移动
yaml/
base/
time/date.v1.yaml
→
yaml/time/date.v1.yaml
浏览文件 @
22576c94
文件已移动
yaml/
base/
time/monthday.v1.yaml
→
yaml/time/monthday.v1.yaml
浏览文件 @
22576c94
文件已移动
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录