Presentation Screenshots Download Support Development Forum    
   

Welcome to the Community Forum.

Here you can discuss with other users or with the author, suggest new features, report bugs, ask for filters creation or correction, etc. Select the forum you wish to read or post below :

Forum
Forum > Development & Bug report > [Fixed in r72?] Filter Issues

Pages : [1] Add a reply
User info [Fixed in r72?] Filter Issues
onetroubledguy
Avatar
Feb 15 2010, 7:30 pm
Not sure about the current status of ASF but here goes:

I'm having some major issues with getting any of the advanced filters to work. The simple filters work just fine, but anytime I try an advanced filter it either doesn't work or saves it to a folder not defined by anything at all (even default). It's rare for the latter to occur but it tries to save to "C:\Users\Administrator\My Documents\My Downloads" for no apparent reason. Is that even a standard windows folder? I know "C:\Users\Administrator\Downloads" is normal, but don't recall one inside "My Documents".

Your filter:

/^(.*?:\/\/)?(addons.mozilla.org)\/([^\/]+)\/

I tried this from one of your previous posts just for kicks. I first ask you, was this with or without regexp checked? If checked, shouldn't it end with a double "//" (instead of a single "/"? If not checked, shouldn't the first "/" be removed? It would be nice if that requirement (referring to "/" at beginning and end) was removed altogether or just added automatically without being shown. All it does is cause confusion when used with certain filters, at least in my case it does.

Another minor question...your screenshot starts with a "/" but Regexp is not checked. Mine does not allow me to save any filter starting that way unless checked, which is totally expected. When I do try it, however, it automatically unchecks Regexp, despite still being saved in that form. You may have simply typed it out for demonstration purposes without actually using it. If that's the case then I just wasted 5 seconds of our lives typing this paragraph =[

I tried to save a file to the location "Desktop\$1d" but it saves quite literally as "$1d". I'm probably missing some Monday detail (<3 Office Space), but any ideas?
Post #1
Edit
Cyan
Avatar
Feb 15 2010, 10:04 pm
Hi,

"C:\Users\Administrator\My Documents\My Downloads" is a correct folder for Firefox (sometime even on Desktop\downloads).
It depend the OS I think. this folder is used by the download manager, when Folderlist is set to 1 ("Downloads" folder) and Firefox is set to "useDownloadFolder=true" in about:config, or if the filter doesn't return a real folder (ex., writing Desktop, instead of C:\users\name\Desktop), or creating incorrect regular expression.


I don't know why the Advanced filters are not working for you, I think you may be doing something wrong. Let's check it :

^(.*?:\/\/)?(addons.mozilla.org)\/([^\/]+)\/

I typed this one without the first and ending slash / to make it easier to read here on the forum (I should have and will add it to the post).
You are right, if you check the regexp box, it should be :
/^(.*?:\/\/)?(addons.mozilla.org)\/([^\/]+)\//
with 2 // at the end, I tried it, I found a bug sweat
The final / is not added because he already found one, that must be why you have an error.
If you type it manually, after checking the regexp box, it stays correctly.

I just try it, it seems this filter is not working (I stated it on the other topic, I didn't test it first).
It looks like the capturing parentheses and the dynamics doesn't work when the filter fallback to the current website domain.
I'll have to fix it in a next release.


I understand that the / at the beginning and the end is confusing, but I need it to create/recognize regular expression.
Though, it can be another character, like ~ or #
I left / because it's the commonly used in scripting languages. maybe I should change it ? maybe when I will use database I could get rid of it completely, that would be easier for everyone.


When you say : your screenshot starts with a "/"
Which screenshot are you referring to ?
Maybe I made a screenshot (for demo) and written incorrectly the filter.
If that the case, I'm sorry, and I would like to resubmit a new screenshot to prevent other user being confused.


You tried saving a file using this : "Desktop\$1d"
But what filter did you use ?
First, Desktop is not correct, you should point to the real desktop folder (with C:\etc.)
Second, if you use $1d, your filter must contains parenthesis in the domain.
If you did try with the above filter, sorry it's not working, try another filter.


And finally, you said no Advanced filters were working for you.
Did you try "easier" regular expression filters ?
like
Filters Domain
All    
= Regexp.
File name
All    
= Regexp.
Local folder

To capture either zip or rar files using the same filter.
if you want, you can even use $1f in the folder to create a sub-folder according to the found extension.




I guess I will really have to create a webpage for testing filters, with given filename and hosted domain name.

Post #2
Edit
onetroubledguy
Avatar
Feb 16 2010, 4:23 am
Hey,

Thanks for the informative reply. It should prove very useful to me and clear up some issues when I get around to toying with it. The screenshot was from one of the posts here in the bug section, where you wrote a small tutorial explaining advanced filtering. And yeah, I'm being incredibly lazy by not pasting the link for you. It's easy enough to find though.

Yeah, when I said "Desktop" I meant "C:\Users\Administrator\Desktop". I did troubleshoot by starting with the simplest form of the filter like you suggested and extended that until an issue would arise. Sometimes it worked and sometimes it didn't - just depended on the filter...

Well, let me take in your suggestions and play around with it for a bit. I'll get back to you and see what I was able to figure out. Thanks again and I look forward to seeing this addon develop further =]
Post #3
Edit
Cyan
Avatar
Feb 16 2010, 9:15 am
I didn't find a screenshot with a regular expression.
Maybe you talk about the "filters" box, which is dynamically created with the "Filter" "/filter" bbcode.

But there isn't any starting with a / either.


I will work on correcting and improving regexp. in future release.
Post #4
Edit / Delete
Pages : [1] Add a reply

Return to top