I am a conventional Markdown document!
View me on Github!
mdconvert
is a Markdown conversion tool with extra features and special syntax.
- Source code can be compiled via
ghc
:
ghc mdconvert
- Alternatively, an executable of the latest version has been provided.
- Running
mdconvert
with no arguments or-h
prints usage information.
./mdconvert
usage: mdconvert infile [outfile] [-s stylefile]
- To use
mdconvert
, give an input file name and an output file name.
./mdconvert test.md output.html
-
This will convert the contents of
test.md
and store the result in the newly-createdoutput.html
. -
Optionally, one can run
mdconvert
giving only an input file name.
./mdconvert test.md
- This will convert the contents of
test.md
and store the result intest.html
.
- Stylesheets can be embedded into output files by using the
-s
flag, then giving the stylesheet's file name.
./mdconvert test.md output.html -s style.css
- This will convert the contents of
test.md
and store the result inoutput.html
while embeddingstyle.css
inoutput.html
.
./mdconvert test.md -s style.css
- This will convert the contents of
test.md
and store the result intest.html
while embeddingstyle.css
intest.html
.
- Normal text is parsed as paragraph.
- Paragraphs are separated by a blank line.
- Lines breaks can be inserted by putting two spaces at the end of a line.
- Headings are inserted at the beginning of a paragraph using the
#
character. - The heading level is determined by the number of
#
symbols. - The below example produces an
<h1>
:
# Level 1 Heading
- The below example produces an
<h2>
:
## Level 2 Heading
- The below example produces an
<h6>
:
###### Level 6 Heading
- Surround text with
**
.
Bolding the word **bold**.
- Surround text with
_
.
Italicizing the word _italics_.
- Surround text with
`
.
Monospacing the word `monospace`.
- Surround text with
~~
.
Striking through the word ~~strikethrough~~
- Unordered lists are inserted using the
*
character followed by a space. - Unordered lists must be in their own paragraph.
- Nested lists are not supported.
* An item
* Another item
* One more item
- Ordered lists are inserted using a numeric character
followed by a
.
and a space. - Ordered lists must be in their own paragraph.
- Nested lists are not supported.
1. First item
2. Second item
3. Third item
- Links have been modified in
mdconvert
. - Links are surrounded by double-brackets (
[[ ]]
) and contain the text in quotes followed by the source in quotes.
I love [["mdconvert" "https://github.com/swansonmp/mdconvert"]]!
- Images are simplified in
mdconvert
. - Only the
!
, source, and parenthesis are required. - Images must be in their own paragraph.
!(image.png)
- Videos are similar to images, except they use the
^
character. - Video must be in its own paragraph.
- Videos are added with a
320x240
resolution and with controls. - All video formats supported by HTML are supported by
mdconvert
. - Browsers that do not support the
<video>
tag will display an error message.
^(video.mp4)
- Audio is similar to both images and video, except using the
@
character. - Audio must be in its own paragraph.
- Audio is added with controls.
- All audio formats supported by HTML are supported by
mdconvert
. - Browsers that do not support the
<audio>
tag will display an error message.
@(audio.mp3)
- Tables are an addition to
mdconvert
, and are easier to use thanreStructuredText
. - Tables must be in their own paragraph.
- The first line of the table must be a
+
, with additional lines containing data. - Data is entered in
CSV
format, meaning that columns are delineated by,
and rows by a new line.
+
R0C0, R0C1, R0C2
R1C0, R1C1, R1C2
R2C0, R2C1, R2C2
- Horizontal rules are inserted using
---
,***
, or___
. - Horizontal rules must be in their own paragraph.
---
***
___
- For more information, contact Matthew Swanson on Github.
- MIT