mirror of
https://github.com/GAM-team/GAM.git
synced 2026-06-28 09:51:36 +00:00
Improved commands to display drive file comments.
This commit is contained in:
@@ -6362,15 +6362,15 @@ gam print ownership <DriveFileID>|(drivefilename <DriveFileName>) [todrive <ToDr
|
||||
author.photolink
|
||||
|
||||
<CommentsRepliesSubfieldName> ::=
|
||||
replies.action|
|
||||
replies.author|
|
||||
replies.author.<CommentsAuthorSubfieldName>|
|
||||
replies.content|
|
||||
replies.createddate|createdtime|
|
||||
replies.deleted|
|
||||
replies.htmlcontent|
|
||||
replies.id|
|
||||
replies.modifieddate|modifiedtime
|
||||
reply.action|
|
||||
reply.author|
|
||||
reply.author.<CommentsAuthorSubfieldName>|
|
||||
reply.content|
|
||||
reply.createddate|createdtime|
|
||||
reply.deleted|
|
||||
reply.htmlcontent|
|
||||
reply.id|
|
||||
reply.modifieddate|modifiedtime
|
||||
|
||||
<CommentsFieldName> ::=
|
||||
action|
|
||||
@@ -6384,7 +6384,7 @@ gam print ownership <DriveFileID>|(drivefilename <DriveFileName>) [todrive <ToDr
|
||||
id|
|
||||
modifieddate|modifiedtime|
|
||||
quotedfilecontent|
|
||||
replies|
|
||||
reply|replies|
|
||||
resolved
|
||||
<CommentsFieldNameList> ::= "<CommentsFieldName>(,<CommentsFieldName>)*"
|
||||
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
Merged GAM-Team version
|
||||
|
||||
6.72.01
|
||||
|
||||
Improved commands to display drive file comments.
|
||||
|
||||
6.72.00
|
||||
|
||||
Added commands to display drive file comments.
|
||||
|
||||
@@ -53936,6 +53936,7 @@ FILECOMMENTS_FIELDS_CHOICE_MAP = {
|
||||
'modifieddate': 'modifiedTime',
|
||||
'modifiedtime': 'modifiedTime',
|
||||
'quotedfilecontent': 'quotedFileContent',
|
||||
'reply': 'replies',
|
||||
'replies': 'replies',
|
||||
'resolved': 'resolved',
|
||||
}
|
||||
@@ -53963,6 +53964,7 @@ FILECOMMENTS_REPLIES_SUBFIELDS_CHOICE_MAP = {
|
||||
|
||||
FILECOMMENTS_SUBFIELDS_CHOICE_MAP = {
|
||||
'author': FILECOMMENTS_AUTHOR_SUBFIELDS_CHOICE_MAP,
|
||||
'reply': FILECOMMENTS_REPLIES_SUBFIELDS_CHOICE_MAP,
|
||||
'replies': FILECOMMENTS_REPLIES_SUBFIELDS_CHOICE_MAP,
|
||||
}
|
||||
|
||||
@@ -54027,15 +54029,19 @@ def _showComment(comment, stripPhotoLinks, timeObjects, i=0, count=0, FJQC=None)
|
||||
# (addcsvdata <FieldName> <String>)*
|
||||
# [formatjson [quotechar <Character>]]
|
||||
def printShowFileComments(users):
|
||||
def _printComment(comment, commentId, baserow):
|
||||
def _printComment(comment, commentId, replyId, baserow):
|
||||
row = flattenJSON(comment, flattened=baserow.copy(), timeObjects=timeObjects)
|
||||
row['commentId'] = commentId
|
||||
row['replyId'] = replyId
|
||||
if not FJQC.formatJSON:
|
||||
csvPF.WriteRowTitles(row)
|
||||
elif csvPF.CheckRowTitles(row):
|
||||
row = baserow.copy()
|
||||
row['commentId'] = commentId
|
||||
comment['id'] = commentId
|
||||
row['replyId'] = replyId
|
||||
if replyId:
|
||||
comment['reply']['id'] = replyId
|
||||
row['JSON'] = json.dumps(cleanJSON(comment, timeObjects=timeObjects),
|
||||
ensure_ascii=False, sort_keys=True)
|
||||
csvPF.WriteRowNoFilter(row)
|
||||
@@ -54146,12 +54152,13 @@ def printShowFileComments(users):
|
||||
commentId = comment.pop('id')
|
||||
replies = comment.pop('replies')
|
||||
if not replies:
|
||||
_printComment(comment, commentId, baserow)
|
||||
_printComment(comment, commentId, '', baserow)
|
||||
else:
|
||||
for reply in replies:
|
||||
replyId = reply.pop('id')
|
||||
baserow['replyId'] = replyId
|
||||
comment['reply'] = reply
|
||||
baserow['replyId'] = reply['id']
|
||||
_printComment(comment, commentId, baserow)
|
||||
_printComment(comment, commentId, replyId, baserow)
|
||||
Ind.Decrement()
|
||||
if csvPF:
|
||||
csvPF.SetIndexedTitles(FILECOMMENTS_INDEXED_TITLES)
|
||||
|
||||
Reference in New Issue
Block a user