On 09/12/15 20:27, Ken Fallon wrote: > On 2015-12-09 21:09, Carl D Hamann wrote: > >> And if the list doesn't have someone's preferred format, all they need to >> do is provide a tool for converting it to xhtml. Now it's up to the mailing >> list to decide: are we ok with picking one or a few automateable formats to >> use on the upload form? > > Dave has been working on a tool that can look at the notes and determine > their format. We also have a ticket open for a helper drop down list that > will allow the host to explicitly say what format it is.
My "What is this?" script is fairly simplistic. It scans the notes and collects together signatures of various markup languages and generates a score that indicates the likelihood of it being some known format. This is an inexact process, and I'm not confident that it could automatically do the right thing. This is purely experimental at the moment, and would become obsolete once we have the drop-down list. I have been using it in conjunction with another script, designed to be a filter in Vim, which I can apply to notes and turn obvious elements into Markdown. For example, if it sees an URL it adds Markdown markup to ensure a processor (like Pandoc, my personal favourite) does the right thing. The idea was to fire up Vim, run the Markdown converter on the file, then do any further necessary editing by hand, and finally give the result to Pandoc to see if I got it right. My hope was that if we had HTML experts sending stuff in we'd get notes that didn't need processing. Markup language aficionados I'd hope would send in their preferred markup (chosen from our list of course; we don't really want LaTeX), with an indication of what it is. Next level could be "reduced Markdown" as I mentioned on the Community News, using just the simplest elements of Markdown such as paragraphs, headers and lists. Other than that I reckoned we'd try and do our best with the rest, as we always do. I am up for writing something for the website to describe "reduced Markdown" if that's appropriate. -- Dave Morriss, Edinburgh, Scotland, UK | [email protected] _______________________________________________ Hpr mailing list [email protected] http://hackerpublicradio.org/mailman/listinfo/hpr_hackerpublicradio.org
