Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generating table as an image to add to markdown #25

Open
ThisIsJeron opened this issue May 2, 2018 · 4 comments
Open

Generating table as an image to add to markdown #25

ThisIsJeron opened this issue May 2, 2018 · 4 comments
Labels
enhancement New feature or request

Comments

@ThisIsJeron
Copy link
Contributor

ThisIsJeron commented May 2, 2018

Instead of creating the sudoku table in markdown, would it be possible to have a script (Go, python, doesn't matter) that creates an image that is automatically added to the readme? The current markdown sudoku table doesn't have the typical bolded lines of a sudoku table, making it hard to read

e: also, editing the sudoku table is not easy as well, something that can be fixed by having the sudoku table stored separate outside of the readme

@xiegeo xiegeo added the enhancement New feature or request label May 3, 2018
@xiegeo
Copy link
Owner

xiegeo commented May 3, 2018

Thank you for your suggestions. What does your ideal format for editing the table look like?

I don't know how to make a script automatic. Right now, all you have to do to change numbers is edit a text file, so the whole workflow can be done within GitHub. A script will require contributors to download it locally and have the scripting environment setup. The biggest downside is including generated image in source can cause merge conflicts. Unless you mean calling a server to generate an image such as what http://gravizo.com/#samples does.

Making the html table in readme look better might be possible (if anyone can, please try it), but the sanitization done by GitHub is quite aggressive. An alternative is to use GitHub pages, that's probably the best way going forward if the UI is to grow.

@xiegeo xiegeo added the question Further information is requested label May 3, 2018
@ThisIsJeron
Copy link
Contributor Author

ThisIsJeron commented May 7, 2018

instead of having to read the markdown, perhaps a table drawn in ascii would be easier to use

perhaps when someone edits the "sudoku file" and commits, after accepting pull request there would be an automated "compilation" commit that generates the new readme file. Totally just spitballing here, I've never done anything like this but it would be cool

GitHub Pages would be a good alternative, if you set one up I'd definitely try to contribute

@xiegeo xiegeo removed the question Further information is requested label May 8, 2018
@xiegeo
Copy link
Owner

xiegeo commented May 8, 2018

I see want you mean. I choose the current format because git merge and git blame are line based.

Markdown tables is an option I considered, but it can cause merge conflicts when two person edit the same row.

Having some work done after every commit is doable, but having that commit back to master is too messy. Usually, such programs save their output to a separate place, which we can link to. Sometimes generated code and resources are checked into source control, but they usually don't change day to day.

GitHub Pages (or another host) can work in addition to the current format without replacing it. JavaScript could be used to retrieve the table date from the readme and display it. The concept of where the data lives and how it is displayed become separated, which is a desirable property (so working on this does not exclude changing the source of truth in the future) . This also opens up many opportunities, such as showing who added each number.

I tends to over-design things so I am unlikely to work on this unless I found lots of time. If you want to contribute now, you can start by writing the basic layout of the page and saving it in an index.html file.

@anishkny
Copy link
Collaborator

Hopefully #32 which adds row numbers should help ease the pain a little bit:

<table>
  <tr>            <!-- Row 1 -->
    <td>1
    <td>&nbsp;
    <td>&nbsp;
    ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants