Skip to content

Instantly share code, notes, and snippets.

@aaabramov
Last active April 10, 2023 09:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aaabramov/90ec8a3ddfe7ac06ae387a00d02ae555 to your computer and use it in GitHub Desktop.
Save aaabramov/90ec8a3ddfe7ac06ae387a00d02ae555 to your computer and use it in GitHub Desktop.
Drawing tables (boxes) using UTF-8 symbols
┏━━━━━━┳━━━━━━┓ ┏━━━━━━┯━━━━━━┓ ┌──────┬──────┐ ╔══════╦══════╗
┃ col1 ┃ col2 ┃ ┃ col1 │ col2 ┃ │ col1 │ col2 │ ║ col1 ║ col2 ║
┣━━━━━━╋━━━━━━┫ ┠──────┼──────┨ ├──────┼──────┤ ╠══════╬══════╣
┃ val1 ┃ val2 ┃ ┃ val1 │ val2 ┃ │ val1 │ val2 │ ║ val1 ║ val2 ║
┗━━━━━━┻━━━━━━┛ ┗━━━━━━┷━━━━━━┛ └──────┴──────┘ ╚══════╩══════╝
@aaabramov
Copy link
Author

@con-f-use
Copy link

do have the shell code that actually prints the tables? This should be an option for column or something.

@aaabramov
Copy link
Author

do have the shell code that actually prints the tables? This should be an option for column or something.

Unfortunately, I don't.

But you can take a look at this awesome Golang library: https://github.com/olekukonko/tablewriter

@con-f-use
Copy link

Thanks. Python's PrettyTable is also something I've been looking at.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment