I need a script to convert files for a hybrid HTML language to a WIKI language. I want this in python, and the program is to search for files recursively converting files it finds.
## Deliverables
From the current directory, the software needs to recursively look for files with a .wml extension and process them, saving the results with a .txt extenion.
The file needs to convert from THE WML web format into a PmWIKI format. The whole idea is that the software needs to be extendable by me to add more formats. If it finds a HTML tag that it does not know about it should warn the user.
<zwue> ' = ' Space, Equals, Space
</zwue> ' = ' Space, Equals, Space
<subheadline> ' == ' Space, Equals, Equals, Space
</subheadline> ' == ' Space, Equals, Equals, Space
<b> ''' 2 x '
</b> ''' 3 x '
<i> '' 2 x '
<\i> '' 2 x '
<a href=URL>Text</a> [[ URL | Text ]]
<boiler> Hard copied text
<page_title name="text"> (:Title text :)
# remove this line
<img src=URL align=blah> %align=blah% URL
<p> New line
In addition, the following custom tag definitions , as well as standard tables, need to be decoded into PmWIKI tables.
([login to view URL])
<table>, <tr>, <td>
<myrows>
<hrow "text">
<faq>
<hfaq>
<myfaq>
<define-tag myrows endtag=required>
<table cellspacing=6 cellpadding=0 border=0>
%body
</table>
</define-tag>
<define-tag hrow>
<tr><td colspan=2><font face="Arial,Helvetica" size=+2><br><b>%0</b></font></td>
</tr>
</define-tag>
# 0 = href, 1 = text, 2 = img 3 = rhs desc
<define-tag row>
<tr>
<td align=right border=6>
<if %0 "<a href=%0>" "">
<if %2 "<img src=%2 alt="%1">" "<b>%1</b>" />
<if %0 "</a>" "">
<if %0 "<a
href="%0
" target="_blank"
>X</a>
</td>" "" >
<td>%3</td>
</tr>
</define-tag>
<define-tag faq endtag=required>
<table cellspacing=6 cellpadding=0 border=0>
%body
</table>
</define-tag>
<define-tag hfaq>
<tr><td colspan=2><font face="Arial,Helvetica" size=+2><br><b>%0</b></font></td>
</tr>
</define-tag>
<define-tag myfaq>
<tr>
<td>Q: %0</td>
<td>A: %1</td>
</tr>
</define-tag>