[WM] Adding SDF as a format

Wes Meltzer ithildin at teleport.com
Thu Mar 4 22:47:15 GMT 2004


At 2:38 PM -0800 3/4/04, Carlos Ramirez wrote:


>I'm re-acquainting myself with WebMake again. I'm going to be 
>migrating my documents that are in SDF format into webmake. I would 
>like to add the sdf format type, i.e. <content format="text/sdf".., 
>what is the best approach? It does not look like WebMake allow hooks 
>to add a new format, like the plugins. Do I have to submit a patch 
>to FormatConvert.pm?
>
>SDF: http://search.cpan.org/src/IANC/sdf-2.001/doc/paper/sdfintro.html

This shouldn't be that different from adding Textile support, for 
which you might not have been on the listserv. Essentially, yes, you 
do have to modify FormatConvert.pm, but moreover you have to write a 
hook that WebMake can use. Both the Textile and EtText examples use 
Perl modules to do the conversions.

If there's a Text::SDF or something along those lines, with a method 
that can read in sourcetext and write out HTML, then you shouldn't 
have much time calling it in essentially the same mode as Textile. 
Also, if there's a standalone app -- an sdf2html or something like 
that -- you could call it, although I don't know if that would get 
merged into the source for security risks etc.

If there is not, well, it becomes that much harder. You might be able 
to do the conversion -- I don't know anything about SDF -- in 
FormatConvert itself, or you could split it out into a separate 
program or Perl module...

Anyway, good luck! I would try my hand at it, but I know (a) no SDF 
(b) not enough Perl, so I'm no use in a practical sense.

Wes :wm
-- 
Wes Meltzer <ithildin at teleport.com>
<http://www.magnesium.net/~gregsamsa/>
"Even the smallest person can change the course of the future."


More information about the Webmake-talk mailing list