You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
588 B
24 lines
588 B
import files
|
|
import color
|
|
|
|
class Paper(object):
|
|
"""Paper class. The object is responsible for the integrity of its own data,
|
|
and for loading and writing it to disc.
|
|
"""
|
|
|
|
@classmethod
|
|
def from_disc(cls, name):
|
|
p = Paper(name)
|
|
self.bib_data = files.load_bibdata(self.name)
|
|
self.metadata = files.load_meta(self.name)
|
|
self.citekey = self.metadata.get('metadata', 'citekey')
|
|
self.number = self.metadata.get('metadata', 'number')
|
|
return p
|
|
|
|
def __init__(self, name):
|
|
self.name = name
|
|
|
|
|
|
|
|
|