Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
physical
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
physical
Commits
c245950f
Commit
c245950f
authored
Nov 20, 2018
by
段英荣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pyhsical add
parent
d26b85b2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
117 additions
and
0 deletions
+117
-0
celebrity_transfer.py
trans2es/utils/celebrity_transfer.py
+31
-0
diary_transfer.py
trans2es/utils/diary_transfer.py
+32
-0
group_transfer.py
trans2es/utils/group_transfer.py
+32
-0
user_transfer.py
trans2es/utils/user_transfer.py
+22
-0
No files found.
trans2es/utils/celebrity_transfer.py
0 → 100644
View file @
c245950f
import
os
import
sys
import
logging
import
traceback
class
CelebrityTransfer
(
object
):
def
__init__
(
self
):
pass
def
get_celebrity_data
(
self
,
instance
):
try
:
res
=
dict
()
res
[
"id"
]
=
instance
.
id
res
[
"is_online"
]
=
instance
.
is_online
res
[
"is_deleted"
]
=
instance
.
is_deleted
res
[
"portrait"
]
=
instance
.
portrait
res
[
"name"
]
=
instance
.
name
res
[
"description"
]
=
instance
.
description
res
[
"gender"
]
=
instance
.
gender
res
[
"city_id"
]
=
instance
.
city_id
res
[
"user_id"
]
=
instance
.
user_id
res
[
"share_num"
]
=
instance
.
share_num
res
[
"create_time"
]
=
instance
.
create_time
res
[
"update_time"
]
=
instance
.
update_time
return
res
except
:
logging
.
error
(
"catch exception,err_msg:
%
s"
%
traceback
.
format_exc
())
return
None
\ No newline at end of file
trans2es/utils/diary_transfer.py
0 → 100644
View file @
c245950f
import
os
import
sys
import
logging
import
traceback
class
DiaryTransfer
(
object
):
def
__init__
(
self
):
pass
def
get_diary_data
(
self
,
instance
):
try
:
res
=
dict
()
res
[
"id"
]
=
instance
.
id
res
[
"is_online"
]
=
instance
.
is_online
res
[
"vote_num"
]
=
instance
.
vote_num
res
[
"reply_num"
]
=
instance
.
reply_num
res
[
"name"
]
=
instance
.
name
res
[
"description"
]
=
instance
.
description
res
[
"content"
]
=
instance
.
content
res
[
"content_level"
]
=
instance
.
content_level
res
[
"user_id"
]
=
instance
.
user_id
res
[
"share_num"
]
=
instance
.
share_num
res
[
"create_time"
]
=
instance
.
create_time
res
[
"update_time"
]
=
instance
.
update_time
return
res
except
:
logging
.
error
(
"catch exception,err_msg:
%
s"
%
traceback
.
format_exc
())
return
None
\ No newline at end of file
trans2es/utils/group_transfer.py
0 → 100644
View file @
c245950f
import
os
import
sys
import
logging
import
traceback
class
GroupTransfer
(
object
):
def
__init__
(
self
):
pass
def
get_group_data
(
self
,
instance
):
try
:
res
=
dict
()
res
[
"id"
]
=
instance
.
id
res
[
"is_online"
]
=
instance
.
is_online
res
[
"is_deleted"
]
=
instance
.
is_deleted
res
[
"is_recommend"
]
=
instance
.
is_recommend
res
[
"star_id"
]
=
instance
.
star_id
res
[
"name"
]
=
instance
.
name
res
[
"description"
]
=
instance
.
description
res
[
"topic_num"
]
=
instance
.
topic_num
res
[
"creator_id"
]
=
instance
.
creator_id
res
[
"icon"
]
=
instance
.
icon
res
[
"create_time"
]
=
instance
.
create_time
res
[
"update_time"
]
=
instance
.
update_time
return
res
except
:
logging
.
error
(
"catch exception,err_msg:
%
s"
%
traceback
.
format_exc
())
return
None
\ No newline at end of file
trans2es/utils/user_transfer.py
0 → 100644
View file @
c245950f
import
os
import
sys
import
logging
import
traceback
class
UserTransfer
(
object
):
def
__init__
(
self
):
pass
def
get_user_data
(
self
,
instance
):
try
:
res
=
dict
()
res
[
"id"
]
=
instance
.
id
res
[
"icon"
]
=
instance
.
icon
res
[
"name"
]
=
instance
.
name
return
res
except
:
logging
.
error
(
"catch exception,err_msg:
%
s"
%
traceback
.
format_exc
())
return
None
\ 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