o
    =Ñ®a !  ã                   @   sˆ   d Z ddlmZ ddlmZ G dd„ deƒZG dd„ deƒZG dd	„ d	eƒZG d
d„ der/eneƒZG dd„ deƒZ	G dd„ deƒZ
dS )z&Additional simple tables defined here.é    )Ú
AsciiTable)Ú
IS_WINDOWSc                       s˜   e Zd ZdZdZdZdZdZdZdZ	dZ
dZdZdZdZdZdZdZdZdZdZdZdZdZd	ZdZdZdZdZdZd
ZdZdZ e!‡ fdd„ƒZ"‡  Z#S )Ú	UnixTablezÃDraw a table using box-drawing characters on Unix platforms. Table borders won't have any gaps between lines.

    Similar to the tables shown on PC BIOS boot messages, but not double-lined.
    z(0q(Bz(0n(Bz(0x(Bz(0t(Bz(0u(Bz(0v(Bz(0m(Bz(0j(Bz(0w(Bz(0l(Bz(0k(Bc                    s   t t| ƒj}| dd¡}|S )zNReturn a large string of the entire table ready to be printed to the terminal.z(B(0Ú )Úsuperr   ÚtableÚreplace)ÚselfZascii_tableZ	optimized©Ú	__class__© ú?usr/lib/python3.10/site-packages/terminaltables/other_tables.pyr   +   s   zUnixTable.table)$Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚCHAR_F_INNER_HORIZONTALÚCHAR_F_INNER_INTERSECTÚCHAR_F_INNER_VERTICALÚCHAR_F_OUTER_LEFT_INTERSECTÚCHAR_F_OUTER_LEFT_VERTICALÚCHAR_F_OUTER_RIGHT_INTERSECTÚCHAR_F_OUTER_RIGHT_VERTICALÚCHAR_H_INNER_HORIZONTALÚCHAR_H_INNER_INTERSECTÚCHAR_H_INNER_VERTICALÚCHAR_H_OUTER_LEFT_INTERSECTÚCHAR_H_OUTER_LEFT_VERTICALÚCHAR_H_OUTER_RIGHT_INTERSECTÚCHAR_H_OUTER_RIGHT_VERTICALÚCHAR_INNER_HORIZONTALÚCHAR_INNER_INTERSECTÚCHAR_INNER_VERTICALÚCHAR_OUTER_BOTTOM_HORIZONTALÚCHAR_OUTER_BOTTOM_INTERSECTÚCHAR_OUTER_BOTTOM_LEFTÚCHAR_OUTER_BOTTOM_RIGHTÚCHAR_OUTER_LEFT_INTERSECTÚCHAR_OUTER_LEFT_VERTICALÚCHAR_OUTER_RIGHT_INTERSECTÚCHAR_OUTER_RIGHT_VERTICALÚCHAR_OUTER_TOP_HORIZONTALÚCHAR_OUTER_TOP_INTERSECTÚCHAR_OUTER_TOP_LEFTÚCHAR_OUTER_TOP_RIGHTÚpropertyr   Ú__classcell__r   r   r
   r   r      sB    r   c                   @   ó2  e Zd ZdZd d¡Zd d¡Zd d¡Zd d¡Zd d¡Z	d d¡Z
d d¡Zd d¡Zd d¡Zd d¡Zd d¡Zd d¡Zd d¡Zd d¡Zd d¡Zd d¡Zd d¡Zd d¡Zd d¡Zd	 d¡Zd
 d¡Zd d¡Zd d¡Zd d¡Zd d¡Zd d¡Zd d¡Zd d¡Z d d¡Z!dS )ÚWindowsTablez³Draw a table using box-drawing characters on Windows platforms. This uses Code Page 437. Single-line borders.

    From: http://en.wikipedia.org/wiki/Code_page_437#Characters
    ó   ÄÚibm437ó   Åó   ³ó   Ãó   ´ó   Áó   Àó   Ùó   Âó   Úó   ¿N©"r   r   r   r   Údecoder   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r   r   r   r   r2   3   s>    



























r2   c                   @   r1   )ÚWindowsTableDoublezmDraw a table using box-drawing characters on Windows platforms. This uses Code Page 437. Double-line borders.ó   Ír4   ó   Îó   ºó   Ìó   ¹ó   Êó   Èó   ¼ó   Ëó   Éó   »Nr?   r   r   r   r   rA   X   s>    



























rA   c                   @   ó   e Zd ZdZdS )ÚSingleTableao  Cross-platform table with single-line box-drawing characters.

    :ivar iter table_data: List (empty or list of lists of strings) representing the table.
    :ivar str title: Optional title to show within the top border of the table.
    :ivar bool inner_column_border: Separates columns.
    :ivar bool inner_footing_row_border: Show a border before the last row.
    :ivar bool inner_heading_row_border: Show a border after the first row.
    :ivar bool inner_row_border: Show a border in between every row.
    :ivar bool outer_border: Show the top, left, right, and bottom border.
    :ivar dict justify_columns: Horizontal justification. Keys are column indexes (int). Values are right/left/center.
    :ivar int padding_left: Number of spaces to pad on the left side of every cell.
    :ivar int padding_right: Number of spaces to pad on the right side of every cell.
    N©r   r   r   r   r   r   r   r   rN   z   ó    rN   c                   @   rM   )ÚDoubleTableaž  Cross-platform table with box-drawing characters. On Windows it's double borders, on Linux/OSX it's unicode.

    :ivar iter table_data: List (empty or list of lists of strings) representing the table.
    :ivar str title: Optional title to show within the top border of the table.
    :ivar bool inner_column_border: Separates columns.
    :ivar bool inner_footing_row_border: Show a border before the last row.
    :ivar bool inner_heading_row_border: Show a border after the first row.
    :ivar bool inner_row_border: Show a border in between every row.
    :ivar bool outer_border: Show the top, left, right, and bottom border.
    :ivar dict justify_columns: Horizontal justification. Keys are column indexes (int). Values are right/left/center.
    :ivar int padding_left: Number of spaces to pad on the left side of every cell.
    :ivar int padding_right: Number of spaces to pad on the right side of every cell.
    NrO   r   r   r   r   rQ   Œ   rP   rQ   c                       s    e Zd ZdZ‡ fdd„Z‡  ZS )ÚPorcelainTablezòAn AsciiTable stripped to a minimum.

    Meant to be machine passable and roughly follow format set by git --porcelain option (hence the name).

    :ivar iter table_data: List (empty or list of lists of strings) representing the table.
    c                    s&   t t| ƒ |¡ d| _d| _d| _dS )zwConstructor.

        :param iter table_data: List (empty or list of lists of strings) representing the table.
        FN)r   rR   Ú__init__Zinner_footing_row_borderZinner_heading_row_borderZouter_border)r	   Z
table_datar
   r   r   rS   ¦   s   
zPorcelainTable.__init__)r   r   r   r   rS   r0   r   r   r
   r   rR   ž   s    rR   N)r   Zterminaltables.ascii_tabler   Zterminaltables.terminal_ior   r   r2   rA   rN   rQ   rR   r   r   r   r   Ú<module>   s    ,%"