Skip to content

showmik/html-table-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

67 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

HTML Table Generator

HTML Table Generator is a tool that generates HTML table code from user input or CSV files.

Backstory

I was working on an ebook file that I planned to read on my Kindle. The file had numerous Japanese dialogues and vocabularies that needed to be turned into an HTML table for the kindle to display properly. I also had to use HTML ruby syntax to ensure that it supported Furigana.

Coding this by hand was very tedious and close to impossible. So, I decided to make a tool that can automate the process. The HTML Table Generator is the result of that, along with another tool, the Furigana Tool.

How to Use

A dialogue From Genki

Suppose the case, this dialogue, which is from the Japanese textbook Genki, needed to be incorporated in an ebook file in such a way that the kindle can read it nicely.

Formatting it into an HTML table would do the job and the code (excluding Furigana and styling) would look something like this:

<table>
    <tr>
       <td>ใ ใ‘ใ—:<br/>Takeshi</td>
       <td>ใ“ใ‚“ใซใกใฏใ€‚ใใ‚€ใ‚‰ ใŸใ‘ใ—ใงใ™ใ€‚<br/>Konnichiwa. Kimura Takeshi desu.</td>
    </tr>
    <tr>
       <td>ใƒกใ‚ขใƒชใƒผ:<br/>Mearii</td>
       <td>ใƒกใ‚ขใ‚Šใƒผใƒปใƒใƒผใƒˆใงใ™ใ€‚ใ‚ใฎใ†ใ€ใ‚Šใ‚…ใ†ใŒใใ›ใ„ใงใ™ใ‹ใ€‚<br/>Mearii Haato desu. Anoo, ryuugakusee desu ka.</td>
    </tr>
    <tr>
       <td>ใ ใ‘ใ—:<br/>Takeshi</td>
       <td>ใ„ใ„ใˆใ€ใซใปใ‚“ใ˜ใ‚“ใงใ™ใ€‚<br/>iie, nihonjin desu.</td>
    </tr>
    <tr>
       <td>ใƒกใ‚ขใƒชใƒผ:<br/>Mearii</td>
       <td>ใใ†ใงใ™ใ‹ใ€‚ใชใ‚“ใญใ‚“ใ›ใ„ใงใ™ใ‹ใ€‚<br/>Soo desu ka. Nannensee desu ka.</td>
    </tr>
    <tr>
       <td>ใ ใ‘ใ—:<br/>Takeshi</td>
       <td>ใ‚ˆใญใ‚“ใ›ใ„ใงใ™ใ€‚<br/>Yonensee desu.</td>
    </tr>
</table>

To do the same with this HTML Table Generator:

  • First, input how many rows and columns you need. In this case, It is two columns and five rows. Also check on the romaji support check box and then click on Generate.

    AppInterface01
  • It will generate a new window containing input text boxes corresponding to the number of rows and columns you entered. Fill up these boxes with proper input and then click Run.

    AppInterface02
  • It will generate another window with the final table code. You can copy the whole thing by clicking on Copy.

    AppInterface03

After adding some style, it looks something like this:

KindlePreview