473,808 Members | 2,838 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Tool needed: to strip some HTML

G'day

I have some pages written by a bot and much of the code does not
concern the visible content on the site. I'd like to strip all the
codes that do not affect or influence the visible stuff (although I'd
like to keep the nested tables, if possible). Some of this can be
stripped using Search/Replace, but some of it contains codes which
differ from page to page.

How many pages? About 750, totalling 80 megabytes of data, which I'm
hoping to reduce when I "clean" the code.

Do you know of any tool that can do this? A tool that can be set to
strip all codes except HTML 2.0 would, for example, also be useful
except I'll lose the nested tables (which is not a *gigantic*
loss...).

I tried converting everything to TXT but most HTML2TXT programs
deliver very poor results. I did find some code strippers that
attempt to maintain the tables layout (but that is even less
preferred). If the stuff is gonna be in plaintext, then there should
be an intelligent way of dealing with nested tables.

Any advice, people? What tool can you recommend? Preferably for W95x
(but Linux would be fine too as long as it is newbie-friendly),
preferably freeware (or shareware, but I don't intend buying).
Jul 20 '05 #1
16 2183
On Wed, 07 Apr 2004 02:34:39 -0700, Voetleuce en f?nsievry wrote:
Any advice, people? What tool can you recommend?


If you only knew Perl...

--

..

Jul 20 '05 #2
On 7 Apr 2004 02:34:39 -0700, Voetleuce en f?nsievry
<ca******@websu rfer.co.za> wrote:
G'day

I have some pages written by a bot and much of the code does not
concern the visible content on the site. I'd like to strip all the
codes that do not affect or influence the visible stuff (although I'd
like to keep the nested tables, if possible). Some of this can be
stripped using Search/Replace, but some of it contains codes which
differ from page to page.

How many pages? About 750, totalling 80 megabytes of data, which I'm
hoping to reduce when I "clean" the code.

Do you know of any tool that can do this? A tool that can be set to
strip all codes except HTML 2.0 would, for example, also be useful
except I'll lose the nested tables (which is not a *gigantic*
loss...).


HTML Tidy might help a lot. It can be set to 'clean' the pages, it will
then drop all presentational markup.

http://tidy.sf.net/

--
Rijk van Geijtenbeek

The Web is a procrastination apparatus:
It can absorb as much time as is required to ensure that you
won't get any real work done. - J.Nielsen
Jul 20 '05 #3
"Voetleuce en f?nsievry" <ca******@websu rfer.co.za> a écrit dans le
message de news:f0******** *************** ***@posting.goo gle.com
I have some pages written by a bot and much of the code does not
concern the visible content on the site. I'd like to strip all the
codes that do not affect or influence the visible stuff (although I'd
like to keep the nested tables, if possible). Some of this can be
stripped using Search/Replace, but some of it contains codes which
differ from page to page.


Can you give an URL for a sample ? The answer will depend on where the text
to delete is located in your HTML pages...

Jul 20 '05 #4
Voetleuce en f?nsievry <ca******@websu rfer.co.za> wrote:
Any advice, people? What tool can you recommend? Preferably for W95x
(but Linux would be fine too as long as it is newbie-friendly),
preferably freeware (or shareware, but I don't intend buying).


Any example?

--
William Park, Open Geometry Consulting, <op**********@y ahoo.ca>
Linux solution/training/migration, Thin-client
Jul 20 '05 #5
"Pierre Goiffon" <pg******@nowhe re.invalid> wrote in message news:<40******* *************** *@news.free.fr> ...
"Voetleuce en f?nsievry" <ca******@websu rfer.co.za> a écrit dans le
message de news:f0******** *************** ***@posting.goo gle.com
I have some pages written by a bot and much of the code does not
concern the visible content on the site. I'd like to strip all the
codes that do not affect or influence the visible stuff (although I'd
like to keep the nested tables, if possible). Some of this can be
stripped using Search/Replace, but some of it contains codes which
differ from page to page.

Can you give an URL for a sample ? The answer will depend on where the text
to delete is located in your HTML pages...


True. Here goes:
http://leuce.com/translate/tempfile/22265.html (100 kb)
http://leuce.com/translate/tempfile/22265.zip (30 kb)

These files are Yahoo group message files from a mailing list group we
have, but you see, Yahoo's message search feature is rubbish and we'd
like to make the archive of old messages available for new members so
that they can *search* the old messages and not ask the same questions
over and over again.

The file for download mentioned above is from a guest login, but the
files I have are logged in which means the e-mail addresses show up
(we'll remove these manually later).

Any thing to reduce the fluff would be nice. We're considering
putting the messages on a web site for Google to index (which would be
*excellent*) but our bandwidth bill will kill us at present.

TIA.
Jul 20 '05 #6
"Pierre Goiffon" <pg******@nowhe re.invalid> wrote in message news:<40******* *************** *@news.free.fr> ...
"Voetleuce en f?nsievry" <ca******@websu rfer.co.za> a écrit dans le
message de news:f0******** *************** ***@posting.goo gle.com
I have some pages written by a bot and much of the code does not
concern the visible content on the site. I'd like to strip all the
codes that do not affect or influence the visible stuff (although I'd
like to keep the nested tables, if possible). Some of this can be
stripped using Search/Replace, but some of it contains codes which
differ from page to page.

Can you give an URL for a sample ? The answer will depend on where the text
to delete is located in your HTML pages...


True. Here goes:
http://leuce.com/translate/tempfile/22265.html (100 kb)
http://leuce.com/translate/tempfile/22265.zip (30 kb)

These files are Yahoo group message files from a mailing list group we
have, but you see, Yahoo's message search feature is rubbish and we'd
like to make the archive of old messages available for new members so
that they can *search* the old messages and not ask the same questions
over and over again.

The file for download mentioned above is from a guest login, but the
files I have are logged in which means the e-mail addresses show up
(we'll remove these manually later).

Any thing to reduce the fluff would be nice. We're considering
putting the messages on a web site for Google to index (which would be
*excellent*) but our bandwidth bill will kill us at present.

TIA.
Jul 20 '05 #7
Vigil <me@privacy.net > wrote in message news:<pa******* *************** ****@privacy.ne t>...
On Wed, 07 Apr 2004 02:34:39 -0700, Voetleuce en f?nsievry wrote:
Any advice, people? What tool can you recommend?

If you only knew Perl...


I have a Perl interpreter installed here... :-)
Jul 20 '05 #8
Vigil <me@privacy.net > wrote in message news:<pa******* *************** ****@privacy.ne t>...
On Wed, 07 Apr 2004 02:34:39 -0700, Voetleuce en f?nsievry wrote:
Any advice, people? What tool can you recommend?

If you only knew Perl...


I have a Perl interpreter installed here... :-)
Jul 20 '05 #9
"Pierre Goiffon" <pg******@nowhe re.invalid> wrote in message news:<40******* *************** *@news.free.fr> ...
Can you give an URL for a sample ? The answer will depend on where the text
to delete is located in your HTML pages...


SORRY! WRONG URL! Here's the correct ones:

http://leuce.com/tempfile/22265.html (100 kb)
http://leuce.com/tempfile/22265.zip (30 kb)
Jul 20 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
3257
by: Jason | last post by:
Hi, I am trying to make a php script to calculate the shiping charge automatically by communicating to UPS online tool. In order to do that, I used: 1. XML-RPC implemented by Keith Devens http://www.keithdevens.com/software/xmlrpc/ 2. PHP Version 4.3.3 w/ '--with-openssl' 3. The code below is for testing to see if I can communicate to UPS;
6
3029
by: d.warnermurray | last post by:
I am doing a project for school that involves creating help files for a html authoring tool. If you could help me with answers to some questions it would really help. 1. What tasks do you expect an html authoring tool to help you accomplish? 2. What do you expect from online help for a html authoring tool? 3. What audience do you think a freeware html authoring tool is directed towards?
1
1277
by: ric.castagna | last post by:
Greetings, all... I've got an issue that I'm trying to solve and RegExp looks to be my only avenue. Background: We are using a popular third party control for input into a textarea. By default, the text is HTML but the UI does not display the HTML tags. Because we are using this in a web-messaging scenario, the user may choose to send their message in plain text and we want to display that on the screen.
3
2429
by: Michal A. Valasek | last post by:
Hello, I want to transform text with HTML markup to plain text. Is there some simple way how to do it? I can surely write my own function, which would simply strip everything with < and >. But if someonew has already written something similar for .NET, I would prefer more clever solution, which would try to retain original layout, at least paragraphs, hyperlinks etc - something like Outlook does when changing HTML to plain text.
5
2624
by: Craig Buchanan | last post by:
I need to strip the ()- and spaces from a telephone number. What is the regular express pattern for this? "\(\)-"? thanks
10
3135
by: Adam Honek | last post by:
Hi all, Controls such as the tree view or list view use image lists hence I can set the quality of icons to 32bit. This way they look their best. Unfortunately both the menu and tool bar strip control don't use image lists. How can I still achieve 32bit icon quality (icons are natively 32bit) in these controls? I don't see any such property in either of them.
4
2563
by: Adam Honek | last post by:
Hi all, The tool strip control is set to flow layout, no autosize and to anchor top, left. When the form is maximized all the icons and text fit in one line across the screen. The menu strip stays with the default height causing there to be a space from left to right under all icons.
4
3041
by: Steve | last post by:
Hi, I'm a complete PHP n00b slowly finding my way around I'm using the following function that I found on php.net to strip out html and return only the text. It works well except for when you find styles embedded within the tags eg: <h3 id="pageName">Have a great day!! </h3> This throws an error, whereas <h3 >Thank you for your purchase! </h3works like a charm. It also falls over when crappy code has <h3>&nbsp;</h3between the tags.
1
1165
by: tc | last post by:
I have an app with a main form. On this form I have a tab page, 4 tabs. All this is fine. On tab one I have a couple of grids and buttons etc, and a tool strip at the top of the tab section. This is fine. On tab two I have anothe grid, some more buttons, and another tool strip, again at the top of the tab section. But, this tool strip vanishes as soon as I take focus away from it. If I click it again in the components area at the...
0
9721
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9600
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10628
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10374
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6880
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5547
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5685
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3859
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3011
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.