fulltext/services/store/store.py
def _paper_path(self, identifier: str, bucket: str) -> str:
        """
        Generate a base path for extraction from a particular resource.

        This should generate paths like:

        - Old-style e-print: /{volume}/arxiv/alg-geom/9204/9204001v2
        - New-style e-print: /{volume}/arxiv/1801/00123v1
        - Anything else: /{volume}/{bucket}/{identifier}

        """
        if OLD_STYLE.match(identifier):
            pre, num = identifier.split('/', 1)
            return os.path.join(self._volume, bucket, pre, num[:4], num)
        elif STANDARD.match(identifier):
            prefix = identifier.split('.', 1)[0]
            return os.path.join(self._volume, bucket, prefix, identifier)
        return os.path.join(self._volume, bucket, identifier)

        Generate a base path for extraction from a particular resource.

        This should generate paths like:

        - Old-style e-print: /{volume}/arxiv/alg-geom/9204/9204001v2
        - New-style e-print: /{volume}/arxiv/1801/00123v1
        - Anything else: /{volume}/{bucket}/{identifier}

        
Generate a base path for extraction from a particular resource.
This should generate paths like.


Generate a base path for extraction from a particular resource . This should generate paths like .
def _paper_path(self, identifier: str, bucket: str) -> str:
        if OLD_STYLE.match(identifier):
            pre, num = identifier.split('/', 1)
            return os.path.join(self._volume, bucket, pre, num[:4], num)
        elif STANDARD.match(identifier):
            prefix = identifier.split('.', 1)[0]
            return os.path.join(self._volume, bucket, prefix, identifier)
        return os.path.join(self._volume, bucket, identifier)
def _paper_path ( self , identifier : str , bucket : str ) -> str : if OLD_STYLE . match ( identifier ) : pre , num = identifier . split ( '/' , 1 ) return os . path . join ( self . _volume , bucket , pre , num [ : 4 ] , num ) elif STANDARD . match ( identifier ) : prefix = identifier . split ( '.' , 1 ) [ 0 ] return os . path . join ( self . _volume , bucket , prefix , identifier ) return os . path . join ( self . _volume , bucket , identifier )
Generate a base path for extraction from a particular resource.
Generate a base path for extraction from a particular resource .
"""
        Generate a base path for extraction from a particular resource.

        This should generate paths like:

        - Old-style e-print: /{volume}/arxiv/alg-geom/9204/9204001v2
        - New-style e-print: /{volume}/arxiv/1801/00123v1
        - Anything else: /{volume}/{bucket}/{identifier}

        """
self
identifier
str
bucket
str