Page 1 of 1

Extract pgns from an ".mht" file

PostPosted: 15 May 2007, 13:21
by Norm Pollock
I wrote a new utility tool that reads an ".mht" file and extracts games written in pgn format. It is called "crunch.exe" and available for download at Jim Ablett's site;

http://homepages.tesco.net/henry.ablett/jims.html

An ".mht" file is a file that contains a complete web page and it is created by an Internet browser through the "File/Save" commands.

Using "crunch.exe" removes the chore of copying and pasting from a web page to a text file. Just save the web page in ".mht" format, and then use crunch. The output appears in the file "outZ.pgn". The original input ".mht" file is unchanged.

"crunch.exe" does the same for the simpler ".html" file.

Re: Extract pgns from an ".mht" file

PostPosted: 16 May 2007, 01:18
by Roger Brown
Norm Pollock wrote:I wrote a new utility tool that reads an ".mht" file and extracts games written in pgn format. It is called "crunch.exe" and available for download at Jim Ablett's site;

http://homepages.tesco.net/henry.ablett/jims.html

An ".mht" file is a file that contains a complete web page and it is created by an Internet browser through the "File/Save" commands.

Using "crunch.exe" removes the chore of copying and pasting from a web page to a text file. Just save the web page in ".mht" format, and then use crunch. The output appears in the file "outZ.pgn". The original input ".mht" file is unchanged.

"crunch.exe" does the same for the simpler ".html" file.





Hello Norm,

Thanks for yet another free tool.

(a) Are you going to eventually include this one in your pgn toolkit that Jim makes available on his site?

(b) Will this software extract multiple pgn games? I mean, if a web page has 10 games, will this extract all ten as 10 different games?

Later.

Ps. Any ideas about truncuating a pgn file from the end to create mate in one, two etc. puzzles? Many free pieces of software including yours and Yace can truncuate from the beginning. The end is a challenge...

Re: Extract pgns from an ".mht" file

PostPosted: 16 May 2007, 02:02
by Norm Pollock
Roger Brown wrote:
Hello Norm,

Thanks for yet another free tool.

(a) Are you going to eventually include this one in your pgn toolkit that Jim makes available on his site?

(b) Will this software extract multiple pgn games? I mean, if a web page has 10 games, will this extract all ten as 10 different games?

Later.

Ps. Any ideas about truncuating a pgn file from the end to create mate in one, two etc. puzzles? Many free pieces of software including yours and Yace can truncuate from the beginning. The end is a challenge...


Hi Roger,

I hope to start a second collection package with new tools, if I can. If I cannot, then I'll eventually put this one into the existing package. Hopefully though it will be the first one in the new package. But we'll see.

Certainly "crunch" will extract multiple pgn games from a single ".mht" file. That's one of its main attributes. Maybe I didn't make that clear.

I'll pm you about the suggestion for a new tool.

cheers,

Norm