tools should they be command line executable as well ?
31 Aug
2011
31 Aug
'11
4:38 p.m.
Hello all, On http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5636 Ian asked a question last month no-one answered. So I ask it here: > Style question to the community: should core pages in the staff client (like > tools/cleanborrowers.pl) have both a templated page in the staff client AND a > command-line presence, or should the commandline tool be a separate script in > misc/? > > At this time, there doesn't seem to be any precedent for inclusion in the core > script. Before passing this patch for QA, I'd like to get some feedback, as > this may both open doors for us, as well as create additional work to create > consistency of implementation for existing jobs. My answer is: * right, there is no precedent * This feature to clean borrowers from command line is highly useful : most libraries want to define a rule, and have it applied every week, through a cronjob. But some want to clean manually. So it's meaningful to have a script for both cases. * I think it's fair to have this script run from both, and it's better than having 2 scripts for that, it's easier to maintain * I think a few other script could usefully have the same feature : import_borrowers, batchMod (that does both mod and deletion of items), and that's probably all. So, overally, my choice is : let the need decide. If it's useful for some, do it, but double check for security issues. -- Paul POULAIN http://www.biblibre.com Expert en Logiciels Libres pour l'info-doc Tel : (33) 4 91 81 35 08
31 Aug
31 Aug
4:49 p.m.
+1 Your conclusion is clear. I would agree with that. Add both choices only when useful. In case you have two scripts, it would be nice to prevent code duplication. Marcel ________________________________________ Van: koha-devel-bounces@lists.koha-community.org [koha-devel-bounces@lists.koha-community.org] namens Paul Poulain [paul.poulain@biblibre.com] Verzonden: woensdag 31 augustus 2011 16:38 Aan: koha-devel@lists.koha-community.org Onderwerp: [Koha-devel] tools should they be command line executable as well ? Hello all, On http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5636 Ian asked a question last month no-one answered. So I ask it here: > Style question to the community: should core pages in the staff client (like > tools/cleanborrowers.pl) have both a templated page in the staff client AND a > command-line presence, or should the commandline tool be a separate script in > misc/? > > At this time, there doesn't seem to be any precedent for inclusion in the core > script. Before passing this patch for QA, I'd like to get some feedback, as > this may both open doors for us, as well as create additional work to create > consistency of implementation for existing jobs. My answer is: * right, there is no precedent * This feature to clean borrowers from command line is highly useful : most libraries want to define a rule, and have it applied every week, through a cronjob. But some want to clean manually. So it's meaningful to have a script for both cases. * I think it's fair to have this script run from both, and it's better than having 2 scripts for that, it's easier to maintain * I think a few other script could usefully have the same feature : import_borrowers, batchMod (that does both mod and deletion of items), and that's probably all. So, overally, my choice is : let the need decide. If it's useful for some, do it, but double check for security issues. -- Paul POULAIN http://www.biblibre.com Expert en Logiciels Libres pour l'info-doc Tel : (33) 4 91 81 35 08 _______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
15 Sep
15 Sep
12:57 a.m.
New subject: tools should they be command line executable as well ?
Paul Poulain asked: > On http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5636 Ian > asked a question last month no-one answered. So I ask it here: > > Style question to the community: should core pages in the staff client (like > > tools/cleanborrowers.pl) have both a templated page in the staff client AND a > > command-line presence, or should the commandline tool be a separate script in > > misc/? [...] > My answer is: > * right, there is no precedent > * This feature to clean borrowers from command line is highly useful : > most libraries want to define a rule, and have it applied every week, > through a cronjob. But some want to clean manually. So it's meaningful > to have a script for both cases. > * I think it's fair to have this script run from both, and it's better > than having 2 scripts for that, it's easier to maintain [...] Would it be better to move the shared logic into a C4 module and have both the staff web script and a misc CLI script? Having scripts behave differently depending on invocation environment seems a bit risky. Hope that helps, -- MJ Ray (slef), member of www.software.coop, a for-more-than-profit co-op. Webmaster, Debian Developer, Past Koha RM, statistician, former lecturer. In My Opinion Only: see http://mjr.towers.org.uk/email.html Available for hire for various work through http://www.software.coop/
5417
Age (days ago)
5431
Last active (days ago)
2 comments
3 participants
participants (3)
-
Marcel de Rooy -
MJ Ray -
Paul Poulain