New AutoSort is online
http://www.copypointburscheid.de/linux/vdr-autosort-0.0.8.tgz ----------------------------------------------------------------------------------------------------------------------------------------
2005-12-09: Version 0.0.8
- Added setting TimeStamps and option 'TimeStamp' to catch channels that haven't updated for some days. - Fixed a bug that prevented to move a group that contains a channel with same name like the group. - Speeded up group moving in case a group has to move downwards. - Fixed channel moving to hit the right group at first run now. - Added option 'NotProvider' to exclude a provider from a group. - Added fixedPositions for 'Auto Sort', 'Unsorted' and 'New Channels'.
----------------------------------------------------------------------------------------------------------------------------------------
Thorsten
==================================================================== AutoSort plugin adds the capability to define rules for automatically sorting your channels.conf
Project's homepage: http://www.copypointburscheid.de/linux/autosort.htm Latest version: http://www.copypointburscheid.de/linux/vdr-autosort-0.0.8.tgz ====================================================================
CopyPoint wrote:
New AutoSort is online
http://www.copypointburscheid.de/linux/vdr-autosort-0.0.8.tgz
Great stuff, some possible improvement, instead of having huge lines like: Teleshop:Priority = 30:HasName=store:HasName=q_:HasName=sell:HasName=buy:HasName=shop:HasName=noello:HasName=markt:HasName=market:HasNa Teleshop2:Priority = 30:HasName=arena:HasName=biet:HasName=auction:HasName=gems:HasName=price:HasName=bid:HasName=best:HasName=sonnenkl Teleshop3:Priority = 30:HasName=bazaar:HasName=punto:HasName=performance:HasName=thane:HasName=warehouse:HasName=ideas:HasName=made in:
Just having single line and file, ie. Teleshop:Priority = 30:HasName=/var/vdrcfg/plugins/TeleShop:Sort
and the file TeleShop has all defs, one per line, like.. sell buy noello markt etc...
Great stuff, some possible improvement, instead of having huge lines like: Teleshop:Priority = 30:HasName=store:HasName=q_:HasName=sell:HasName=buy:HasName=shop:HasName=noello:HasName=markt:HasName=market:HasNa Teleshop2:Priority = 30:HasName=arena:HasName=biet:HasName=auction:HasName=gems:HasName=price:HasName=bid:HasName=best:HasName=sonnenkl Teleshop3:Priority = 30:HasName=bazaar:HasName=punto:HasName=performance:HasName=thane:HasName=warehouse:HasName=ideas:HasName=made in:
Just having single line and file, ie. Teleshop:Priority = 30:HasName=/var/vdrcfg/plugins/TeleShop:Sort
and the file TeleShop has all defs, one per line, like.. sell buy noello markt etc...
Im not sure if that's the right way it can/will result in one file per group plus one control file will this really increase read- and useability? OTOH I don't have any better idea to solve this. Are there any further suggestions or other opinions for that?
Thorsten
CopyPoint wrote:
Great stuff, some possible improvement, instead of having huge lines like: Teleshop:Priority = 30:HasName=store:HasName=q_:HasName=sell:HasName=buy:HasName=shop:HasName=noello:HasName=markt:HasName=market:HasNa
Teleshop2:Priority = 30:HasName=arena:HasName=biet:HasName=auction:HasName=gems:HasName=price:HasName=bid:HasName=best:HasName=sonnenkl
Teleshop3:Priority = 30:HasName=bazaar:HasName=punto:HasName=performance:HasName=thane:HasName=warehouse:HasName=ideas:HasName=made in:
Just having single line and file, ie. Teleshop:Priority = 30:HasName=/var/vdrcfg/plugins/TeleShop:Sort
and the file TeleShop has all defs, one per line, like.. sell buy noello markt etc...
Im not sure if that's the right way it can/will result in one file per group plus one control file will this really increase read- and useability?
Most groups would not have this file at all, only groups like TeleShop, Religion and such.
OTOH I don't have any better idea to solve this. Are there any further suggestions or other opinions for that?
Maybe having Include command, ie.. Teleshop:Priority = 30:Include=/var/vdrcfg/plugins/TeleShop:Sort
and the file TeleShop has all defs, one per line, like.. HasName=sell HasName=buy
Lauri Tischler wrote:
Teleshop:Priority = 30:HasName=store:HasName=q_:HasName=sell:HasName=buy:HasName=shop:HasName=noello:HasName=markt:HasName=market:HasNa
Teleshop2:Priority = 30:HasName=arena:HasName=biet:HasName=auction:HasName=gems:HasName=price:HasName=bid:HasName=best:HasName=sonnenkl
Teleshop3:Priority = 30:HasName=bazaar:HasName=punto:HasName=performance:HasName=thane:HasName=warehouse:HasName=ideas:HasName=made in:
Just having single line and file, ie. Teleshop:Priority = 30:HasName=/var/vdrcfg/plugins/TeleShop:Sort
I had to increase a hardcoded list length in the source code to fit all my teleshop-keywords on a single line. :) By default, the plugin accepts a list of 10 HasName directives at once. Bleh.
OTOH I don't have any better idea to solve this. Are there any further suggestions or other opinions for that?
Maybe having Include command, ie.. Teleshop:Priority = 30:Include=/var/vdrcfg/plugins/TeleShop:Sort
and the file TeleShop has all defs, one per line, like.. HasName=sell HasName=buy
I would vote for regexp support _and_ included files. The parser should also support continued lines with "", for example. Like this:
Teleshop:Priority=30:HasName=/(arena|astr[ao]|auction|bazaar|best)/:\ HasName=/(bible|bibel|bid|biet|bolsa|boutiq|buy|caixa|campania)/:\ HasName=/(ceramic|challeng|chat|church|compra|date|dating|daystar)/:\ .....:\ Sort
Either Perl regexp or at least egrep syntax should be sufficient. It would be a good idea to include a regexp library with the plugin just to make the regexp behavior uniform on all different platforms. The regexp libraries provided by the operating system tend to differ.
Just having single line and file, ie. Teleshop:Priority = 30:HasName=/var/vdrcfg/plugins/TeleShop:Sort
I had to increase a hardcoded list length in the source code to fit all my teleshop-keywords on a single line. :) By default, the plugin accepts a list of 10 HasName directives at once. Bleh.
0.0.9 (not out now) containes a #define for this limit any suggestion for the default value?
I would vote for regexp support _and_ included files. The parser should also support continued lines with "", for example. Like this:
Teleshop:Priority=30:HasName=/(arena|astr[ao]|auction|bazaar|best)/:\ HasName=/(bible|bibel|bid|biet|bolsa|boutiq|buy|caixa|campania)/:\ HasName=/(ceramic|challeng|chat|church|compra|date|dating|daystar)/:\ .....:\ Sort
Either Perl regexp or at least egrep syntax should be sufficient. It would be a good idea to include a regexp library with the plugin just to make the regexp behavior uniform on all different platforms. The regexp libraries provided by the operating system tend to differ.
Oh sh..., do you have any link for me where to learn how to work with that libs?
CopyPoint wrote:
Just having single line and file, ie. Teleshop:Priority = 30:HasName=/var/vdrcfg/plugins/TeleShop:Sort
I had to increase a hardcoded list length in the source code to fit all my teleshop-keywords on a single line. :) By default, the plugin accepts a list of 10 HasName directives at once. Bleh.
0.0.9 (not out now) containes a #define for this limit any suggestion for the default value?
You really should use a better, dynamic data structure for this purpose, a linked list for example. Then there would be no limit for the number of elements in that list. :)
I would use something quite large such as 256 or 1024 for these tables, so that "anyone will be very unlikely to ever see this limit". Unless this leads to very high, unjustified cpu or memory usage, of course.
BTW, when I run channelsort by hand from the main menu, my vdr takes 100% of my 2.4G celeron cpu. I have 3834 lines in my channels.conf, because I have five satellites available. On the other hand, this is the very reason why I found channelsort plugin necessary. Channels come and go. There might be something that could be optimized in the code, I bet. Hey, we are not compressing video data here. :)
If you could provide us with a short explanation of the algorithms and data structures, you may get some educated guesses of what may be improved. I could use some time for this, if you appreciate help.
Either Perl regexp or at least egrep syntax should be sufficient. It would be a good idea to include a regexp library with the plugin just to make the regexp behavior uniform on all different platforms. The regexp libraries provided by the operating system tend to differ.
Oh sh..., do you have any link for me where to learn how to work with that libs?
I would begin with the regexp implementation that comes with Apache and/or Perl. Take a look into the READMEs, source code, licensing etc. It might be relatively easy to take apart the regexp implementation and use it in your own program. I have not tried this myself, though.
Maybe either or both could be included with the plugin source code without licensing problems. On the other hand, someone can see this as a major bloat. Maybe the regexp library should be selectable in the Makefile, either use system library or the one included with the plugin itself.
I demand that Sami J. Mäkinen may or may not have written...
CopyPoint wrote:
[snip]
Oh sh..., do you have any link for me where to learn how to work with that libs?
I would begin with the regexp implementation that comes with Apache and/or Perl. Take a look into the READMEs, source code, licensing etc. It might be relatively easy to take apart the regexp implementation and use it in your own program. I have not tried this myself, though.
You could use glibc's <regex.h> (see regex(7) for more info) or libpcre3.
Sorry for the late answer, but buisiness is like hell these days.
0.0.9 (not out now) containes a #define for this limit any suggestion for the default value?
You really should use a better, dynamic data structure for this purpose, a linked list for example. Then there would be no limit for the number of elements in that list. :)
Yes, i droped that just because of lazyness. would be a derivation of vdrs list object overweightend or should i just take it?
I would use something quite large such as 256 or 1024 for these tables, so that "anyone will be very unlikely to ever see this limit". Unless this leads to very high, unjustified cpu or memory usage, of course.
Thats much to much memory waste for just two or three groups with around 50 HasName entrys So 64 should be a realistic limit for the meantime. Who uses a rotor or a T90 _normally_ can read and write and adjust it
BTW, when I run channelsort by hand from the main menu, my vdr takes 100% of my 2.4G celeron cpu. I have 3834 lines in my channels.conf, because I have five satellites available. On the other hand, this is the very reason why I found channelsort plugin necessary. Channels come and go. There might be something that could be optimized in the code, I bet. Hey, we are not compressing video data here. :)
That's the ugliest pice of code at all vdr doesn't return to it's main loop and watchdog is refreshed with a fixed value The hole thing will change when i come to implement threading i think
If you could provide us with a short explanation of the algorithms and data structures, you may get some educated guesses of what may be improved. I could use some time for this, if you appreciate help.
Thank you, but it's to early for finetuning. ATM autosort checks for each group wich channel could fit That has to change to "where does this channel fit" with longtime goal to recive any kind of signal from vdr on channel change and resort this at once. But first let me come to something that is allowed to be called "stable"
Maybe either or both could be included with the plugin source code without licensing problems. On the other hand, someone can see this as a major bloat.
It is!
If I understood right, regex.h is the only thing i can expect to be installed on a minimal system (thanks to Darren for pointing me to that) maybe libpcre can come later as addon, we'll see
Thorsten
Im not sure if that's the right way it can/will result in one file per group plus one control file will this really increase read- and useability?
Most groups would not have this file at all, only groups like TeleShop, Religion and such.
right
OTOH I don't have any better idea to solve this. Are there any further suggestions or other opinions for that?
Maybe having Include command, ie.. Teleshop:Priority = 30:Include=/var/vdrcfg/plugins/TeleShop:Sort
and the file TeleShop has all defs, one per line, like.. HasName=sell HasName=buy
So then, why not scan a subdir for files with the same name like the defined groups? I'll try something like this these days.