Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > HTML to MHT conversion programmatically

Reply
Thread Tools

HTML to MHT conversion programmatically

 
 
Vincent Bela´che
Guest
Posts: n/a
 
      04-24-2013
Hello,

I am a newbie in Perl. I have written only a few simples scripts, but
that could make me feel the power of the language.

Now, I am looking for some way to convert an HTML file and the
dependency thereof into an MHT archive. All the files are local on my
hard drive. I looked for that on the internet, in vain.

I thought that Perl is probably the best language to make it, and I
wondered whether that already exists or not. I could not find anything
such thing on the CPAN --- well there are Email::MIME or MIME::Entity
and Email::Sender for MIME encoding, but I am not sure whether they are
flexible enough to do an MHT archive, and I must admit that I am not
expert in MHT archive format. Also I found quite a few HTML parsers, but
I don't know which one is the most suited.

In a nutshell, there seems to be already all the building blocks to make
it in a few lines of code, however nothing ready to work off-the-shelf.

Any feedback or help is welcome.

Vincent.

 
Reply With Quote
 
 
 
 
Vincent Bela´che
Guest
Posts: n/a
 
      04-24-2013
Ben Morrow <(E-Mail Removed)> writes:

> Quoth http://www.velocityreviews.com/forums/(E-Mail Removed) (Vincent =?iso-8859-1?Q?Bela=EFche?=):
>>
>> Now, I am looking for some way to convert an HTML file and the
>> dependency thereof into an MHT archive. All the files are local on my
>> hard drive. I looked for that on the internet, in vain.
>>
>> I thought that Perl is probably the best language to make it, and I
>> wondered whether that already exists or not. I could not find
>> anything such thing on the CPAN --- well there are Email::MIME or
>> MIME::Entity and Email::Sender for MIME encoding, but I am not sure
>> whether they are flexible enough to do an MHT archive, and I must
>> admit that I am not expert in MHT archive format.

>
> The MHT format is just a multipart/related MIME entity, isn't it?
> Creating one of those with one of the MIME modules should be entirely
> straightforward. In this case I would probably recommend MIME::Entity
> rather than one of the Email:: modules, because it will let you leave
> the attached files as files and convert them on the fly when writing
> out the completed email.
>
>> Also I found quite a few HTML parsers, but I don't know which one is
>> the most suited.

>
> I would have thought HTML::LinkExtor is what you want in this case,
> since all you need to do is find which additional files need
> archiving.
>
>> In a nutshell, there seems to be already all the building blocks to
>> make it in a few lines of code, however nothing ready to work
>> off-the-shelf.

>
> So try to write something, and, if you get stuck, post again.
>
> Ben


Thank you so much with the quick feedback. I will try that. Whether I am
stuck or not I will anyway make it public --- because writing functional
code, does not mean that the code is well written.

VBR,
Vincent.
 
Reply With Quote
 
 
 
 
johannes falcone
Guest
Posts: n/a
 
      04-25-2013
On Tuesday, April 23, 2013 11:24:10 PM UTC-7, Vincent Bela´che wrote:
> Hello,
>
>
>
> I am a newbie in Perl. I have written only a few simples scripts, but
>
> that could make me feel the power of the language.
>
>
>
> Now, I am looking for some way to convert an HTML file and the
>
> dependency thereof into an MHT archive. All the files are local on my
>
> hard drive. I looked for that on the internet, in vain.
>
>
>
> I thought that Perl is probably the best language to make it, and I
>
> wondered whether that already exists or not. I could not find anything
>
> such thing on the CPAN --- well there are Email::MIME or MIME::Entity
>
> and Email::Sender for MIME encoding, but I am not sure whether they are
>
> flexible enough to do an MHT archive, and I must admit that I am not
>
> expert in MHT archive format. Also I found quite a few HTML parsers, but
>
> I don't know which one is the most suited.
>
>
>
> In a nutshell, there seems to be already all the building blocks to make
>
> it in a few lines of code, however nothing ready to work off-the-shelf.
>
>
>
> Any feedback or help is welcome.
>
>
>
> Vincent.


downlaod opera

open html in opera

saev as mht

DONE

 
Reply With Quote
 
Vincent Bela´che
Guest
Posts: n/a
 
      05-11-2013
johannes falcone <(E-Mail Removed)> writes:


[...]


>> Any feedback or help is welcome.
>>
>>
>>
>> Vincent.

>
> downlaod opera
>
> open html in opera
>
> saev as mht
>
> DONE


Thank you for the feedback, this is what I am doing, but I wanted to do
that programmatically. Sorry if my first email was not clear enough.

Vincent.
 
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
Programmatically display .MHT files inline srivalli chavali via DotNetMonster.com ASP .Net 1 03-19-2010 02:39 PM
Save and then display msword documents as html, filtered html, single file .mht or pdf. AAaron123 ASP .Net 1 11-17-2009 10:02 AM
Programmatically display .MHT files inline =?Utf-8?B?U3JpdmFsbGk=?= ASP .Net 0 05-19-2005 11:40 PM
Programmatically display .MHT files inline srivalli chavali via DotNetMonster.com ASP .Net 0 05-18-2005 09:41 PM
programmatically make .MHT files Tarren ASP General 0 08-23-2004 02:48 PM



Advertisments