FoxTrot Search Forum
FoxTrot Search for macOS Forum

Home » Public Forums » FoxTrot Search User Forum » Searching html page source
Searching html page source [message #681] Sat, 03 February 2018 15:27 Go to next message
khw77
Messages: 3
Registered: August 2017
Junior Member
Hi - is there an option for searching an html file as text rather than in
its rendered form? In other words, searching the html source code itself
rather than how it appears in a browser?
For example, if I have a string in an html file, I
would like to be able to search for "example" and show the html files in
which it appears. FoxTrot Pro v6 doesn't seem to be able to do that.
Thanks, Keith
Re: Searching html page source [message #682 is a reply to message #681] Sat, 03 February 2018 16:27 Go to previous messageGo to next message
FoxTrot Engineering
Messages: 376
Registered: April 2020
Senior Member
khw77 wrote:

> Hi - is there an option for searching an html file as text rather than in
> its rendered form?

No.

However, there is a hidden preference that allows *indexing* html in raw text form instead of rendered form. This implies that you won't be able to search rendered html text anymore. And this is a global option (and not a per index one).

To enable it, quit FoxTrot, copy and paste the two following lines to a Terminal.app window, then relaunch FoxTrot, and rebuild your index.

defaults write com.ctmdev.foxtrot Aliases -array-add \
"{type='html'; as='txt';}"

To reset the default behavior, copy and paste this command, and rebuild your index:

defaults delete com.ctmdev.FoxTrot Aliases


Jérôme - CTM Engineering


------------------------------------------------------------ ---------
"I searched for words inside text documents and was pleasantly surprised
when those words were highlighted in the respective text, if viewed in
the preview drawer."
FoxTrot Personal Search review on www.softpedia.com

Download a demo version from www.foxtrot.ch
------------------------------------------------------------ ---------


Jérôme - FoxTrot Engineering
Re: Searching html page source [message #683 is a reply to message #681] Sat, 03 February 2018 21:01 Go to previous message
khw77
Messages: 3
Registered: August 2017
Junior Member
Many thanks for the quick reply and solution.

It would be fantastic to have the option to search html as text on a
per-index basis. That way I could set up a separate indexes for rendered
html and raw html. Would you be able to give this some consideration
please?



On Saturday, 3 February 2018 14:27:38 UTC, khw77 wrote:
>
> Hi - is there an option for searching an html file as text rather than in
> its rendered form? In other words, searching the html source code itself
> rather than how it appears in a browser?
> For example, if I have a string in an html file,
> I would like to be able to search for "example" and show the html files in
> which it appears. FoxTrot Pro v6 doesn't seem to be able to do that.
> Thanks, Keith
>
Previous Topic: More control on how modified files are updated
Next Topic: No search window
Goto Forum:
  


Current Time: Thu Feb 22 06:36:44 GMT+1 2024