Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit80060b6

Browse files
committed
chore: wip
1 parente6fc4b5 commit80060b6

File tree

8 files changed

+365
-290
lines changed

8 files changed

+365
-290
lines changed

‎lib/groupher_server/cms/delegates/Seeds/categories.ex‎

Lines changed: 33 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,52 +2,59 @@ defmodule GroupherServer.CMS.Delegate.Seeds.Categories do
22
@doc"""
33
default categories seeds for general community
44
"""
5-
defget(:default)do
5+
defget()do
66
[
77
%{
8-
title:"pl",
8+
title:"编程语言",
99
raw:"pl",
1010
index:0
1111
},
1212
%{
13-
title:"frontend",
14-
raw:"frontend",
15-
index:3
13+
title:"框架 & 库",
14+
raw:"framework",
15+
index:1
1616
},
1717
%{
18-
title:"backend",
19-
raw:"backend",
20-
index:6
18+
title:"数据库",
19+
raw:"database",
20+
index:2
2121
},
2222
%{
23-
title:"mobile",
24-
raw:"mobile",
25-
index:9
23+
title:"devops",
24+
raw:"devops",
25+
index:3
2626
},
2727
%{
28-
title:"ai",
29-
raw:"ai",
30-
index:12
28+
title:"开发工具",
29+
raw:"tools",
30+
index:4
31+
},
32+
%{
33+
title:"城市",
34+
raw:"city",
35+
index:5
3136
},
3237
%{
33-
title:"ui",
34-
raw:"ui",
35-
index:15
38+
title:"人工智能",
39+
raw:"ai",
40+
index:6
3641
},
3742
%{
38-
title:"blockchain",
39-
raw:"blockchain",
40-
index:18
43+
title:"作品",
44+
raw:"works",
45+
index:7
4146
},
4247
%{
43-
title:"city",
44-
raw:"city",
45-
index:21
48+
# blackhole, Feedback
49+
title:"站务",
50+
raw:"feedback",
51+
index:8
4652
},
4753
%{
48-
title:"other",
49-
raw:"other",
50-
index:24
54+
# Makers, Adwall, Outwork
55+
title:"其他",
56+
raw:"others",
57+
index:9
5158
}
5259
]
5360
end

‎lib/groupher_server/cms/delegates/Seeds/communities.ex‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ defmodule GroupherServer.CMS.Delegate.Seeds.Communities do
123123
end
124124

125125
defget(:devops)do
126-
["git","docker","kubernetes","shell"]
126+
# gcp -> google-cloud-platform
127+
# search google: devops tools
128+
["git","docker","kubernetes","jenkins","puppet","aws","azure","aliyun","gcp"]
127129
end
128130
end
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
defmoduleGroupherServer.CMS.Delegate.Seeds.Helperdo
2+
@moduledocfalse
3+
4+
aliasGroupherServer.CMS
5+
aliasCMS.Delegate.SeedsConfig
6+
aliasCMS.Model.Community
7+
8+
aliasHelper.ORM
9+
10+
definsert_community(bot,raw,type)do
11+
type=Atom.to_string(type)
12+
ext=ifEnum.member?(SeedsConfig.svg_icons(),raw),do:"svg",else:"png"
13+
14+
args=%{
15+
title:SeedsConfig.trans(raw),
16+
aka:raw,
17+
desc:"#{raw} is awesome!",
18+
logo:"#{@oss_endpoint}/icons/#{type}/#{raw}.#{ext}",
19+
raw:raw,
20+
user_id:bot.id
21+
}
22+
23+
ORM.create(Community,args)
24+
end
25+
end

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp