Ejemplo n.º 1
0
 def manifest_path(self):
     """
     Get the relative URL path to the manifest.
     :return: The path component of the URL.
     :rtype: str
     """
     return join(self.alias[0], self.repo_id, MANIFEST_FILE_NAME)
Ejemplo n.º 2
0
 def link_unit(self, units):
     # Add the URL to each unit.
     unit, relative_path = FilePublisher.link_unit(self, units)
     if relative_path:
         url = join(self.base_url, self.alias[0], relative_path)
         unit['_download'] = dict(url=url)
     return unit, relative_path
Ejemplo n.º 3
0
 def manifest_path(self):
     """
     Get the relative URL path to the manifest.
     :return: The path component of the URL.
     :rtype: str
     """
     return join(self.alias[0], self.repo_id, MANIFEST_FILE_NAME)
Ejemplo n.º 4
0
 def link(self, units):
     # Add the URL to each unit.
     links = FilePublisher.link(self, units)
     for unit, relative_path in links:
         url = join(self.base_url, self.alias[0], relative_path)
         unit['_download'] = dict(url=url)
     return links
Ejemplo n.º 5
0
 def link_unit(self, units):
     # Add the URL to each unit.
     unit, relative_path = FilePublisher.link_unit(self, units)
     if relative_path:
         url = join(self.base_url, self.alias[0], relative_path)
         unit['_download'] = dict(url=url)
     return unit, relative_path