def __init__(self, name, url): self.name = name self.url = url self.dest_path = mediabuilder.path('downloads', self.name) if self.__class__.sources is None: self.__class__.sources = Sources()
def __init__(self): self.path = mediabuilder.path('downloads', 'sources.json') if os.path.exists(self.path): self.entries = json.load(open(self.path)) else: self.entries = {}
def dest_path(self): return mediabuilder.path('static', self.name)
def __init__(self, name): self.name = name self.source_path = mediabuilder.config.COPY_TO_STATIC[name] self.dest_path = mediabuilder.path('static', name)
def setup_directories(self): self.ensure_dir_exists(mediabuilder.path('downloads')) self.ensure_dir_exists(mediabuilder.path('static'))