literature module¶
Class frameworks for: Text, Book, Chapter, Article, Creator, Citation.
-
class
literature.
Article
(db_file, key='?', publication_year='?', title='?', journal='?', volume='?', edition='?', pages='?', doi='?', references=[], referals=[], creators=[{'surname': '?', 'initial': '?', 'role': '?'}])¶ Bases:
literature.Text
-
save
()¶ Saves article to SQLite database.
-
-
class
literature.
Book
(db_file, key='?', publication_year='?', title='?', publisher='?', location='?', number_of_pages='?', doi='?', isbn='?', references=[], referals=[], creators=[{'surname': '?', 'initial': '?', 'role': '?'}])¶ Bases:
literature.Text
-
save
()¶ Saves Book to SQLite database: to ‘texts’ and ‘books’ tables.
-
-
class
literature.
Chapter
(db_file, key='?', publication_year='?', title='?', publisher='?', location='?', pages='?', doi='?', references=[], referals=[], creators=[{'surname': '?', 'initial': '?', 'role': '?'}], book_key='?', book_title='?', book=None, book_creators=[{'surname': '?', 'initial': '?', 'role': '?'}])¶ Bases:
literature.Text
-
remove
(remove_book=True)¶ Removes chapter and (by default) book from SQLite database.
Parameters: remove_book (Boolean) – if True, also removes book containing chapter.
-
save
()¶ Saves chapter to SQLite database: to ‘texts’ and ‘chapters’ tables.
-
-
class
literature.
Citation
(db_file, citing, cited)¶ Bases:
object
-
remove
()¶ Removes citation from SQLite database.
-
save
()¶ Saves citation to SQLite database.
-
-
class
literature.
Creator
(db_file, surname='?', initial='?')¶ Bases:
object
-
remove
()¶
-
save
()¶ Save creator to SQLite database.
-
-
class
literature.
Text
(db_file, key='?', publication_year='?', title='?', text_type='?', doi='?', references=[], referals=[], creators=[{'surname': '?', 'initial': '?', 'role': '?'}])¶ Bases:
object
A Text has a ‘key’ and a ‘type’.
-
remove
(all_but=0)¶ Removes Text from SQLite database.
-
save
()¶ Saves Text to SQLite database.
-
text_types
= ('book', 'chapter', 'article')¶
-