OT: good text to html batch converter?

F

fitwell

I've been searching for a long time today but can't find anything
good.

It would hopefully be on the small side, i.e., no bloatware and
supports batch conversion via drag-'n-drop or by loading a bunch of
files via a file open dialogue box (in other words, not a directory
tree where one has to click all the way to the target folder). Also,
no fancy little flashy thing gets saved in the html end result saying
"converted to html by such-and-such a program". I tried one like that
today and it is extremely annoying to have that amongst all one's
research.

Thanks. Realize it's OT but it's getting to be a really necessary
app.
 
L

Leif K-Brooks

fitwell said:
I've been searching for a long time today but can't find anything
good.

It would hopefully be on the small side, i.e., no bloatware and
supports batch conversion via drag-'n-drop or by loading a bunch of
files via a file open dialogue box (in other words, not a directory
tree where one has to click all the way to the target folder). Also,
no fancy little flashy thing gets saved in the html end result saying
"converted to html by such-and-such a program". I tried one like that
today and it is extremely annoying to have that amongst all one's
research.

Why do you want to do that? All a good converter would do is put
everything in a <pre> element and convert everything to entities, why
not just make it a .txt file and be done?
 
F

fitwell

Why do you want to do that? All a good converter would do is put
everything in a <pre> element and convert everything to entities, why
not just make it a .txt file and be done?

Why do people answer a question with a question, is what I'd like to
know.

Pls, does anyone know of a good batch text to html converter? I need
one but it must support batch conversion.

Thank you.
 
D

Disco Octopus

fitwell said:
On Fri, 14 Nov 2003 00:39:07 GMT, Leif K-Brooks
Why do people answer a question with a question, is what I'd like to
know.

It may be because some poeple dont know that you can do things like that
(make a simple txt file), and they are just trying to help answere the
problem, rather than the question.

Maybe as "Thanks anyway" would have sufficed, YUMP.
 
T

Toby A Inkster

Leif said:
Why do you want to do that? All a good converter would do is put
everything in a <pre> element and convert everything to entities, why
not just make it a .txt file and be done?

I would assume that the OP wants a converter that will *not* use <pre> and
hence allow word-wrapping, judging from his previous thread.

If he has access to Unix box (as any good research scientist should!) then
he should be able to use a Perl script like this:

===================================================
#!/usr/bin/perl

# Written by Toby A Inkster, November 2003.
# and hereby placed in the public domain.
# (c) nobody.

@in = <>;
$in = join('',@in);
@paragraphs = split(/\r?\n\r?\n/, $in);
print <<EOHTML;
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Untitled</title>
</head>
<body>
<h1>Untitled</h1>
EOHTML
foreach $p (@paragraphs) {
$p =~ s#\&#\&amp;#;
$p =~ s#<&#\&lt;#;
$p =~ s#>&#\&gt;#;
print " <p>$p</p>\n\n";
}
print <<EOHTML;
</body>
</html>
EOHTML
===================================================

(not actually tested, but looks like it should work.)
 
A

Adrienne

Why do people answer a question with a question, is what I'd like to
know.

Pls, does anyone know of a good batch text to html converter? I need
one but it must support batch conversion.

Thank you.

I don't know if this will help, but http://www.jafsoft.com/asctohtm/
ASCtoHTM might be something to look into. I've used another of the
author's programs to convert some csv files into tables. The output was
very clean.
 
F

fitwell

I don't know if this will help, but http://www.jafsoft.com/asctohtm/
ASCtoHTM might be something to look into. I've used another of the
author's programs to convert some csv files into tables. The output was
very clean.

Yes, tried it. It was one of the ones that didn't fit the bill. I
ended up with an app that works okay but it has its limitations.
Though I wrote a bat to get around most of them and set the EXE to
read-only so I don't accidentally delete (it saves the generated html
to the app's root fldr, which is dumb). But it does the job okay now
that I launch with the bat, instead.

Thanks, all! 221 text files to index to html with a great freeware
indexer I found (DIR2HTML) but MSIE doesn't word wrap, so decided to
batch-convert to html! In seconds that one folder was done. Now to
go on to the other research projects. I capture data via IE Text
Archiver which saves to txt format so this whole thing now
orchestrates nicely.

Cheers!
 
F

fitwell

I would assume that the OP wants a converter that will *not* use <pre> and
hence allow word-wrapping, judging from his previous thread.

If he has access to Unix box (as any good research scientist should!) then
he should be able to use a Perl script like this:

===================================================
#!/usr/bin/perl

# Written by Toby A Inkster, November 2003.
# and hereby placed in the public domain.
# (c) nobody.

@in = <>;
$in = join('',@in);
@paragraphs = split(/\r?\n\r?\n/, $in);
print <<EOHTML;
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Untitled</title>
</head>
<body>
<h1>Untitled</h1>
EOHTML
foreach $p (@paragraphs) {
$p =~ s#\&#\&amp;#;
$p =~ s#<&#\&lt;#;
$p =~ s#>&#\&gt;#;
print " <p>$p</p>\n\n";
}
print <<EOHTML;
</body>
</html>
EOHTML
===================================================

(not actually tested, but looks like it should work.)

Yes, came across a lot of Perl script. When I say "research", it is
personal research. I am not a scientist. I don't know programming so
this was not an option. However, did find a freeware that does the
job after I wrote a rudimentary bat and set the attributes for the
app's EXE to read-only.

Thanks everyone for the program names! Appreciate it.
 
W

Wipkip

Robert said:
Toby A Inkster wrote:

Code:
[QUOTE]
===================================================

(not actually tested, but looks like it should work.)[/QUOTE]

Which is how the windows os was written I believe :-)[/QUOTE]

Damn, I wish that wasn't true. :(
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top