Exemplo n.º 1
0
    def __init__(self, path, environ):
        DAVCollection.__init__(self, path, environ)

        self.obj = self.provider.get_by_name(path)
        self._files = {}
        self._dirs = {}
        self._init_members()
Exemplo n.º 2
0
 def __init__(
     self,
     path: str,
     environ: dict,
     workspace: Workspace,
     content: Content,
     tracim_context: "WebdavTracimContext",
 ):
     DAVCollection.__init__(self, path, environ)
     self.content_container = ContentOnlyContainer(
         path,
         environ,
         provider=self.provider,
         content=content,
         label=workspace.filemanager_filename,
         workspace=workspace,
         tracim_context=tracim_context,
     )
     self.tracim_context = tracim_context
     self.content_api = ContentApi(
         current_user=tracim_context.current_user,
         session=tracim_context.dbsession,
         config=tracim_context.app_config,
         show_temporary=True,
         namespaces_filter=[ContentNamespaces.CONTENT],
     )
     self.content = content
     self.session = tracim_context.dbsession
Exemplo n.º 3
0
 def __init__(self, path, environ):
     DAVCollection.__init__(self, path, environ)
     self.abspath = self.provider.sharePath + path
     try:
         self.nlist = _dircache[self.abspath]
     except KeyError:
         self.nlist = None
Exemplo n.º 4
0
 def __init__(self, path, environ, displayInfo, memberNameList):
     DAVCollection.__init__(self, path, environ)
     if isinstance(displayInfo, basestring):
         displayInfo = { "type": displayInfo }
     assert type(displayInfo) is dict
     assert type(memberNameList) is list
     self.displayInfo = displayInfo
     self.memberNameList = memberNameList
Exemplo n.º 5
0
 def __init__(self, path, environ, displayInfo, memberNameList):
     DAVCollection.__init__(self, path, environ)
     if compat.is_basestring(displayInfo):
         displayInfo = {"type": displayInfo}
     assert type(displayInfo) is dict
     assert type(memberNameList) is list
     self.displayInfo = displayInfo
     self.memberNameList = memberNameList
Exemplo n.º 6
0
 def __init__(self, path, environ, url):
     DAVCollection.__init__(self, path, environ)
     self.url = url
     self.abspath = self.provider.sharePath + path
     try:
         self.maxpg = _dircache[self.abspath]
     except KeyError:
         self.maxpg = 0
Exemplo n.º 7
0
 def __init__(self, path, environ, genre):
     DAVCollection.__init__(self, path, environ)
     self.genre = genre
     self.abspath = self.provider.sharePath + path
     try:
         self.maxidx = _dircache[self.abspath]
     except KeyError:
         self.maxidx = 0
Exemplo n.º 8
0
    def __init__(self, environ, path):
        DAVCollection.__init__(self, '/', environ)
        self.path = path

        self.auth_token = self.environ.get('swift_auth_token')
        self.storage_url = self.environ.get('swift_storage_url')
        self.http_connection = client.http_connection(
            self.storage_url,
            insecure=self.environ.get('insecure'))
Exemplo n.º 9
0
 def __init__(self, path, environ, url):
     DAVCollection.__init__(self, path, environ)
     url = url.replace("http://www.shencomics.com",
                       "http://www.yuncomics.com")
     url = url.replace("http://blog.yuncomics.com",
                       "http://www.yuncomics.com")
     self.url = url
     self.abspath = self.provider.sharePath + path
     try:
         self.cookie, self.imgurls = _dircache[self.abspath]
     except KeyError:
         self.cookie = None
         self.imgurls = None
Exemplo n.º 10
0
 def __init__(self, path: str, environ: dict,
              tracim_context: "WebdavTracimContext"):
     DAVCollection.__init__(self, path, environ)
     self.workspace_container = WorkspaceOnlyContainer(
         path,
         environ,
         label="",
         workspace=None,
         tracim_context=tracim_context,
         provider=self.provider,
         list_orphan_workspaces=True,
     )
     self.tracim_context = tracim_context
Exemplo n.º 11
0
    def __init__(self, container, environ, prefix=None, path=None):
        self.path = path
        path = container
        if path[0] != '/':
            path = '/' + path
        if prefix:
            path += '/' + prefix
        DAVCollection.__init__(self, path, environ)
        self.name = path
        self.prefix = prefix
        self.container = container
        if self.prefix:
            self.prefix += '/'
        self.auth_token = self.environ.get('swift_auth_token')
        self.storage_url = self.environ.get('swift_storage_url')
        self.objects = {}

        self.http_connection = client.http_connection(
            self.storage_url,
            insecure=self.environ.get('insecure'))
Exemplo n.º 12
0
 def __init__(self, path, environ):
     DAVCollection.__init__(self, path, environ)
     self.genres = [
         'Action',
         'Adventure',
         'Comedy',
         'Demons',
         'Drama',
         'Ecchi',
         'Fantasy',
         'Gender Bender',
         'Harem',
         'Historical',
         'Horror',
         'Josei',
         'Magic',
         'Martial Arts',
         'Mature',
         'Mecha',
         'Military',
         'Mystery',
         'One Shot',
         'Psychological',
         'Romance',
         'School Life',
         'Sci-Fi',
         'Seinen',
         'Shoujo',
         'Shoujoai',
         'Shounen',
         'Shounenai',
         'Slice of Life',
         'Smut',
         'Sports',
         'Super Power',
         'Supernatural',
         'Tragedy',
         'Vampire',
         'Yaoi',
         'Yuri',
     ]
Exemplo n.º 13
0
 def __init__(
     self,
     label: str,
     path: str,
     environ: dict,
     workspace: Workspace,
     tracim_context: "WebdavTracimContext",
 ) -> None:
     DAVCollection.__init__(self, path, environ)
     self.workspace = workspace
     self.label = label
     self.tracim_context = tracim_context
     self.container = WorkspaceAndContentContainer(
         path=path,
         environ=environ,
         label=label,
         workspace=workspace,
         tracim_context=tracim_context,
         provider=self.provider,
         content=None,
     )
Exemplo n.º 14
0
 def __init__(self, environ):
     DAVCollection.__init__(self, "/", environ)
Exemplo n.º 15
0
 def __init__(self, path, environ, pname):
     DAVCollection.__init__(self, path, environ)
     self.pname = pname
Exemplo n.º 16
0
 def __init__(self, path, environ, baseurl):
     DAVCollection.__init__(self, path, environ)
     self.baseurl = baseurl
Exemplo n.º 17
0
 def __init__(self, path, environ, url):
     DAVCollection.__init__(self, path, environ)
     self.url = url
Exemplo n.º 18
0
 def __init__(self, path, environ, coll):
     DAVCollection.__init__(self, path, environ)
     self.conn = self.provider.conn
     self.coll = coll
Exemplo n.º 19
0
 def __init__(self, path, environ):
     DAVCollection.__init__(self, path, environ)
     self.items = ['#']
     self.items.append(map(chr, range(ord('A'), ord('Z') + 1)))
Exemplo n.º 20
0
 def __init__(self, path, environ, catType):
     DAVCollection.__init__(self, path, environ)
     self.catType = catType
Exemplo n.º 21
0
 def __init__(self, environ):
     DAVCollection.__init__(self, "/", environ)
Exemplo n.º 22
0
 def __init__(self, path, environ):
     DAVCollection.__init__(self, path, environ)
     self.conn = self.provider.conn
     self.db = self.conn[self.name]
Exemplo n.º 23
0
 def __init__(self, path, environ):
     DAVCollection.__init__(self, path, environ)
Exemplo n.º 24
0
 def __init__(self, path, environ, catType):
     DAVCollection.__init__(self, path, environ)
     self.catType = catType
Exemplo n.º 25
0
 def __init__(self, path, environ, coll):
     DAVCollection.__init__(self, path, environ)
     self.conn = self.provider.conn
     self.coll = coll
Exemplo n.º 26
0
 def __init__(self, path, environ, data):
     DAVCollection.__init__(self, path, environ)
     self.data = data
Exemplo n.º 27
0
 def __init__(self, path, environ):
     DAVCollection.__init__(self, path, environ)
Exemplo n.º 28
0
 def __init__(self, path, environ):
     DAVCollection.__init__(self, path, environ)
     self.conn = self.provider.conn
     self.db = self.conn[self.name]
Exemplo n.º 29
0
 def __init__(self, path, environ, data):
     DAVCollection.__init__(self, path, environ)
     self.data = data
Exemplo n.º 30
0
 def __init__(self, path, environ, list_type):
     DAVCollection.__init__(self, path, environ)
     self.list_type = list_type