Page 1 of 1

What would you recommend for Plain-Text Conversion Utilities

Posted: Wed Sep 09, 2015 10:08 pm
by no.cache
I'm interested in either a Textpad (macro, whatever) -or- if you have a standalone freeware/opensource widget that you use. There's a profusion of browser addons/apps that convert html files into plain text (well duh, it's called "Save As" lol) but it's much more difficult to take plain text and convert it into an HTML table, or a list of URL addresses in a ~.txt file to HTML hyperlinks. Thanks guys.

sm

Posted: Tue Sep 22, 2015 9:02 pm
by Drxenos
I don't understand the distinction you are trying to make. HTML is plain text. Do you mean the resultant text displayed by the browser from HTML?

Posted: Thu Oct 20, 2016 3:33 am
by no.cache
LEGEND
@ = TAB
% = CARRIER RETURN (\n in Textpad)

EXAMPLE
ROW 1 = 1 column
ROW 2 = 3 columns
ROW 3 = 6 columns
................................................................................
Mauris semper, velit semper laoreet dictum, quam diam dictum urna, nec placerat elit nisl in quam. %
@ ALIQUAM PHARETRA @ ETIAM AUGUE %
@ PEDE, MOLESTIE EGET @ CONVALLIS UT, EROS @ NULLA IN TELLUS EGET @ ODIO SAGITTIS BLANDIT @ MAECENAS AT NISL %
................................................................................

What I'm asking is if there is some kind of program/widget/macro that can read the TABS on those three lines, convert them into COLUMNS, and render the whole thing as an HTML TABLE. Thanks!

Posted: Thu Nov 03, 2016 2:21 pm
by AmigoJack
Search and replace that with regular expressions.

Find what: \t
Replace with: </td><td>

Find what: ^(.+)\n
Replace with: <tr><td>\1</td></tr>

Now you just need some definition on where the table starts (suggestion: empty line) and where it ends (last line shouldn't have a carriage return).

Posted: Wed Dec 14, 2016 6:15 am
by no.cache
Thanks AmigoJack!