INNER CODE UNIT · Python

convert_ftp_url

kblin/ncbi-genome-download · ncbi_genome_download/core.py:547

def convert_ftp_url(url):
    """Convert FTP to HTTPS URLs."""
    return url.replace('ftp://', 'https://', 1)


def parse_checksums(checksums_string):
    """Parse a file containing checksums and filenames."""
    logger = logging.getLogger("ncbi-genome-download")
    checksums_list = []
    for line in checksums_string.split('\n'):
        try:
            # skip empty lines
            if line == '':
                continue

            checksum, filename = line.split()
            # strip leading ./
            if filename.startswith('./'):

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…