Skip to content

Instantly share code, notes, and snippets.

@braindevices
Last active August 5, 2017 17:40
Show Gist options
  • Save braindevices/810ec1c7ba27abae76e3bb200886b49f to your computer and use it in GitHub Desktop.
Save braindevices/810ec1c7ba27abae76e3bb200886b49f to your computer and use it in GitHub Desktop.

Revisions

  1. braindevices revised this gist Aug 5, 2017. 1 changed file with 5 additions and 6 deletions.
    11 changes: 5 additions & 6 deletions test_markdown.md
    Original file line number Diff line number Diff line change
    @@ -14,29 +14,28 @@
    | 5812 | 6950 | 0 |

    `>>> print tabulate(table, headers, tablefmt="pipe")`
    align to right and left

    | item | qty |
    |:-------|------:|
    | spam | 42 |
    | eggs | 451 |
    | bacon | 0 |

    no special alignment

    | item | qty |
    |--------|-------|
    | spam | 42 |
    | eggs | 451 |
    | bacon | 0 |

    | item | qty |
    |:-------|------:|
    | spam | 42 |
    | eggs | 451 |
    | bacon | 0 |
    both align to right

    | item | qty |
    |-------:|------:|
    | spam | 42 |
    | **eggs** | **451** |
    | *eggs* | *451* |
    | bacon | 0 |


  2. braindevices revised this gist Aug 5, 2017. 1 changed file with 19 additions and 0 deletions.
    19 changes: 19 additions & 0 deletions test_markdown.md
    Original file line number Diff line number Diff line change
    @@ -21,6 +21,25 @@
    | eggs | 451 |
    | bacon | 0 |

    | item | qty |
    |--------|-------|
    | spam | 42 |
    | eggs | 451 |
    | bacon | 0 |

    | item | qty |
    |:-------|------:|
    | spam | 42 |
    | eggs | 451 |
    | bacon | 0 |

    | item | qty |
    |-------:|------:|
    | spam | 42 |
    | **eggs** | **451** |
    | bacon | 0 |


    `>>> print tabulate(table, headers, tablefmt="simple")`

    item qty
  3. braindevices revised this gist Aug 5, 2017. No changes.
  4. braindevices renamed this gist Aug 5, 2017. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  5. braindevices renamed this gist Aug 5, 2017. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  6. braindevices revised this gist Aug 5, 2017. 1 changed file with 7 additions and 10 deletions.
    17 changes: 7 additions & 10 deletions test_markdown.md
    Original file line number Diff line number Diff line change
    @@ -21,6 +21,13 @@
    | eggs | 451 |
    | bacon | 0 |

    `>>> print tabulate(table, headers, tablefmt="simple")`

    item qty
    ------ -----
    spam 42
    eggs 451
    bacon 0

    is like tables formatted by Postgres' psql cli:

    @@ -35,16 +42,6 @@ is like tables formatted by Postgres' psql cli:



    `>>> print tabulate(table, headers, tablefmt="simple")`

    item qty
    ------ -----
    spam 42
    eggs 451
    bacon 0



    `>>> print tabulate(table, headers, tablefmt="fancy_grid")`

    ╒════════╤═══════╕
  7. braindevices revised this gist Aug 5, 2017. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions test_markdown.md
    Original file line number Diff line number Diff line change
    @@ -58,7 +58,8 @@ bacon 0
    ╘════════╧═══════╛


    >>> print tabulate(table, headers, tablefmt="orgtbl")
    `>>> print tabulate(table, headers, tablefmt="orgtbl")`

    | item | qty |
    |--------+-------|
    | spam | 42 |
    @@ -68,7 +69,7 @@ bacon 0

    jira follows the conventions of Atlassian Jira markup language:

    >>> print tabulate(table, headers, tablefmt="jira")
    `>>> print tabulate(table, headers, tablefmt="jira")`
    || item || qty ||
    | spam | 42 |
    | eggs | 451 |
  8. braindevices revised this gist Aug 5, 2017. 1 changed file with 70 additions and 0 deletions.
    70 changes: 70 additions & 0 deletions test_markdown.md
    Original file line number Diff line number Diff line change
    @@ -58,3 +58,73 @@ bacon 0
    ╘════════╧═══════╛


    >>> print tabulate(table, headers, tablefmt="orgtbl")
    | item | qty |
    |--------+-------|
    | spam | 42 |
    | eggs | 451 |
    | bacon | 0 |


    jira follows the conventions of Atlassian Jira markup language:

    >>> print tabulate(table, headers, tablefmt="jira")
    || item || qty ||
    | spam | 42 |
    | eggs | 451 |
    | bacon | 0 |

    rst formats data like a simple table of the reStructuredText format:

    >>> print tabulate(table, headers, tablefmt="rst")
    ====== =====
    item qty
    ====== =====
    spam 42
    eggs 451
    bacon 0
    ====== =====

    mediawiki format produces a table markup used in Wikipedia and on
    other MediaWiki-based sites:

    >>> print tabulate(table, headers, tablefmt="mediawiki")
    {| class="wikitable" style="text-align: left;"
    |+ <!-- caption -->
    |-
    ! item !! align="right"| qty
    |-
    | spam || align="right"| 42
    |-
    | eggs || align="right"| 451
    |-
    | bacon || align="right"| 0
    |}

    moinmoin format produces a table markup used in `MoinMoin`_
    wikis:

    >>> print tabulate(d,headers,tablefmt="moinmoin")
    || ''' item ''' || ''' quantity ''' ||
    || spam || 41.999 ||
    || eggs || 451 ||
    || bacon || ||

    youtrack format produces a table markup used in `Youtrack`_
    tickets:

    >>> print tabulate(d,headers,tablefmt="youtrack")
    || item || quantity ||
    | spam | 41.999 |
    | eggs | 451 |
    | bacon | |

    textile format produces a table markup used in Textile format:

    >>> print tabulate(table, headers, tablefmt='textile')
    |_. item |_. qty |
    |<. spam |>. 42 |
    |<. eggs |>. 451 |
    |<. bacon |>. 0 |


  9. braindevices revised this gist Aug 5, 2017. 1 changed file with 15 additions and 0 deletions.
    15 changes: 15 additions & 0 deletions test_markdown.md
    Original file line number Diff line number Diff line change
    @@ -43,3 +43,18 @@ spam 42
    eggs 451
    bacon 0



    `>>> print tabulate(table, headers, tablefmt="fancy_grid")`

    ╒════════╤═══════╕
    │ item │ qty │
    ╞════════╪═══════╡
    │ spam │ 42 │
    ├────────┼───────┤
    │ eggs │ 451 │
    ├────────┼───────┤
    │ bacon │ 0 │
    ╘════════╧═══════╛


  10. braindevices revised this gist Aug 5, 2017. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions test_markdown.md
    Original file line number Diff line number Diff line change
    @@ -23,6 +23,7 @@


    is like tables formatted by Postgres' psql cli:

    `>>> print tabulate.tabulate()`
    +--------+-------+
    | item | qty |
    @@ -33,7 +34,9 @@ is like tables formatted by Postgres' psql cli:
    +--------+-------+



    `>>> print tabulate(table, headers, tablefmt="simple")`

    item qty
    ------ -----
    spam 42
  11. braindevices revised this gist Aug 5, 2017. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions test_markdown.md
    Original file line number Diff line number Diff line change
    @@ -13,7 +13,7 @@
    | 6444 | 6162 | 0 |
    | 5812 | 6950 | 0 |

    >>> print tabulate(table, headers, tablefmt="pipe")
    `>>> print tabulate(table, headers, tablefmt="pipe")`

    | item | qty |
    |:-------|------:|
    @@ -23,7 +23,7 @@


    is like tables formatted by Postgres' psql cli:
    >>> print tabulate.tabulate()
    `>>> print tabulate.tabulate()`
    +--------+-------+
    | item | qty |
    |--------+-------|
    @@ -33,7 +33,7 @@ is like tables formatted by Postgres' psql cli:
    +--------+-------+


    >>> print tabulate(table, headers, tablefmt="simple")
    `>>> print tabulate(table, headers, tablefmt="simple")`
    item qty
    ------ -----
    spam 42
  12. braindevices revised this gist Aug 5, 2017. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion test_markdown.md
    Original file line number Diff line number Diff line change
    @@ -30,6 +30,8 @@ is like tables formatted by Postgres' psql cli:
    | spam | 42 |
    | eggs | 451 |
    | bacon | 0 |
    +--------+-------+


    >>> print tabulate(table, headers, tablefmt="simple")
    item qty
    @@ -38,4 +40,3 @@ spam 42
    eggs 451
    bacon 0

    +--------+-------+
  13. braindevices revised this gist Aug 5, 2017. 1 changed file with 28 additions and 1 deletion.
    29 changes: 28 additions & 1 deletion test_markdown.md
    Original file line number Diff line number Diff line change
    @@ -11,4 +11,31 @@
    | 6604 | 6387 | 6192 |
    | 6189 | 6860 | 6090 |
    | 6444 | 6162 | 0 |
    | 5812 | 6950 | 0 |
    | 5812 | 6950 | 0 |

    >>> print tabulate(table, headers, tablefmt="pipe")
    | item | qty |
    |:-------|------:|
    | spam | 42 |
    | eggs | 451 |
    | bacon | 0 |


    is like tables formatted by Postgres' psql cli:
    >>> print tabulate.tabulate()
    +--------+-------+
    | item | qty |
    |--------+-------|
    | spam | 42 |
    | eggs | 451 |
    | bacon | 0 |

    >>> print tabulate(table, headers, tablefmt="simple")
    item qty
    ------ -----
    spam 42
    eggs 451
    bacon 0

    +--------+-------+
  14. braindevices created this gist Aug 5, 2017.
    14 changes: 14 additions & 0 deletions test_markdown.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@


    | 1–10 | 11–20 | 20–30 |
    |-----:|-----:|-----:|
    | 6940 | 5839 | 6007 |
    | 6615 | 6957 | 6314 |
    | 6169 | 6877 | 6224 |
    | 6142 | 6324 | 6210 |
    | 6492 | 6685 | 6961 |
    | 6908 | 5964 | 6475 |
    | 6604 | 6387 | 6192 |
    | 6189 | 6860 | 6090 |
    | 6444 | 6162 | 0 |
    | 5812 | 6950 | 0 |