==============================================================
EDIT 2019-04-27, see for a GUI program to convert markdown to html, here:
http://murga-linux.com/puppy/viewtopic. ... 22#1026422
EDIT: portable version of md2html-gui, has choice for different styles, 64 and 32 bit, here:
http://murga-linux.com/puppy/viewtopic. ... 90#1026490
EDIT 2019-04-30 New portable version 0.2 has "Preview in Browser" button:
http://murga-linux.com/puppy/viewtopic. ... 41#1026741
EDIT 2019-05-02 Version 0.3 has gtkdialog GUI
http://murga-linux.com/puppy/viewtopic. ... 36#1026936
EDIT 2020-07-01 Version 0.4 of md2html-gui, changes, see here:
http://murga-linux.com/puppy/viewtopic. ... 65#1062065
==============================================================
I've been looking for a small program to convert Markdown to HTML, there are a lot, but most of them require ruby, perl, python or nodejs (with dependencies), and found this written in C:
https://www.pell.portland.or.us/~orc/Code/discount/
Compiled and made a .pet for it (see attached)
From what I tested it works on old and new 32-bit puppies.
Contains (cli) programs: markdown, mkd2html and makepage.
man markdown
man mkd2html
EDIT: Another way is to use https://dillinger.io/ if you don't mind being dependent on an online service.
As an example to demonstrate for a 2 columns table (as greengeek is looking for a similar thing here):, create a new file "in.md"
Open with text-editor and paste the following in it:
Code: Select all
# Header....
| Personal | Work |
| :----------------| :--------------- |
|Long text: All on one line, wrapping automatically. All on one line, wrapping automatically All on one line, wrapping automatically. All on one line, wrapping automatically. All on one line, wrapping automatically.|Short text here
|Medium short text, blablablah|Long text: All on one line, wrapping automatically. All on one line, wrapping automatically All on one line, wrapping automatically. All on one line, wrapping automatically. All on one line, wrapping automatically.
|Hi!|Short text
|Text, blablablah|Short text
|Hi!|Short text
||Left column is empty
|Right column is empty|
Code: Select all
| Applications | Others |
| :----------------| :--------------- |
|alsamixer-tray|apulse
|azpainter|broadcom-wl-driver-k4.9.0-3-686-pae
|ceni|conky-cli
|conkyclock|conky
|conkyclock2|libpng12-0
|cputemp|libx264-132
|create-portable|emelfm2
|epdfview|gtkdesklet
|deadbeef-static|gtkdialog
|firefox-esr|guessfstype
|dropboxgui|libmusicbrainz3-6
Code: Select all
# convert markdown to html
mkd2html in.md out.html
# add style block, table-layout: fixed, width: 100%
echo '<style>
table {
width: 100%;
margin: 6px auto;
table-layout: fixed;
}
table,
td,
th {
border-collapse: collapse;
}
th,
td {
padding: 4px;
border: solid 1px #D2D5D8;
text-align: center;
}
.w {
width: 100%;
}
</style>
' >> out.html
Much more styling can be done with a more advanced style block of course.
Also you can use mkd2html with -css option, e.g. (pointing to e.g. style.css)
Code: Select all
mkd2html -css style.css in.md out.html
Fred