BurntSushi / erd

Translates a plain text description of a relational database schema to a graphical entity-relationship diagram.
The Unlicense
1.79k stars 154 forks source link

Add support of regular dot tables as output, apart from html. #72

Closed bollafa closed 4 years ago

bollafa commented 4 years ago

As the README itself promotes:

(I would not be against a small addition to erd that uses no formatting and writes entities as regular dot tables.)

There's a very rough support of it here

It's still quite ad-hoc, and I created this issue to discuss the implementation details, such as the new option name and how to refactor the function that maps an ER diagram to a GraphViz one.

I have added the option --no-html to choose between the two modes ( and while I was testing if I had added it correctly i found #71 )

mmzx commented 4 years ago

Hi @bollafa, Thank you, I have compiled and used your solution.

It is operational, so would you mind making the usual ceremony of creating a pull-request from your branch vanilla-dot, so perhaps the details of the code could be further specified in the PR?

I am not sure whether the --no-html flag is good as a name. The behavior only changes the resulted formatting of the entities (tables) in the diagram. So, what would you think about something like dot-entity or similarly specific for the argument flag?

In the PR we could easily work on the code...

bollafa commented 4 years ago

I have created the ceremonial PR :) .

I don't mind at all changing the flag name. I think --no-html can be quite misleading to someone that does not know the implementation details of Erd. dot-entity seems okay to me. Just another - perhaps unnecessary - idea: what do you think about dot-table?

mmzx commented 4 years ago

I don't mind at all changing the flag name. I think --no-html can be quite misleading to someone that does not know the implementation details of Erd. dot-entity seems okay to me. Just another - perhaps unnecessary - idea: what do you think about dot-table?

I'm not against dot-table, although still think saying entity is more descriptive. Please choose the one you think is better.

mmzx commented 4 years ago

(PR #74) resolves this issue.