simple_site_crawler/utils.py
def render_children(children, prefix='│   ├── ', last_item_prefix='│   └── '):
    """
    Simple helper for rendering element children

    :param children: children container
    :type children: iterable object
    :param prefix: string that will prefix the child element
    :type prefix: str
    :param last_item_prefix: string that will prefix the last child elemment
    :return: rendered children string
    :rtype: str
    """
    s = ''

    for item in children[:-1]:
        s += '{}{}\n'.format(prefix, item)

    s += '{}{}'.format(last_item_prefix, children[-1])

    return s

    Simple helper for rendering element children

    :param children: children container
    :type children: iterable object
    :param prefix: string that will prefix the child element
    :type prefix: str
    :param last_item_prefix: string that will prefix the last child elemment
    :return: rendered children string
    :rtype: str
    
Simple helper for rendering element children
Simple helper for rendering element children
def render_children(children, prefix='│   ├── ', last_item_prefix='│   └── '):
    s = ''
    for item in children[:-1]:
        s += '{}{}\n'.format(prefix, item)
    s += '{}{}'.format(last_item_prefix, children[-1])
    return s
def render_children ( children , prefix = '│   ├── ', last_i t m_prefix='│   └─ ─  '): s = '' for item in children [ : - 1 ] : s += '{}{}\n' . format ( prefix , item ) s += '{}{}' . format ( last_item_prefix , children [ - 1 ] ) return s
Simple helper for rendering element children
Simple helper for rendering element children
"""
    Simple helper for rendering element children

    :param children: children container
    :type children: iterable object
    :param prefix: string that will prefix the child element
    :type prefix: str
    :param last_item_prefix: string that will prefix the last child elemment
    :return: rendered children string
    :rtype: str
    """
rendered children string
rendered children string
str
children
None
prefix
string that will prefix the child element
string that will prefix the child element
last_item_prefix
string that will prefix the last child elemment
string that will prefix the last child elemment