Register
It is currently Sat Apr 19, 2014 4:26 pm

script to create Opera filters

View active topics

All times are UTC + 12 hours


Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 51 posts ]  Go to page 1, 2, 3, 4, 5, 6  Next
Author Message
 PostPosted: Thu Apr 07, 2011 11:53 pm  Reply with quote Report this post 

Joined: Fri Mar 25, 2011 11:11 pm
Posts: 256
I created a perl script that generates Opera urlfilter and a CSS with a hiding rule from ABP list.
https://gitorious.org/adblock-latvian/adblock-latvian/blobs/master/tools/createOperaFilters.pl

Usage:
Code:
perl createOperaFilters.pl subscription.txt

It outputs urlfilter.ini and element-filter.css in the directory of the input file, unless different filenames are specified.

    Options:
  • --nocss - don't create element-filter.css
  • --nourlfilter - don't create urlfilter.ini
  • --urlfilter filename - specify urlfilter filename
  • --css filename - specify CSS filename
  • --addcustomcss filename1 filename2 filenameN - specify custom CSS file(s) to combine with converted CSS file
  • --new - use new syntax
  • --nocomments - don't put comments in generated files
  • --everythingisfirstparty - parse third party filters as first party filters
  • --ignorewhitelist - don't parse whitelists
  • --help - brief help message



My perl skills are below weak, so please don't laugh.

_________________
Latvian List maintainer


Last edited by anonymous74100 on Sat Oct 13, 2012 11:15 pm, edited 20 times in total.

Top
 Profile Send private message WWW  
 PostPosted: Fri Apr 08, 2011 12:03 am  Reply with quote Report this post 
Site Admin
User avatar

Joined: Fri Jan 09, 2009 12:46 pm
Posts: 14445
How does it find differences between *.ads.server.com/* and http://ads.server.com/* ?

_________________
Note: All new Adblock filters are now merged into Easylist (merged), see information on merger


Top
 Profile Send private message  
 PostPosted: Fri Apr 08, 2011 12:18 am  Reply with quote Report this post 

Joined: Fri Mar 25, 2011 11:11 pm
Posts: 256
It doesn't convert those filters, they get outputted unchanged.

_________________
Latvian List maintainer


Top
 Profile Send private message WWW  
 PostPosted: Fri Apr 08, 2011 12:38 am  Reply with quote Report this post 
Site Admin
User avatar

Joined: Fri Jan 09, 2009 12:46 pm
Posts: 14445
I dont know if i'd trust a script to convert lists over, the 2 platforms are very different. Esp when whitelists, and adblock plus filters and top-level domains are involved, very good effort though!

_________________
Note: All new Adblock filters are now merged into Easylist (merged), see information on merger


Top
 Profile Send private message  
 PostPosted: Fri Apr 08, 2011 12:44 am  Reply with quote Report this post 

Joined: Fri Mar 25, 2011 11:11 pm
Posts: 256
Actually I'm not using it myself, too many bugs.

_________________
Latvian List maintainer


Top
 Profile Send private message WWW  
 PostPosted: Fri Apr 08, 2011 12:46 am  Reply with quote Report this post 
Site Admin
User avatar

Joined: Fri Jan 09, 2009 12:46 pm
Posts: 14445
yeah, basically you'd have to double up with all the filters just to be sure..

||ads.server.com -> http://ads.sever.com and http://*.ads.server.com/* (assuming you're not checking for https)

_________________
Note: All new Adblock filters are now merged into Easylist (merged), see information on merger


Top
 Profile Send private message  
 PostPosted: Fri Apr 08, 2011 1:51 am  Reply with quote Report this post 

Joined: Fri Mar 25, 2011 11:11 pm
Posts: 256
fanboy wrote:

Do you know how to do that :?:

_________________
Latvian List maintainer


Top
 Profile Send private message WWW  
 PostPosted: Fri Apr 08, 2011 8:20 am  Reply with quote Report this post 
Site Admin
User avatar

Joined: Fri Jan 09, 2009 12:46 pm
Posts: 14445
I'd basically double the size of the list doing that way, not really fast

_________________
Note: All new Adblock filters are now merged into Easylist (merged), see information on merger


Top
 Profile Send private message  
 PostPosted: Sat Apr 16, 2011 3:22 am  Reply with quote Report this post 

Joined: Wed Mar 03, 2010 4:49 pm
Posts: 175
I prefer your current method, manually curating a list to deal with how Opera works.


Top
 Profile Send private message  
 PostPosted: Thu Jun 09, 2011 1:34 am  Reply with quote Report this post 

Joined: Fri Mar 25, 2011 11:11 pm
Posts: 256
I finished the script! :D

Although I might have used too much loops. :think:

I'm not sure if I should use it :?

_________________
Latvian List maintainer


Top
 Profile Send private message WWW  
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 51 posts ]  Go to page 1, 2, 3, 4, 5, 6  Next

All times are UTC + 12 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style originally created by Volize © 2003 • Redesigned SkyLine by MartectX © 2008 - 2010