Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > OT: good text to html batch converter?

Reply
Thread Tools

OT: good text to html batch converter?

 
 
fitwell
Guest
Posts: n/a
 
      11-14-2003
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.

 
Reply With Quote
 
 
 
 
Leif K-Brooks
Guest
Posts: n/a
 
      11-14-2003
fitwell wrote:

> 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?
 
Reply With Quote
 
 
 
 
fitwell
Guest
Posts: n/a
 
      11-14-2003
On Fri, 14 Nov 2003 00:39:07 GMT, Leif K-Brooks
<(E-Mail Removed)> wrote:

>fitwell wrote:
>
>> 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?


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.

 
Reply With Quote
 
Disco Octopus
Guest
Posts: n/a
 
      11-14-2003
fitwell wrote:
> 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.



 
Reply With Quote
 
Toby A Inkster
Guest
Posts: n/a
 
      11-14-2003
Leif K-Brooks wrote:

> 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.)

--
Toby A Inkster BSc (Hons) ARCS
Contact Me - http://www.goddamn.co.uk/tobyink/?page=132

 
Reply With Quote
 
Adrienne
Guest
Posts: n/a
 
      11-14-2003
Gazing into my crystal ball I observed fitwell <(E-Mail Removed)>
writing in news:(E-Mail Removed):

> On Fri, 14 Nov 2003 00:39:07 GMT, Leif K-Brooks
><(E-Mail Removed)> wrote:
>
>>fitwell wrote:
>>
>>> 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?

>
> 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.

--
Adrienne Boswell
Please respond to the group so others can share
http://www.arbpen.com
 
Reply With Quote
 
fitwell
Guest
Posts: n/a
 
      11-14-2003
On Fri, 14 Nov 2003 09:16:38 GMT, Adrienne <(E-Mail Removed)>
wrote:

>> 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.


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!


 
Reply With Quote
 
fitwell
Guest
Posts: n/a
 
      11-14-2003
On Fri, 14 Nov 2003 08:09:36 +0000, Toby A Inkster
<(E-Mail Removed)> wrote:

>Leif K-Brooks wrote:
>
>> 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.)


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.

 
Reply With Quote
 
Wipkip
Guest
Posts: n/a
 
      11-16-2003
Robert Frost-Bridges wrote:
> Toby A Inkster wrote:
>
> [code]
>> ================================================== =
>>
>> (not actually tested, but looks like it should work.)

>
> Which is how the windows os was written I believe


Damn, I wish that wasn't true.

--
Duende


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
exporting 900 PDF files as an Accessible Text file using batch processing r Computer Support 2 06-06-2010 05:40 PM
C++, VBS, or Batch for text file creation / modification GoCoogs C++ 2 10-10-2005 08:43 AM
Batch e-mail with customized html content in the body generated from asp.net webforms rgouge ASP .Net 0 07-29-2005 08:23 PM
Software to stamp text onto a batch of images? JohnJ Digital Photography 21 11-18-2004 02:16 PM
any good idea about Update many records in one page, one batch Edward ASP .Net 1 06-10-2004 09:30 AM



Advertisments