tags:

views:

56

answers:

2

I need to Process Markdown at the command line, so there is no real language restriction.

Extra features such as pretty quotes and dashes are a welcome addition. Code blocks are a must, but they are part of the core I think.

I want to output to HTML only, and I'm on a Unix environment.

+1  A: 

I'm not sure what the most maintained is, and I'm certainly biased by using it here most, but the one SO uses is also available on github, it's the markdownsharp project, written in C# and pretty well maintained.

It fixes many of the bugs in the original markdown implementation, found by SO users as questions were asked, like most things, just a project that came out of a necessity. That being said, some of how markdown works is as designed per the spec, but isn't necessarily intuitive, it's the maintainers prerogative there as to what action to take there, intuitive vs spec...so you may have to adjust any implementation a bit to get exactly what you want in some edge cases.

Nick Craver
Does it include a bin for use on a shell? Also... Can it run on Unix?
Pepijn
@Pepijn - The download is source only, but you can compile it as long as you have .Net 4 installed (which you'd have to have to run the console app anyway), not sure if this is an option for you or not...just answering in the "no language restriction" context of the question :) A better approach IMO would be to include the project beside your console one...so you can more easily apply updates that come along.
Nick Craver
So that would at least mean Mono for me. It might be a good option for others though, so I'll give you an upvote but not /my/ accepted solution.
Pepijn
@Pepijn - Fair enough :) I'd edit the question though, give a bit more information about the target environment, this will help get you better answers :)
Nick Craver
Done. Only one other answer so far though.
Pepijn
+1  A: 

I've been using python with http://www.freewisdom.org/projects/python-markdown/ without any problem so far, and it has a simple extension mechanism.

Nicolas Goy