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
b3bc1139
Commit
b3bc1139
authored
Oct 10, 2019
by
sikang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
udpate script
parent
23b5eb97
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
17 deletions
+3
-17
script/print/create_desc.py
+3
-17
No files found.
script/print/create_desc.py
View file @
b3bc1139
...
@@ -15,27 +15,13 @@ import sys
...
@@ -15,27 +15,13 @@ import sys
def
setAdress
(
line
):
def
setAdress
(
line
):
if
"${email}"
in
line
:
if
"${email}"
in
line
:
if
len
(
sys
.
argv
[
2
])
>
0
:
if
len
(
sys
.
argv
[
2
])
>
0
:
emails
=
sys
.
argv
[
2
]
.
split
(
"&&"
)
line
=
line
.
replace
(
"${email}"
,
sys
.
argv
[
2
])
em
=
emails
[
random
.
randint
(
0
,
len
(
emails
)
-
1
)]
line
=
line
.
replace
(
"${email}"
,
em
)
else
:
line
=
""
if
"${phone_num}"
in
line
:
if
"${phone_num}"
in
line
:
if
len
(
sys
.
argv
[
3
])
>
0
:
if
len
(
sys
.
argv
[
3
])
>
0
:
phones
=
sys
.
argv
[
3
]
.
split
(
"&&"
)
ph
=
phones
[
random
.
randint
(
0
,
len
(
phones
)
-
1
)]
line
=
line
.
replace
(
"${phone_num}"
,
sys
.
argv
[
3
])
line
=
line
.
replace
(
"${phone_num}"
,
sys
.
argv
[
3
])
else
:
line
=
""
if
"${adress}"
in
line
:
if
"${adress}"
in
line
:
if
len
(
sys
.
argv
[
4
])
>
0
:
if
len
(
sys
.
argv
[
4
])
>
0
:
address
=
sys
.
argv
[
4
]
.
split
(
"&&"
)
line
=
line
.
replace
(
"${adress}"
,
sys
.
argv
[
4
])
ad
=
address
[
random
.
randint
(
0
,
len
(
address
)
-
1
)]
line
=
line
.
replace
(
"${adress}"
,
ad
)
else
:
line
=
""
return
line
return
line
...
@@ -43,7 +29,7 @@ def create_desc(read_path, write_path):
...
@@ -43,7 +29,7 @@ def create_desc(read_path, write_path):
with
open
(
read_path
,
"r"
)
as
f
:
with
open
(
read_path
,
"r"
)
as
f
:
lines
=
f
.
readlines
()
lines
=
f
.
readlines
()
index
=
random
.
randint
(
0
,
1
7
)
+
1
index
=
random
.
randint
(
0
,
1
2
)
+
1
if
int
(
sys
.
argv
[
8
])
>
0
:
if
int
(
sys
.
argv
[
8
])
>
0
:
index
=
sys
.
argv
[
8
]
index
=
sys
.
argv
[
8
]
...
...
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