<div dir="ltr"><div><div><div><div>GOOD MORNING KOHA USERS,<br><br></div>   KINDLY ARRANGE TO SEND EASY METHOD  RELATAED TO HOW TO INSTALL KOHA SOFTWARE ON LINUX  PLATFORM. <br></div>THANKING YOU YOU,<br></div>YOURS SINCERELY<br></div>DR.J.VIJAYA KUMAR<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 19, 2014 at 3:30 PM,  <span dir="ltr"><<a href="mailto:koha-devel-request@lists.koha-community.org" target="_blank">koha-devel-request@lists.koha-community.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Send Koha-devel mailing list submissions to<br>
        <a href="mailto:koha-devel@lists.koha-community.org">koha-devel@lists.koha-community.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" target="_blank">http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:koha-devel-request@lists.koha-community.org">koha-devel-request@lists.koha-community.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:koha-devel-owner@lists.koha-community.org">koha-devel-owner@lists.koha-community.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of Koha-devel digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
   1. Re: Conventions for CLI scripts (Mark Tompsett)<br>
   2. Re: Conventions for CLI scripts (Owen Leonard)<br>
   3. Koha Developer IRC meeting 23 September 2014 at 15:00     and<br>
      22:00 UTC (Tomas Cohen Arazi)<br>
   4. Re: Conventions for CLI scripts (Robin Sheat)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Thu, 18 Sep 2014 09:29:42 -0400<br>
From: "Mark Tompsett" <<a href="mailto:mtompset@hotmail.com">mtompset@hotmail.com</a>><br>
To: "Koha Devel" <<a href="mailto:koha-devel@lists.koha-community.org">koha-devel@lists.koha-community.org</a>><br>
Subject: Re: [Koha-devel] Conventions for CLI scripts<br>
Message-ID: <BLU172-DS12DBBBF2EE72A0544E626FC6B70@phx.gbl><br>
Content-Type: text/plain; format=flowed; charset="utf-8";<br>
        reply-type=original<br>
<br>
Greetings,<br>
<br>
>     1. There are two directions for this:<br>
>             I. By default the action will be performed, unless you add<br>
>                an argument (--dry-run for example.)<br>
>            II. By default the action will not be performed, unless you<br>
>                add an argument (--commit for example.)<br>
<br>
If you run a script called DestroyTheDatabase, you would expect the default<br>
action to be complete and utter deletion. I think a dry-run flag would make<br>
sense for this type of script. The problem is those scripts whose name is<br>
not indicative of DB modifications. I suspect you are thinking about<br>
checkNonIndexedBiblios.pl which only runs if you include -c, much like point<br>
1 subsection II. The name doesn't suggest default modifications. In this<br>
case, you have to add the -z which will then insert the non-indexed Biblios<br>
into the zebra queue. This is like the second method. Can we have a mix?<br>
Does a mix make any sense?<br>
<br>
This kind of reminds me of the help for scripts issues I was wondering<br>
about. I see a script name, other than reading the code, how do I get a<br>
sample use page? Do we force help on users if no parameters are passed? Do<br>
we expect a particular letter or<br>
phrase? --help -h --usage --examples --something-else?<br>
checkNonIndexedBiblios.pl does it both ways.<br>
<br>
<br>
>     2. What do we want to call the options, whichever way is picked?<br>
>             I. Keeping in mind that some things (-c for example) can<br>
>                conflict with other conventions.<br>
<br>
Are there different conventions to choose from? How does Debian (Ubuntu,<br>
etc.) do it?<br>
<br>
<br>
>     3. Are there any other conventions we should deal with at the same<br>
>        time?<br>
<br>
None of which I am aware.<br>
<br>
[SNIP]<br>
+1 on the turning off  auto-commit, so dry runs do the same as actual runs.<br>
+1 on the explicit rollback or commit.<br>
<br>
<br>
>        $dbi->begin_work;<br>
<br>
Actually, I guess that is a nicer way of doing this?<br>
<br>
# Start transaction<br>
$dbh->{AutoCommit} = 0;<br>
$dbh->{RaiseError} = 1;<br>
<br>
GPML,<br>
Mark Tompsett<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Thu, 18 Sep 2014 09:37:33 -0400<br>
From: Owen Leonard <<a href="mailto:oleonard@myacpl.org">oleonard@myacpl.org</a>><br>
To: Koha Devel <<a href="mailto:koha-devel@lists.koha-community.org">koha-devel@lists.koha-community.org</a>><br>
Subject: Re: [Koha-devel] Conventions for CLI scripts<br>
Message-ID:<br>
        <CAO4qe2PLYna57wQqeFX56KXK=<a href="mailto:rS_235Bdf2YSVnd03wO063h9g@mail.gmail.com">rS_235Bdf2YSVnd03wO063h9g@mail.gmail.com</a>><br>
Content-Type: text/plain; charset=UTF-8<br>
<br>
> Do we force help on users if no parameters are passed?<br>
<br>
As a non-expert in command line things, this is what I would expect.<br>
At the very least a brief help, with the suggestion that passing<br>
--help would give more.<br>
<br>
 -- Owen<br>
<br>
--<br>
Web Developer<br>
Athens County Public Libraries<br>
<a href="http://www.myacpl.org" target="_blank">http://www.myacpl.org</a><br>
<br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Thu, 18 Sep 2014 12:05:23 -0300<br>
From: Tomas Cohen Arazi <<a href="mailto:tomascohen@gmail.com">tomascohen@gmail.com</a>><br>
To: koha-devel <<a href="mailto:koha-devel@lists.koha-community.org">koha-devel@lists.koha-community.org</a>><br>
Subject: [Koha-devel] Koha Developer IRC meeting 23 September 2014 at<br>
        15:00   and 22:00 UTC<br>
Message-ID:<br>
        <CABZfb=<a href="mailto:X94ca854xgq0enhSj%2B4iemD1ez1zm3S_99nrU2B8S96A@mail.gmail.com">X94ca854xgq0enhSj+4iemD1ez1zm3S_99nrU2B8S96A@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
I'm calling for a dev meeting next week, dedicated to DBIC discussions.<br>
<br>
We'll have DBIC's Peter Rabbitson on the IRC channel to hear his POV too.<br>
He can attend 15:00 UTC only though.<br>
<br>
I'll be happy to have all positions explicitly stated, and discussed. If we<br>
can make a decision, that's bonus points.<br>
<br>
Please send me your POV so I can put that on the wiki to sumarize what we<br>
already discussed. Otherwise, i'll do my best to be impartial.<br>
<br>
--<br>
Tom?s Cohen Arazi<br>
Prosecretar?a de Inform?tica<br>
Universidad Nacional de C?rdoba<br>
? +54 351 5353750 ext 13168<br>
GPG: B76C 6E7C 2D80 551A C765  E225 0A27 2EA1 B2F3 C15F<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.koha-community.org/pipermail/koha-devel/attachments/20140918/06a86435/attachment-0001.html" target="_blank">http://lists.koha-community.org/pipermail/koha-devel/attachments/20140918/06a86435/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 4<br>
Date: Fri, 19 Sep 2014 11:19:34 +1200<br>
From: Robin Sheat <<a href="mailto:robin@catalyst.net.nz">robin@catalyst.net.nz</a>><br>
To: <a href="mailto:koha-devel@lists.koha-community.org">koha-devel@lists.koha-community.org</a><br>
Subject: Re: [Koha-devel] Conventions for CLI scripts<br>
Message-ID: <<a href="mailto:1411082374.20051.78.camel@zarathud.wgtn.cat-it.co.nz">1411082374.20051.78.camel@zarathud.wgtn.cat-it.co.nz</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Mark Tompsett schreef op do 18-09-2014 om 09:29 [-0400]:<br>
> not indicative of DB modifications. I suspect you are thinking about<br>
> checkNonIndexedBiblios.pl which only runs if you include -c, much like point<br>
> 1 subsection II. The name doesn't suggest default modifications.<br>
<br>
Well the solution to that is to fix the name. It's not checking, it's<br>
modifying. To be fair, fsck (filesystem check) also modifies :)<br>
<br>
> In this<br>
> case, you have to add the -z which will then insert the non-indexed Biblios<br>
> into the zebra queue. This is like the second method. Can we have a mix?<br>
> Does a mix make any sense?<br>
<br>
A mix sounds like the worst of both possible worlds. I don't have strong<br>
opinions about it (though ceteris paribus would prefer having "commit"<br>
by default), but it's the sort of case where consistency would be good.<br>
<br>
> This kind of reminds me of the help for scripts issues I was wondering<br>
> about. I see a script name, other than reading the code, how do I get a<br>
> sample use page? Do we force help on users if no parameters are passed? Do<br>
> we expect a particular letter or<br>
> phrase? --help -h --usage --examples --something-else?<br>
> checkNonIndexedBiblios.pl does it both ways.<br>
<br>
If a script requires arguments in order to do its function, then it<br>
should present with a help synopsis. If it doesn't, then it might go<br>
forth and do its thing. This is the UNIX way.<br>
<br>
If you want help, you use -h or --help. This is the GNU way, which is<br>
mostly the POSIX way, which is mostly the UNIX way. I also tend to use<br>
--man for providing the full manual, but I'm not sure where I got that<br>
idea from.<br>
<br>
--version is also more or less a GNU requirement, but it's perhaps not<br>
so important for us.<br>
<br>
><br>
><br>
> >     2. What do we want to call the options, whichever way is picked?<br>
> >             I. Keeping in mind that some things (-c for example) can<br>
> >                conflict with other conventions.<br>
><br>
> Are there different conventions to choose from? How does Debian (Ubuntu,<br>
> etc.) do it?<br>
<br>
I did a bit of pottering around, and while there are many different<br>
things, the most common I saw was -c for config file. So it'd probably<br>
be best to avoid that. Other things are fair game (except --help and<br>
--version I guess.)<br>
<br>
My suggestion is that we use --dry-run|-d if we have an option to<br>
activate that mode, or --run|-r if we require an option to commit<br>
changes.<br>
<br>
Note that no matter what is decided, the<br>
"delete_everything_and_burn_it_all_down" script should require a<br>
parameter to commit changes. Perhaps '--screw-it-lets-do-it-live'.<br>
<br>
> >        $dbi->begin_work;<br>
><br>
> Actually, I guess that is a nicer way of doing this?<br>
><br>
> # Start transaction<br>
> $dbh->{AutoCommit} = 0;<br>
> $dbh->{RaiseError} = 1;<br>
<br>
It wasn't really a complete example. RaiseError should always be 1<br>
unless you have a reason, I think starting a transaction turns off<br>
AutoCommit for the duration of the transaction anyway.<br>
<br>
--<br>
Robin Sheat<br>
Catalyst IT Ltd.<br>
? +64 4 803 2204<br>
GPG: 5FA7 4B49 1E4D CAA4 4C38  8505 77F5 B724 F871 3BDF<br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: signature.asc<br>
Type: application/pgp-signature<br>
Size: 473 bytes<br>
Desc: This is a digitally signed message part<br>
URL: <<a href="http://lists.koha-community.org/pipermail/koha-devel/attachments/20140919/764862af/attachment-0001.pgp" target="_blank">http://lists.koha-community.org/pipermail/koha-devel/attachments/20140919/764862af/attachment-0001.pgp</a>><br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
Koha-devel mailing list<br>
<a href="mailto:Koha-devel@lists.koha-community.org">Koha-devel@lists.koha-community.org</a><br>
<a href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" target="_blank">http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><br>
website : <a href="http://www.koha-community.org/" target="_blank">http://www.koha-community.org/</a><br>
git : <a href="http://git.koha-community.org/" target="_blank">http://git.koha-community.org/</a><br>
bugs : <a href="http://bugs.koha-community.org/" target="_blank">http://bugs.koha-community.org/</a><br>
<br>
End of Koha-devel Digest, Vol 106, Issue 27<br>
*******************************************<br>
</blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr">Dr.J.Vijaya Kumar<br>Engineering College Library<br>Andhra University<br>Visakhapatnam- 530 003<br>Andhra Pradesh<br>India.<br>E-Mail Address: <br><a href="mailto:kumarjammala@gmail.com" target="_blank">kumarjammala@gmail.com</a><br><a href="mailto:kumarjammala@rediffmail.com" target="_blank">kumarjammala@rediffmail.com</a><br><a href="mailto:jammalamadakavijayakumar@yahoo.com" target="_blank">jammalamadakavijayakumar@yahoo.com</a></div>
</div>