chocozurean Posted May 2, 2006 Report Posted May 2, 2006 I know regex support for rss filtering has been suggested before and the developers said it would be too difficult to implement, but my suggestion puts the regex responsibilities not on utorrent but the user. If there were a custom column added to the "Releases" view and automating filtering in the "Favorites" view based that column using utorrent's current filtering scheme, then the user could run their own regex scripts on the XML file, and tell utorrent to put the info in between certain tags into the custom column. Users could even set up multiple custom columns, and direct utorrent to look at different tags for each column.For example, some RSS feeds contain miscellaneous stats such as # of seeds, # of peers, and current swarm speed. There has also been a need to modify some XML files to get automatic downloading working (i.e. through miniRSS or rssatellite). So, a PHP script that already makes automatic downloading possible, could also put whatever data the user wanted into some <misc></misc> tags and then utorrent could filter it normally.I know it sounds complicated, and would really only be useful to advanced users who are capable of running their own scripts and who know regex, but it would open up a lot of customization possibilities, without putting a lot of responsibility on utorrent to make sure the user's regex doesn't break the XML.
codemunkey Posted May 2, 2006 Report Posted May 2, 2006 Or perhaps a simpler alternative would be to allow uTorrent to support an external filter. All utorrent would need is some method for setting the path to the filter and any command line arguments. Then when the time came to filter the results, utorrents launches the filter, creates a pipe (or whatever the win32 equivalent is), the unfiltered values would be fed into the filter, and the matching results would be output to stdout.A simple example of how you could use this to gain regular expression support would be to use the www.pcre.org tool called pcregrep.exeHere is an example:Say you wanted all the season 1 episodes of Lost from 5 through 16You could set the filter to be 'c:\utorrent\lost.bat'Which contains the following:@echo offc:\bin\pcregrep.exe -i "lost\ .*(s0*1e|0*1x)(0[5-9]|1[0-6]*)"'Then when utorrent wants to apply the filter is simply opens the external filter (batch file in this case), dumps all the values in, and processes the results.This would allow the power user to create very elaborate filters in the language of their choice, or even chain multiple filters together without utorrent having to do anything more than run it and feed it input.The same logic could also be applied to filtering the raw RSS, where an external filter could preprocess the rss feed before utorrent digested it.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.