Git Product home page Git Product logo

mdtable2csv's Introduction

mdtable2csv's People

Contributors

515hikaru avatar dependabot[bot] avatar wreulicke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

mdtable2csv's Issues

Use github.com/yuin/goldmark instead

Hi,

Currently, the most popular option available on GitHub posts the Markdown to the GitHub API and parses the resulting HTML document and I hope you would agree this is far from a clean solution.

Therefore please, let me say that I sincerely appreciate your contribution, as it addresses an issue I had been facing while trying to find a suitable tool for generating CSV files from Markdown tables.

In terms of future development, do you think it might be worth considering Goldmark as an alternative to Gomarkdown? I am curious to hear your thoughts.

Thanks again for taking the time to read my message. Let's keep the conversation going and work together towards finding the best solution!

Suggestion: web app version?

I have 1 markdown table to convert so just looking for a textarea somewhere to paste it in and get the CSV. Just a suggestion!

I found this via a google search.

Cool stuff!

Handle empty cells

I will add the patch later.

diff --git a/main.go b/main.go
index f26fb10..e6ddaea 100644
--- a/main.go
+++ b/main.go
@@ -56,6 +56,10 @@ func extractTextFromTableDocument(node ast.Node) [][]string {
                var row [][]string
                var ss []string
                for _, c := range node.GetChildren() {
+                       if len(c.GetChildren()) == 0 {
+                               ss = append(ss, "")
+                               continue
+                       }
                        leaf := c.GetChildren()[0].AsLeaf()
                        ss = append(ss, string(leaf.Literal))
                }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.