I have an input Excel file that I get that’s provided to me by a third party. This list just includes names, phone numbers, and email addresses. I’m trying to convert the file from Excel into wiki format. My train of thought so far uses ‘xlhtml’ to get it into text. I can then use pandoc -f html -t mediawiki emp2.txt -o emp3.txt to convert it to wiki markup. The issue is that pandoc doesn’t translate the html tables that were created in the first step.
Alternatively, I can use basic sed, grep, awk, etc to strip out html tags that will always be the same making my job easy, but then I have the issue of taking plain text user@domain.com email addresses and turning them into [mailto:user@domain.com] which I also don’t know how to do. I’m not which route is best to take. This is not to be a portable solution, so I can use python, perl, php, bash, or any other CLI based utilities.
An alternative route could be to export the Excel doc to csv first and then manipulate it.
A note when using xlhtml that may help, email addresses are formatted as links in Excel, so xlhtml outputs them using <a href= links which are the ones I want converted to [mailto:user@domain.com]
so you get
<a href="user@domain.com">and you want it to be[mailto:user@domain.com]?Since everything else is names and phone numbers, why don’t you just use any text edit program and do a simple find and replace
<a href="to[mailto:and">to]