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
b6315f89
Commit
b6315f89
authored
Jul 09, 2019
by
sikang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自动生成描述
parent
fe8aa22b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
65 additions
and
0 deletions
+65
-0
script/print/create_desc.py
+63
-0
script/script_help.sh
+2
-0
No files found.
script/print/create_desc.py
0 → 100644
View file @
b6315f89
#!/usr/bin/env python3
import
json
import
string
import
random
import
base64
import
glob
,
os
import
sys
# def gen_rand_str():
# rand_str = ''.join(random.choices(string.ascii_uppercase + string.ascii_lowercase, k=8))
# return rand_str + str(random.randint(0, 1000000))
def
setAdress
(
line
):
if
"${email}"
in
line
:
if
len
(
sys
.
argv
[
2
])
>
0
:
line
=
line
.
replace
(
"${email}"
,
sys
.
argv
[
2
])
else
:
line
=
""
if
"${phone_num}"
in
line
:
if
len
(
sys
.
argv
[
3
])
>
0
:
line
=
line
.
replace
(
"${phone_num}"
,
sys
.
argv
[
3
])
else
:
line
=
""
if
"${adress}"
in
line
:
if
len
(
sys
.
argv
[
4
])
>
0
:
line
=
line
.
replace
(
"${adress}"
,
sys
.
argv
[
4
])
else
:
line
=
""
return
line
def
create_desc
(
read_path
,
write_path
):
with
open
(
read_path
,
"r"
)
as
f
:
lines
=
f
.
readlines
()
search_str
=
"-@Example "
+
str
(
random
.
randint
(
0
,
18
))
+
"-"
is_target
=
False
print
(
search_str
)
print
(
sys
.
argv
[
1
])
with
open
(
write_path
,
"w"
)
as
f_w
:
for
line
in
lines
:
if
search_str
in
line
:
is_target
=
True
continue
if
is_target
and
"@End"
in
line
:
is_target
=
False
continue
if
is_target
:
line
=
line
.
replace
(
"${app_name}"
,
sys
.
argv
[
1
])
line
=
setAdress
(
line
)
if
len
(
line
)
>
0
:
f_w
.
write
(
line
)
create_desc
(
"/Users/connor/StudioProjects/WorkSpace/app_desc.txt"
,
"/Users/connor/Documents/apks/"
+
sys
.
argv
[
5
]
+
"_desc.txt"
)
script/script_help.sh
View file @
b6315f89
...
@@ -255,6 +255,8 @@ elif (($commod == '26'));then
...
@@ -255,6 +255,8 @@ elif (($commod == '26'));then
echo
"
${
corp_id
}
${
app_name
}
"
echo
"
${
corp_id
}
${
app_name
}
"
echo
"对内协议:
${
agreement_url
}
"
echo
"对内协议:
${
agreement_url
}
"
echo
"对外协议:
${
home
}
/privacy.html"
echo
"对外协议:
${
home
}
/privacy.html"
cd
print
python create_desc.py
"
${
app_name
}
"
"
${
cus_email
}
"
"
${
hot_line
}
"
"
${
cus_adress
}
"
"
${
corp_id
}
"
echo
" "
echo
" "
elif
((
$commod
==
'10000'
))
elif
((
$commod
==
'10000'
))
...
...
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