|
doses
Obsessive Purist



Registered: 11/21/10
Posts: 1,049
Last seen: 9 years, 5 months
|
Searching Saved HTMLs
#13996866 - 02/20/11 05:42 PM (12 years, 11 months ago) |
|
|
If I have a massive amount of saved HTMLs in a few different folders, is there any way to search the text they contain? It would be okay if I had to search each folder individually. I just have no way of finding what they contain now because the file names are just randomized numbers and there are far too many to retitle manually. Thatnk.
|
daytripper05
Psychonaut




Registered: 10/30/06
Posts: 6,962
Loc: In my garden
|
Re: Searching Saved HTMLs [Re: doses]
#14000729 - 02/21/11 11:25 AM (12 years, 11 months ago) |
|
|
If your OS doesn't handle the level of searching you desire or can't find a program to do it, you will likely to need to write a script to parse the contents by looping through all the files in a directory, performing a regular expression leaving you with only the content you desire, and handling the result with various conditional statements. Any real programming language should do the trick. The hardest part with be up to on what you are doing with the HTML within the files. Are you stripping it to reveal only the contents, or are you some how using the HTML be apart of the content?
HTML merely gives context to content inside the tags so a machine can better understand the humans intent. So to search the content, you should be able to remove the HTML, only to be left with the stuff that matter. You could parse out heads, footer and particular tags you don't need. Once the markup is stripped, you could save it to a database record and do real queries within it. There are a lot of ways to do what you are after, none of which I know how to do without writing a script. I am sure there is some program, but I don't know about it.
|
doses
Obsessive Purist



Registered: 11/21/10
Posts: 1,049
Last seen: 9 years, 5 months
|
|
|
frith
God

Registered: 10/27/09
Posts: 7,512
Loc: Philadelphia, PA
|
Re: Searching Saved HTMLs [Re: doses]
#14001385 - 02/21/11 01:21 PM (12 years, 11 months ago) |
|
|
what OS do you use?
--------------------
|
doses
Obsessive Purist



Registered: 11/21/10
Posts: 1,049
Last seen: 9 years, 5 months
|
Re: Searching Saved HTMLs [Re: frith]
#14001481 - 02/21/11 01:33 PM (12 years, 11 months ago) |
|
|
Windows 7
|
daytripper05
Psychonaut




Registered: 10/30/06
Posts: 6,962
Loc: In my garden
|
Re: Searching Saved HTMLs [Re: doses]
#14001684 - 02/21/11 02:03 PM (12 years, 11 months ago) |
|
|
Grep is an extremely powerful tool and could likely do what you are looking for, but I am not too familiar with advanced grep syntax. Grep is on Linux and like systems.
|
frith
God

Registered: 10/27/09
Posts: 7,512
Loc: Philadelphia, PA
|
|
doesnt Win7 have an indexing type search like OSX or Linux? i find that odd that it wouldnt be in there. its pretty much a standard feature nowadays.
--------------------
|
daytripper05
Psychonaut




Registered: 10/30/06
Posts: 6,962
Loc: In my garden
|
Re: Searching Saved HTMLs [Re: frith]
#14002097 - 02/21/11 03:08 PM (12 years, 11 months ago) |
|
|
I thought they did because like you said, it's standard these days.
I figured he would be able to search the contents just fine with Windows search.
|
CosmicJoke
happy mutant



Registered: 04/05/00
Posts: 10,848
Loc: Portland, OR
|
|
depending on where the folders are stored, may have to add them to be indexed (somewhere in control panel, poke around for it)
-------------------- Everything is better than it was the last time. I'm good. If we could look into each others hearts, and understand the unique challenges each of us faces, I think we would treat each other much more gently, with more love, patience, tolerance, and care. It takes a lot of courage to go out there and radiate your essence. I know you scared, you should ask us if we scared too. If you was there, and we just knew you cared too.
|
|