mirror of https://gitlab.com/bashrc2/epicyon
Indentation
parent
88861ad69d
commit
d8eb8ad375
26
bookmarks.py
26
bookmarks.py
|
@ -65,8 +65,8 @@ def undoBookmarksCollectionEntry(baseDir: str,postFilename: str,objectUrl: str,
|
||||||
if bookmarkItem['actor']==actor:
|
if bookmarkItem['actor']==actor:
|
||||||
if debug:
|
if debug:
|
||||||
print('DEBUG: bookmark was removed for '+actor)
|
print('DEBUG: bookmark was removed for '+actor)
|
||||||
postJsonObject['object']['bookmarks']['items'].remove(bookmarkItem)
|
postJsonObject['object']['bookmarks']['items'].remove(bookmarkItem)
|
||||||
itemFound=True
|
itemFound=True
|
||||||
break
|
break
|
||||||
|
|
||||||
if not itemFound:
|
if not itemFound:
|
||||||
|
@ -153,17 +153,17 @@ def updateBookmarksCollection(baseDir: str,postFilename: str, \
|
||||||
if not postJsonObject['object'].get('bookmarks'):
|
if not postJsonObject['object'].get('bookmarks'):
|
||||||
if debug:
|
if debug:
|
||||||
print('DEBUG: Adding initial bookmarks to '+objectUrl)
|
print('DEBUG: Adding initial bookmarks to '+objectUrl)
|
||||||
bookmarksJson = {
|
bookmarksJson = {
|
||||||
"@context": "https://www.w3.org/ns/activitystreams",
|
"@context": "https://www.w3.org/ns/activitystreams",
|
||||||
'id': objectUrl,
|
'id': objectUrl,
|
||||||
'type': 'Collection',
|
'type': 'Collection',
|
||||||
"totalItems": 1,
|
"totalItems": 1,
|
||||||
'items': [{
|
'items': [{
|
||||||
'type': 'Bookmark',
|
'type': 'Bookmark',
|
||||||
'actor': actor
|
'actor': actor
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
postJsonObject['object']['bookmarks']=bookmarksJson
|
postJsonObject['object']['bookmarks']=bookmarksJson
|
||||||
else:
|
else:
|
||||||
if not postJsonObject['object']['bookmarks'].get('items'):
|
if not postJsonObject['object']['bookmarks'].get('items'):
|
||||||
postJsonObject['object']['bookmarks']['items']=[]
|
postJsonObject['object']['bookmarks']['items']=[]
|
||||||
|
|
Loading…
Reference in New Issue