Page 1 of 1
Intelligent, scripted, filter of headers
Posted:
Sat Sep 24, 2011 4:46 pm
by spike6479
Hi there,
Is there any way to write a script to filter what is displayed for a group. If there is could you please point me to the docs?
It would be really nice to optionally pass the list to a python script before display. For example I'd like to find all the sample video files.
Thanks. By the way I have found V6.01B5 Build 1211 to be very stable.
Re: Intelligent, scripted, filter of headers
Posted:
Sat Sep 24, 2011 8:14 pm
by Quade
I'm probably going to be adding some more filtering to headers. The intent of the remote control interface was to let someone programatically browse the groups and make filtering decisions. The API for remote control will never be feature complete. I can always add more stuff to it.
What do you think about using Python to remotely control Newsbin and run your own filters on what's in the groups? You can make download decisions completely in your own program and never use the GUI if that's what you want.
Re: Intelligent, scripted, filter of headers
Posted:
Sat Sep 24, 2011 10:43 pm
by spike6479
Sounds great!
Re: Intelligent, scripted, filter of headers
Posted:
Sat Sep 24, 2011 11:15 pm
by Quade
You can pretty much do it how using the existing remote control interface in 6.1.
viewtopic.php?f=45&t=28590Here's some of the spec. Dex has moved this project to source-forge. I don't know the actual URL. Jonny has built an IOS remote controller to remote control Newsbin with an iPhone or ipad. There's some C# sample code for various functions to look at too.
Re: Intelligent, scripted, filter of headers
Posted:
Mon Sep 26, 2011 1:38 pm
by apsen
spike6479 wrote:Is there any way to write a script to filter what is displayed for a group. If there is could you please point me to the docs?
If you just need to filter headers you could run something like
- Code: Select all
path_to_newsbin/sqlite3.exe path_to_DB\SPOOL_V6\group_name\Storage.db3 'select distinct NN_Subject from Compact_V4'
and filter output with python or whatever else you like - I use perl.
I actually do it all the time as internal search used to be flaky and there were also problems with its history (plus others).
Maybe they have been fixed but at this point I have my own custom scripts that do the job better so I just do not care to test.
Re: Intelligent, scripted, filter of headers
Posted:
Mon Sep 26, 2011 2:02 pm
by Quade
Yeah, that's nice. Nice thing about using remote control is that you can both filter and add to the download list in one go.
Re: Intelligent, scripted, filter of headers
Posted:
Sat Oct 01, 2011 12:53 pm
by spike6479
The telnet interface is working pretty well for me. I've been able to obtain lists of entries and select and request downloads so far. Is there a method to get newsbinpro to update the headers for a group? Is there a way to mark all entries as old in one command.
Terminology becomes a bit convoluted when you can both download stuff from newsbinpro (vis telnet) and download to newsbinpro (via nntp).
Thanks,
Spike
Re: Intelligent, scripted, filter of headers
Posted:
Sat Oct 01, 2011 1:30 pm
by spike6479
Another question. What is the format of the download path in the Loaded Download command (I tried both single and double backslashes). I send the following, but the download still goes to the newsbinpro option download folder.
Telnet(127.0.0.1,118): send 'Loaded Download 556 z:\\newsbin\\samples\r\n'
Telnet(127.0.0.1,118): recv '200 Loaded Download - Succeeded\r\n'
Thanks,
Spike
Re: Intelligent, scripted, filter of headers
Posted:
Sat Oct 01, 2011 1:42 pm
by Quade
http://sourceforge.net/projects/nbremote/?_test=betahttp://help.newsbin.com/index.php/Versi ... rface_SpecIs the current interface spec. It needs to be updated though.
There's currently no "mark all old" though I can probably add it.
Currently you can't download outside of the download path as a security measure. I can consider making that optional in the future. The format would be a normal windows path. It is assumed that all filenames and folders are UTF-8.
Re: Intelligent, scripted, filter of headers
Posted:
Mon Oct 03, 2011 6:02 pm
by spike6479
I would appreciate a MarkAllOld command. I didn't actually time it, but it just took me minutes to Mark 280 entries old.
It would also be nice to have a way to force update of headers.
Thanks,
Spike
Re: Intelligent, scripted, filter of headers
Posted:
Mon Oct 03, 2011 6:27 pm
by Quade
"Update" will update all the headers for all active groups.
Re: Intelligent, scripted, filter of headers
Posted:
Tue Oct 04, 2011 7:50 am
by spike6479
Thanks much, I'll try that tomorrow night.
Spike