Addon Release: Filter by Field 2.1

All new Coranto Addons, updates and patches to addons, will be released here...also, get support for addons within!

Moderators: Spunkmeyer, Dale Ray, SrNupsen, Bluetooth, Jackanape

Addon Release: Filter by Field 2.1

Postby Parahead » Thu Sep 16, 2004 7:03 am

Addon description:
This addon allows newsitems to be filtered by the contents/values of a selected Field or Fields. The extra filtering options are found in each Profile configuration page. This version has been updated to allow regular expression filtering.

Confirmed to work with Coranto versions 1.24 and 1.30.3 but should of course work with older versions as well.

The addon is closed source but is released by Parahead with permission from Sumaleth, the original author.

Download here!
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Postby Von Snellfharer » Fri Sep 17, 2004 5:24 pm

Is this addon compatible with the built in sort by number in CR?
Von Snellfharer
________________________________________
last of the fullgrown men
User avatar
Von Snellfharer
 
Posts: 255
Joined: Fri Jun 21, 2002 8:03 am
Location: Semi arctic

Postby Parahead » Fri Sep 17, 2004 5:36 pm

Von Snellfharer wrote:Is this addon compatible with the built in sort by number in CR?
Yes, if you by CR mean Coranto? I haven´t run into any problems anyway... Have you have used FBF 2.0 without problems the 2.1 does nothing new in that sense.
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Postby Von Snellfharer » Mon Sep 20, 2004 10:43 am

OK. Long version:

If you sort by number in Coranto (phonetically shortened CR) and then set it to sort by some field, you might end up with nothing in the file because CR first sorts by number and the looks for the sort-field.

Is this avoided in the newest addon?
Von Snellfharer
________________________________________
last of the fullgrown men
User avatar
Von Snellfharer
 
Posts: 255
Joined: Fri Jun 21, 2002 8:03 am
Location: Semi arctic

Postby Parahead » Tue Sep 21, 2004 6:17 am

Von Snellfharer wrote:If you sort by number in Coranto (phonetically shortened CR) and then set it to sort by some field, you might end up with nothing in the file because CR first sorts by number and the looks for the sort-field.

Is this avoided in the newest addon?
The sorting/filterering vs. filtering/sorting problem is only a concern with the internal "Filter By Number" / "Filter By Time" fields and how the actual sorting in the profile works. Both a deeper discussion of this problem and a solution for it is available in this thread (as you know ;-)). I fully agree that a more flexible option as mentioned in that thread to be able to choose filter/sort or sort/filter should be implemented into the core of Coranto though.

But to answer your question. The FBF addon is actually doing it's filtering *before* the number/time filtering done internaly by Coranto, which makes it behave the way you want. Any filtering/sorting you specify is done *after* this subset of newsitem has been weeded out (but the problem above still applies though). The 2.0 version worked this way and the 2.1 is too...
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Postby bozoka45 » Mon Nov 29, 2004 8:49 am

Very small issue I wanted to point out. The old Filter by Field (2.0) file name is cra_filterbyfield2.pl. The new one is simply cra_filterbyfield.pl (from your website). Makes it a little confusing with two of those in there, and the older version has the "2" at the end.

Not sure if it was intentional or not, but just wanted to point it out.
User avatar
bozoka45
 
Posts: 1159
Joined: Sun Mar 23, 2003 8:38 pm
Location: New Orleans

Postby Parahead » Wed Dec 01, 2004 6:26 pm

bozoka45 wrote:Very small issue I wanted to point out. The old Filter by Field (2.0) file name is cra_filterbyfield2.pl. The new one is simply cra_filterbyfield.pl (from your website). Makes it a little confusing with two of those in there, and the older version has the "2" at the end.

Not sure if it was intentional or not, but just wanted to point it out.
Nope, not intended, the correct filename should of course have been cra_filterbyfield2.pl, my misstake... Don´t think I will release a new version just for this but will try and remember to fix it if I make any other changes which require a new release...
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Postby bozoka45 » Wed Dec 01, 2004 9:35 pm

Parahead wrote:Nope, not intended, the correct filename should of course have been cra_filterbyfield2.pl, my misstake... Don´t think I will release a new version just for this but will try and remember to fix it if I make any other changes which require a new release...


I think just changing the filename on the CTUS addons page and your addons page would be sufficient. It gave me a headache for a few minutes.
User avatar
bozoka45
 
Posts: 1159
Joined: Sun Mar 23, 2003 8:38 pm
Location: New Orleans

Postby Parahead » Thu Dec 02, 2004 6:55 am

bozoka45 wrote:I think just changing the filename on the CTUS addons page and your addons page would be sufficient. It gave me a headache for a few minutes.
Done... :-)
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

RegExp Help?

Postby Darren » Sun Jan 20, 2008 9:26 am

Hey Parahead, or anyone else who may know:

Can I get a quick idiot's guide to regular expressions? There seems to be an assumption in the Filter By Field add-on that Coranto users will know the syntax and how to use the RegExp options.

I have been using the simple "Equal To" test type, but now I would like the filter to allow for two specific options (out of a list of five or six in that custom field's drop-down menu). I need some sort of "AND" operator. It would also be handy to know how to do "OR" for filtering.

Thanks very much!
Darren
 
Posts: 44
Joined: Sat Oct 30, 2004 9:20 pm

Postby Jackanape » Sun Jan 20, 2008 3:33 pm

Try this:
http://www.perl.com/pub/q/documentation

Specifically:
http://search.cpan.org/dist/perl/pod/perlre.pod
http://search.cpan.org/dist/perl/pod/perlop.pod

It might also be worth investing in a dektop hardcopy book for reference...I've found "The Visual Quickstart guide" to be excellent.
A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly.
Specialization is for insects.
-Robert A. Heinlein
User avatar
Jackanape
 
Posts: 632
Joined: Tue Jan 09, 2007 12:15 am
Location: Capitol of the Great State of New York

Postby Musicvid » Sun Jan 20, 2008 4:32 pm

There are lots of sites with basic tutorials, here's one I keep coming back to:
http://www.troubleshooters.com/codecorn/littperl/perlreg.htm
Musicvid
 
Posts: 138
Joined: Wed Jan 17, 2007 1:05 am
Location: Western America

Postby Darren » Sun Jan 20, 2008 9:28 pm

Sorry, for a non-programmer these docs are still over my head.

Could you list some examples of what to plug into Filter By Field to perform some basic operations (such as the one I describe above)?

Right now I have (based on Parahead's example I found in another thread):

Test Type: Equal To RegExp
Test Value: /Value1|Value2/

My field has 5 different options to choose from, Value1 - Value5, and I only want the profile to include items with Value1 or Value2.

The Test Value I have seems to almost be doing the trick, but I have found one case where a Value5 newsitem is still slipping through. My only explanation is that my regexp syntax is wrong, or I don't understand how it's truly operating.

Thanks!
Darren
 
Posts: 44
Joined: Sat Oct 30, 2004 9:20 pm

Postby Parahead » Wed Feb 20, 2008 3:07 pm

Darren wrote:The Test Value I have seems to almost be doing the trick, but I have found one case where a Value5 newsitem is still slipping through. My only explanation is that my regexp syntax is wrong, or I don't understand how it's truly operating.
Based on the information you have provided the regexp seems fine, but it would be interesting to know if the field is a multiple selection field or if you only can choose *one* value?
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Re: Addon Release: Filter by Field 2.1

Postby web » Sat Feb 16, 2013 2:21 pm

it may be interesting to others

I used

/word1/+/word2/+/word3/

so it gives result, that mathes to word1 OR word2 OR word3

some other expressions

* Match 0 or more times
+ Match 1 or more times
? Match 1 or 0 times
{n} Match exactly n times
{n,} Match at least n times
{n,m} Match at least n but not more than m times
User avatar
web
 
Posts: 176
Joined: Sun Nov 30, 2003 3:39 pm


Return to Addon Release and Support

Who is online

Users browsing this forum: No registered users and 0 guests

cron