Not Logged In
This task is not strictly for NetBSD, but another project named libsoldout: http://fossil.instinctive.eu/libsoldout/index
libsoldout is a markdown converter written in C and published under public domain. Though there are already other tools which would do this task, they either have a licence that is not usable by NetBSD or have too many dependencies (like pandoc).
As we maybe want to use libsoldout for shell usage, and mdoc is too slow to be parsed, we want a converter which directly translates markdown directly to something terminal-readable, i.e. either bold or underlined text and indentation. The overall look should look like mdoc.
Markdown itself is already plaintext-readable, but there are some things which could be more nice. Additionally, we have to parse it anyway to use links. All in all, it's mainly about specifying some tags you use for inserting and putting it in C code.
You can take the html or the mdoc converter as a template for this:
http://fossil.instinctive.eu/libsoldout/artifact/fd100c723c722189d62fd9bf261d67db69240043 and http://fossil.instinctive.eu/libsoldout/artifact/1e22b7962dfba92c28f4916609746045dbe29a90 respectively.
Though this task seems large, the task itself is rather small. You have to analyze the converters for mdoc and html and replace their tags by the appropriate curses ones.
If you've never worked with curses, feel free to ask. You won't need many tags, only the formatting things like bold font, coloured font. Knowing curses is not a prerequisite.
You don't have to fully cover markdown. Some tags (links and images at least) cannot be displayed, but you should provide hooks for everything and leaving those, which cannot be used, empty.
|File name/URL||File size||Date submitted|
|https://github.com/zielmicha/markdown-to-t...||n/a||December 05 2012 18:07 UTC|
I would like to work on this task.
This task has been assigned to Michał Zieliński. You have 192 hours to complete this task, good luck!
Do I have to use terminfo/curses or may I use standard vt100/xterm codes?
Please use only curses or terminfo, something generic. You should use the smallest, but sufficient library available (I think this will be terminfo).
vt100/xterm is very specific and there are several situations where you don't have them, let it be rxvt, tmux, screen or simply just a shell.
Ok, I will use terminfo.
Just to note: vt100/xterm is mostly compatible with rxvt, screen and Linux console (I don't know about BSD's).
Please, note that your program should work on NetBSD.
I didn't take "Some tags (links and images at least) cannot be displayed, but you should provide hooks for everything and leaving those, which cannot be used, empty" literally.
In examples NULL is provided for unused hooks and I don't see the point of creating empty functions.
(as of commit 2cb199a16d1c4882c1e730035a4c8f1d7ff24431)
The work on this task is ready to be reviewed.
Thank you for your work, the result is fine.
There are some things I would change about the formatting (e.g. indentation), but these are rather my personal preferences than something I would require for a task.
Congratulations, this task has been completed successfully.