various updates and changes, move admin widgets into different seperate dialogs
This commit is contained in:
@@ -184,7 +184,7 @@ class ZoteroController:
|
||||
book = bib.return_data()
|
||||
return book
|
||||
|
||||
# print(zot.item_template("bookSection"))
|
||||
# # print(zot.item_template("bookSection"))
|
||||
def createBook(self, isbn):
|
||||
book = self.__get_data(isbn)
|
||||
|
||||
@@ -207,7 +207,7 @@ class ZoteroController:
|
||||
def createItem(self, item):
|
||||
resp = self.zot.create_items([item])
|
||||
if "successful" in resp.keys():
|
||||
print(resp["successful"]["0"]["key"])
|
||||
# print(resp["successful"]["0"]["key"])
|
||||
return resp["successful"]["0"]["key"]
|
||||
else:
|
||||
return None
|
||||
@@ -217,7 +217,7 @@ class ZoteroController:
|
||||
for item in items:
|
||||
if item["key"] == key:
|
||||
self.zot.delete_item(item)
|
||||
print(item)
|
||||
# print(item)
|
||||
break
|
||||
|
||||
def createHGSection(self, book: Book, data: dict):
|
||||
@@ -238,7 +238,7 @@ class ZoteroController:
|
||||
]
|
||||
chapter.creators += authors
|
||||
|
||||
print(chapter.to_dict())
|
||||
# print(chapter.to_dict())
|
||||
return self.createItem(chapter.to_dict())
|
||||
pass
|
||||
|
||||
@@ -254,7 +254,7 @@ class ZoteroController:
|
||||
# chapter.creators
|
||||
|
||||
def createJournalArticle(self, journal, article):
|
||||
print(type(article))
|
||||
# print(type(article))
|
||||
journalarticle = JournalArticle()
|
||||
journalarticle.assign(journal)
|
||||
journalarticle.itemType = "journalArticle"
|
||||
@@ -270,7 +270,7 @@ class ZoteroController:
|
||||
journalarticle.issue = article["issue"]
|
||||
journalarticle.url = article["isbn"]
|
||||
|
||||
print(journalarticle.to_dict())
|
||||
# print(journalarticle.to_dict())
|
||||
|
||||
return self.createItem(journalarticle.to_dict())
|
||||
|
||||
@@ -316,16 +316,16 @@ if __name__ == "__main__":
|
||||
# if isinstance(publishers, str):
|
||||
# publishers = [publishers]
|
||||
# for publisher in publishers:
|
||||
# print(publisher)
|
||||
# # print(publisher)
|
||||
# creator = Creator().from_string(publisher)
|
||||
# creator.creatorType = "editor"
|
||||
# authors.append(creator.__dict__)
|
||||
|
||||
# chapter.creators = authors
|
||||
# chapter.publisher = book.publisher
|
||||
# print(chapter.to_dict())
|
||||
# # print(chapter.to_dict())
|
||||
# createBookSection(chapter.to_dict())
|
||||
# get_citation("9ZXH8DDE")
|
||||
# # print()
|
||||
# print(get_books())
|
||||
# print(zot.item_creator_types("bookSection"))
|
||||
# # # print()
|
||||
# # print(get_books())
|
||||
# # print(zot.item_creator_types("bookSection"))
|
||||
|
||||
Reference in New Issue
Block a user