コード例 #1
0
def _parseTable(table: PageElement):

    print('table =======>', table)
    tb = dict({
        "table": table.get('name', ''),
        "numRows": table.get('numrows', ''),
        #"remarks": table.get('remarks', '')
    })

    cols = table.findAllNext('column')

    def _parseCol(col: PageElement):
        col_dict = {
            "col_name": col.get('name', 'unknown name'),
            "col_remarks": col.get('remarks', ''),
            "autoUpdated": col.get('autoupdated', ''),
            "nullable": col.get('nullable', ''),
        }
        return col_dict

    columns = list(map(_parseCol, cols))
    cols = {"columns": list(columns)}
    tab = {"tb": tb}

    return {**tab, **cols}
コード例 #2
0
 def _parseCol(col: PageElement):
     col_dict = {
         "col_name": col.get('name', 'unknown name'),
         "col_remarks": col.get('remarks', ''),
         "autoUpdated": col.get('autoupdated', ''),
         "nullable": col.get('nullable', ''),
     }
     return col_dict
コード例 #3
0
ファイル: docset_gen.py プロジェクト: youtux/pebble-dash
def is_declaration(element: bs4.PageElement) -> bool:
    return (is_tag(element)
        and element.name == 'div' and 'memitem' in element.get('class', ())
    )
コード例 #4
0
ファイル: docset_gen.py プロジェクト: youtux/pebble-dash
def is_group_header(element: bs4.PageElement) -> bool:
    return is_tag(element) and 'groupheader' in element.get('class', ())