View previous topic :: View next topic |
Author |
Message |
Guest
|
Posted: Fri Oct 31, 2003 Post subject: What is the correct format to import filters? |
|
|
I have tried copying Aaron Spuler's list of filters to Notepad and then saving the file. When I try to import the file into Adblock I get a file not valid error message. What is the best way of getting a list such as this into Adblock?
Regards,
Nick |
|
Back to top |
|
 |
Aaron Spuler QA Testing
Joined: 23 Oct 2003 Posts: 19
|
Posted: Fri Oct 31, 2003 Post subject: |
|
|
Here's what I do when I'm using that filter list and not at home. I copy the link location for the filter list, then open adblock, and select import filters, and then past the link location into the file field and it works ok for me. Here's the direct link for the filter: http://www.txstate.edu/~as1130/themes/adblock.txt |
|
Back to top |
|
 |
rue Developer
Joined: 22 Oct 2003 Posts: 752
|
Posted: Fri Oct 31, 2003 Post subject: |
|
|
Aaron:
Unfortunately, that solution is os-specific -- link-locations can't be used that way on the mac.
.
If someone could post a copy of the non-importable file(s), I'd be happy to land a patch. |
|
Back to top |
|
 |
Guest
|
Posted: Fri Oct 31, 2003 Post subject: |
|
|
I'm on WinME and that does not work either. I get the message "c:\http://www.txstate.edu/~as1130/themes/adblock.txt The above name is invalid".
I have tried highlighting the section on Aaron's site, then right clicking, Save Frame as ... which saves the frame as adblock.txt by default. Trying to import this also gives a file not valid error message.
If I right click on the link above and choose save link to disk, I get another error message saying "The link could not be saved. The web page might have been removed or had its name changed"
At this point I am stumped. More help would be appreciated.
Nick |
|
Back to top |
|
 |
Aaron Spuler QA Testing
Joined: 23 Oct 2003 Posts: 19
|
Posted: Fri Oct 31, 2003 Post subject: |
|
|
wierd, maybe try to select all the text, and then copy and paste into a text file and then try to import it? i don't know....
http://www.cs.swt.edu/~as1130/themes/adblock.txt is the direct link to my filter file... |
|
Back to top |
|
 |
rue Developer
Joined: 22 Oct 2003 Posts: 752
|
Posted: Fri Oct 31, 2003 Post subject: |
|
|
Aaron:
Just to clarify: I'm not sure you realized you posted two different links. The first only linked to an error-page.
.
Could you zip + post a notepad file for me? I'd like to test the linebreaks-issue again. |
|
Back to top |
|
 |
Aaron Spuler QA Testing
Joined: 23 Oct 2003 Posts: 19
|
Posted: Sat Nov 01, 2003 Post subject: |
|
|
Sent you the filter zip via email I didn't realize the first link was bad... i left off the ".cs." -- should have been http://www.cs.txstate.edu/~as1130/themes/adblock.txt
To be quite honest, the names swt.edu and txstate.edu are synonomous -- my school changed names from Southwest Texas State University to Texas State University. In December the swt.edu domain will no longer be valid. I need to get in the habit of using txstate.edu.  |
|
Back to top |
|
 |
dze27 Guest
|
Posted: Sat Nov 01, 2003 Post subject: Weird |
|
|
I had this problem too. I was getting File Not Valid after I saved the adblock.txt file on your web site and tried to import that. Then, I exported my existing (empty) file, opened it in a text editor, and copied and pasted the entire contents of the saved adblock.txt file into it, imported that (i.e. the file I just exported) and that worked. Weird.... Anyway it's working now, sweet!
This happened both at home and at work so it's not my imagination.
A problem with the line separator characters, I wonder? I'm on Win2K. |
|
Back to top |
|
 |
Guest
|
Posted: Sat Nov 01, 2003 Post subject: |
|
|
dze27's work around method worked this morning. I had to edit the line which was imported where I pasted the text, but otherwise OK. It looks like there is a problem in this area.
As a question on the same theme, but perhaps needing a new thread, as adblock says it can use regular expressions, there is a much more comprehensive list of ad sites here. Would this work with adblock or does it need re-formatting? |
|
Back to top |
|
 |
rue Developer
Joined: 22 Oct 2003 Posts: 752
|
Posted: Sat Nov 01, 2003 Post subject: |
|
|
Guest:
That list would only need minor modification:
.1. the first line must read "[Adblock]" and nothing else
.
2. every regular-expression (ie. all other lines) must begin and end with the forward-slash '/', which means..
.
3. all pre-existing forward-slashes must be turned into literals. just search+replace '/' with '\/'. |
|
Back to top |
|
 |
Guest
|
Posted: Sat Nov 01, 2003 Post subject: |
|
|
Rue, thanks for your reply. I may try and give it a go, but I'm going to have to write some sort of program to do it. It is easy to do the changes you suggest but the results look a little odd. The problem is saving the file. If I save it as a text file from something like notepad, it imports incorrectly into adblock, as notepad saves files with <cr> <lf> as an end of line marker. Adblock does not strip out the <cr> character when it imports the file. |
|
Back to top |
|
 |
Guest
|
Posted: Sun Nov 02, 2003 Post subject: |
|
|
Rue, I tried editing the list as you suggested. but it blocked every image at http://www.ntlworld.com which is incorrect. It did not do that for the program the list was originally compiled for (AdExtinguisher) so it looks like the lists are not directly transferrable. I just thought the list would be a good starting point but I do not understand regular expressions or the blocking method enough to convert the list.
Nick |
|
Back to top |
|
 |
rue Developer
Joined: 22 Oct 2003 Posts: 752
|
Posted: Sun Nov 02, 2003 Post subject: |
|
|
Nick:
The list was full of "half-regular" expressions -- a simplified notation was aberrantly mixed in. Additionally, there were a few spaces in the expressions.
.
AdExtinguisher might have been tolerant, but Adblock is not.
.
Here's a repaired copy of your list -- formatted + tested, including for the site you gave. |
|
Back to top |
|
 |
Guest
|
Posted: Sun Nov 02, 2003 Post subject: |
|
|
Rue,
That's what I call service. Thanks. If I post again I'll register properly.
Nick |
|
Back to top |
|
 |
dipa Guest
|
Posted: Tue Nov 04, 2003 Post subject: you might try dos to unix conversion |
|
|
I suspect that Windows users might notice it more frequently. I used DOS->UNIX conversion of Ultraedit once when I compiled a list from Mozillazine forum. Then I added the "[Adblock]" header and I was able to import the list. Before doing that, I was getting the "invalid" message. |
|
Back to top |
|
 |
rue Developer
Joined: 22 Oct 2003 Posts: 752
|
Posted: Wed Nov 05, 2003 Post subject: |
|
|
Since Sunday, "List Import" has used regexp to learn a file's linebreak-structure.
.
It should work universally, now.
.
The Dev. page always links to the latest nightly |
|
Back to top |
|
 |
Guest
|
Posted: Wed Nov 19, 2003 Post subject: Totally lost.... |
|
|
Could someone give me a hand here?
I've tried all the solutions on here and no matter what I always get the "File Not Valid" error. Got any ideas?
Or could one of you just make the right file to import? On windoze, and tried both Aaron's and the guest_translater_filters.txt files. |
|
Back to top |
|
 |
rue Developer
Joined: 22 Oct 2003 Posts: 752
|
Posted: Wed Nov 19, 2003 Post subject: |
|
|
Guest:
Which version of windows? |
|
Back to top |
|
 |
Guest
|
Posted: Wed Nov 19, 2003 Post subject: |
|
|
98 SE |
|
Back to top |
|
 |
NJH
Joined: 13 Nov 2003 Posts: 183 Location: Hampshire, England
|
Posted: Wed Nov 19, 2003 Post subject: |
|
|
I was the guest who started this thread. I used dze27's suggestion above and it worked for me. I created a dummy line with something like ZZZZZ in the current file then exported it. I inserted the new text before the ZZZZZ entry and then saved and imported the file. I think I only had to sort out the last line which was corrupt
One thing which sort of fell out of this via another thread was that I had downloaded on old version of AdBlock from texturizer.net. I believe rue has done some work on his latest nightlies to sort out some of the issues with importing files such as end of line delimiters which I think I may have been facing.
Last edited by NJH on Sat Aug 14, 2004; edited 1 time in total |
|
Back to top |
|
 |
|