Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lib_base
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sikang
lib_base
Commits
4bf95d6a
Commit
4bf95d6a
authored
Oct 18, 2019
by
sikang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update script
parent
76e36b7d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
19 deletions
+16
-19
python/func.py
+14
-6
python/main.py
+2
-2
python/utils.py
+0
-11
No files found.
python/func.py
View file @
4bf95d6a
# -*-coding:utf-8-*-
from
utils
import
Utils
from
tools.screen_maker
import
ScreenMaker
import
random
import
sys
...
...
@@ -15,8 +14,8 @@ import chardet
class
Function
:
# 随机生成包名
@staticmethod
def
new_appid
(
app_name
):
app_name
=
app_name
.
replace
(
" "
,
""
)
.
lower
()
def
new_appid
(
config
):
app_name
=
config
[
'app_name'
]
.
replace
(
" "
,
""
)
.
lower
()
start_name
=
[
"com"
,
"cn"
,
"id"
,
"app"
,
"host"
,
"in"
]
middle_name
=
[
"android"
,
"main"
,
"home"
,
"base"
,
"play"
,
"release"
,
"full"
,
"kredit"
,
"cepat"
,
"saku"
,
"wallet"
,
"coin"
,
"loan"
,
"flash"
,
"pjnm"
,
"indo"
,
"lib"
]
...
...
@@ -32,7 +31,16 @@ class Function:
random_str
=
''
.
join
(
random
.
sample
(
"abcdefghijklmnopqrstuvwxyz"
,
random
.
randint
(
4
,
8
)))
pkg_name
+=
"."
+
random_str
return
pkg_name
version_code
=
str
(
int
(
config
[
'version_code'
])
+
1
)
version_name
=
"#
%
s#"
%
version_code
.
replace
(
""
,
"."
)
version_name
=
version_name
.
replace
(
"#."
,
""
)
.
replace
(
".#"
,
""
)
lines
=
{
"app_id"
:
pkg_name
,
"version_code"
:
version_code
,
"version_name"
:
version_name
}
Function
.
update_properties
(
config
,
lines
)
# 加载shell变量
@staticmethod
...
...
@@ -43,8 +51,8 @@ class Function:
config
=
{}
for
line
in
lines
:
if
"="
in
line
:
key
=
Utils
.
clearStr
(
line
.
split
(
"="
)[
0
],
[
"
\"
"
,
"
\'
"
,
"
\n
"
]
)
value
=
Utils
.
clearStr
(
line
.
split
(
"="
)[
1
],
[
"
\"
"
,
"
\'
"
,
"
\n
"
]
)
key
=
line
.
split
(
"="
)[
0
]
.
replace
(
"
\"
"
,
""
)
.
replace
(
"
\'
"
,
""
)
.
replace
(
"
\n
"
,
""
)
value
=
line
.
split
(
"="
)[
1
]
.
replace
(
"
\"
"
,
""
)
.
replace
(
"
\'
"
,
""
)
.
replace
(
"
\n
"
,
""
)
config
[
key
]
=
value
return
config
...
...
python/main.py
View file @
4bf95d6a
...
...
@@ -36,8 +36,8 @@ if command == 1:
Shell
.
build_release
()
elif
command
==
2
:
app_name
=
Function
.
new_appid
(
config
[
'app_name'
]
)
print
(
app_name
)
Function
.
new_appid
(
config
)
elif
command
==
3
:
Function
.
new_keystore
(
config
)
...
...
python/utils.py
deleted
100644 → 0
View file @
76e36b7d
# -*-coding:utf-8-*-
import
string
import
os
class
Utils
:
@staticmethod
def
clearStr
(
value
,
targets
):
for
target
in
targets
:
value
=
value
.
replace
(
target
,
""
)
return
value
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment