Markdown Export Format
I would love the ability to export query results to Markdown syntax. It's not too hard to export to "Wiki Markup" and run some regex to turn it into Markdown. Perhaps if you choose wiki format you can have some options as to which format (I know there are a few different flavors of markdown tables).
The format I'm currently working with is https://www.dokuwiki.org/wiki:syntax#tables.
The format I'm currently working with is https://www.dokuwiki.org/wiki:syntax#tables.
Fixed link without dot: https://www.dokuwiki.org/wiki:syntax#tables
I'm just reading that Markdown does not support tables!?
Two online Markdown editors do not parse any of the table markup:
* http://www.dillinger.io/
* https://stackedit.io/
Markdown Here is the extension which supports tables. But even this one has a different syntax than documented on dokuwiki.org.
Two online Markdown editors do not parse any of the table markup:
* http://www.dillinger.io/
* https://stackedit.io/
Markdown Here is the extension which supports tables. But even this one has a different syntax than documented on dokuwiki.org.
Code modification/commit
f8e75b5
from ansgarbecker,
10 years ago,
revision 9.1.0.4939
Basic implementation of Markdown Here grid export option. See http://www.heidisql.com/forum.php?t=16483
Personally, I would prefer the version of Markdown supported by GitHub: https://help.github.com/articles/github-flavored-markdown/#tables
Take note that even though that document doesn't mention it, the
1. Remove your top line of 3 hyphens
2. Change the
That should be it.
Take note that even though that document doesn't mention it, the
| --------- |
line doesn't need to have so many hyphens. I believe the minimum is 3. So basically the way it differs from what you currently have is:1. Remove your top line of 3 hyphens
2. Change the
| -: | -: | -: |
row to | ---: | ---: | ---: |
That should be it.
Markdown export is great!
Additional to the comment by JMTyler I would suggest ensuring an empty line before the table. Some parsers are still picky and there are quite a lot of Markdown implementations. There is hope with the advent of http://commonmark.org, but the Spec still down not include tables.
I also hoped to have a very human readable markdown table in it text representation, which does align the columns for me using whitespaces (of course it would need to know the maximum length of each column to do that.
So instead of this (produces with Build 4948):
I would prefer a format for exporting as follows (correct alignment of columns) when pasting DB dumps to a markdown powered wiki or text-based tools.
As this may cause some additional overhead for export to calculate column lengths it should probably require a config option to be enabled (e.g. [x] Improve readability).
Additional to the comment by JMTyler I would suggest ensuring an empty line before the table. Some parsers are still picky and there are quite a lot of Markdown implementations. There is hope with the advent of http://commonmark.org, but the Spec still down not include tables.
I also hoped to have a very human readable markdown table in it text representation, which does align the columns for me using whitespaces (of course it would need to know the maximum length of each column to do that.
So instead of this (produces with Build 4948):
PERMISSION
---
| ID | NAME | DESC |
| -: | - | - |
| 81 | MANAGE_USERS | |
| 54 | ASSIGN_USERS_TO_SOMETHING | Assign the user to something |
| 2 | DEREGISTER | Allow deregistration of a user |
I would prefer a format for exporting as follows (correct alignment of columns) when pasting DB dumps to a markdown powered wiki or text-based tools.
PERMISSION
---
| ID | NAME | DESC |
| --: | ------------------------- | ------------------------------ |
| 81 | MANAGE_USERS | |
| 54 | ASSIGN_USERS_TO_SOMETHING | Assign the user to something |
| 2 | DEREGISTER | Allow deregistration of a user |
As this may cause some additional overhead for export to calculate column lengths it should probably require a config option to be enabled (e.g. [x] Improve readability).
Oops, forgot the empty line after the header myself.
So it should actually look like that...
So it should actually look like that...
PERMISSION
---
| ID | NAME | DESC |
| --: | ------------------------- | ------------------------------ |
| 81 | MANAGE_USERS | |
| 54 | ASSIGN_USERS_TO_SOMETHING | Assign the user to something |
| 2 | DEREGISTER | Allow deregistration of a user |
Just a note: This forum now supports Markdown syntax as well. Read about the details here.
Please login to leave a reply, or register at first.