View Single Post
Quote:
Originally Posted by oleandros
It looks like the Ad Blocking uses regular expressions (like Firefox's AdBlock) so could there be a way to import a block list (like Filterset.G) to Omniweb so one doesn't have to add them one at a time?
Well, if you aren't scared of the command line, I wrote a quick and dirty script in perl to do it. http://fourohfour.info/stuff/owbli.pl.zip

Edit: This doesn't work. At least, not with Filterset.G. See next post.

Now, before I begin... This isn't even alpha-quality. It works for me. It might eat your cat. If it breaks, you get to keep the pieces. Don't blame me.

Download and decompress that, and stick it somewhere easy like Home.
Download the latest Filterset.G http://www.pierceive.com/filtersetg/ (2006-04-06a.txt currently) and stick it in the same place.

Quit OmniWeb.

In Terminal, run ./owbli.pl -x blocklist-backup.txt
This will create a backup of your current blocklist.

WARNING: The following command will delete your current blocklist! It will delete your current whitelist if the file you are importing has whitelist entries!
In Terminal, run ./owbli.pl -di 2006-04-06a.txt
(replacing the filename with the version of Filterset.G you downloaded)

There is currently no duplicate checking. If you know the file you are about to import does not duplicate anything that is currently in OmniWeb, you can omit the -d flag and the new entries will be added without deleting the existing ones. Just don't import a Filterset.G this way if you already have an older Filterset.G imported... I'd hate to think what so many duplicates would do to OmniWeb. No, I haven't tested it.

Last edited by FourOhFour; 2006-05-05 at 04:39 PM..