extractor/fulltext/fulltext.py
def sorted_files(globber: str):
    """
    Give a globbing expression of files to find. They will be sorted upon
    return.  This function is most useful when sorting does not provide
    numerical order,

    e.g.:
        9 -> 12 returned as 10 11 12 9 by string sort

    In this case use num_sort=True, and it will be sorted by numbers in the
    string, then by the string itself.

    Parameters
    ----------
    globber : str
        Expression on which to search for files (bash glob expression)


    """
    files = glob.glob(globber)
    files.sort()

    allfiles = []

    for fn in files:
        nums = re.findall(r'\d+', fn)
        data = [int(n) for n in nums] + [fn]
        allfiles.append(data)

    allfiles = sorted(allfiles)
    return [f[-1] for f in allfiles]

    Give a globbing expression of files to find. They will be sorted upon
    return.  This function is most useful when sorting does not provide
    numerical order,

    e.g.:
        9 -> 12 returned as 10 11 12 9 by string sort

    In this case use num_sort=True, and it will be sorted by numbers in the
    string, then by the string itself.

    Parameters
    ----------
    globber : str
        Expression on which to search for files (bash glob expression)


    
Give a globbing expression of files to find. They will be sorted upon
return.  This function is most useful when sorting does not provide
numerical order.



In this case use num_sort=True, and it will be sorted by numbers in the
string, then by the string itself.

Parameters

globber : str
Expression on which to search for files (bash glob expression)
Give a globbing expression of files to find . They will be sorted upon return . This function is most useful when sorting does not provide numerical order . In this case use num_sort = True and it will be sorted by numbers in the string then by the string itself . Parameters globber : str Expression on which to search for files ( bash glob expression )
def sorted_files(globber: str):
    files = glob.glob(globber)
    files.sort()
    allfiles = []
    for fn in files:
        nums = re.findall(r'\d+', fn)
        data = [int(n) for n in nums] + [fn]
        allfiles.append(data)
    allfiles = sorted(allfiles)
    return [f[-1] for f in allfiles]
def sorted_files ( globber : str ) : files = glob . glob ( globber ) files . sort ( ) allfiles = [ ] for fn in files : nums = re . findall ( r'\d+' , fn ) data = [ int ( n ) for n in nums ] + [ fn ] allfiles . append ( data ) allfiles = sorted ( allfiles ) return [ f [ - 1 ] for f in allfiles ]
Give a globbing expression of files to find.
Give a globbing expression of files to find .
"""
    Give a globbing expression of files to find. They will be sorted upon
    return.  This function is most useful when sorting does not provide
    numerical order,

    e.g.:
        9 -> 12 returned as 10 11 12 9 by string sort

    In this case use num_sort=True, and it will be sorted by numbers in the
    string, then by the string itself.

    Parameters
    ----------
    globber : str
        Expression on which to search for files (bash glob expression)


    """
globber
str