IRC log for #koha, 2006-04-07

← Previous day | Today | Next day → | Search | Index

All times shown according to UTC.

Time Nick Message
21:11 chris probably
22:10 kados chris: can you give me oper?
22:10 chris: so we don't lose that again :-)
22:10 chris: in case you get kicked off
22:14 thx
23:24 pate-away: hey pate
00:34 rach howdy
02:04 osmoze bonjour
02:05 pierrick bonjour :-)
02:10 chris salut
02:25 pierrick hi chris :-)
02:31 kados pate-away: up yet?
02:31 of course I meant paul :-)
02:31 it seems paul's not here
02:31 morning pierrick
02:31 pierrick: when paul arrives, let him know I committed a fix for his prob
02:31 pierrick: but it still needs some testing
02:32 pierrick: to make sure it didn't ruin anything else :-)
02:39 paul kados around ?
02:39 kados paul: briefly yes
02:39 paul (I saw a commit 10mn ago)
02:39 kados paul: did you see the commit? :-)
02:39 paul hi, i won't be too long.
02:39 kados paul: addbiblio.pl
02:39 paul yep.
02:40 kados paul: fixed I hope
02:40 paul: still needs more fixing though
02:40 paul was this enough to fix everything ?
02:40 kados no
02:40 it fixes labels
02:40 paul ah, ok, i'll try to investigate a little bit today.
02:40 kados well ... I have a good plan in mind
02:40 paul let me know.
02:40 kados we use miker's new MARC::Record Options
02:41 did you read his email carefully?
02:41 in fact you did
02:41 because you responded that KOha now has no utf-8 probs
02:41 paul which one ?
02:41 kados Mar 16 Mike Rylander   ( 129) Re: Unimarc, marc21, Unicode, and MARC::File::XML
02:41 that thread
02:42 we can use it to ensure that UNIMARC records are not re-encoded
02:42 hdl hi kados
02:42 kados hi hdl
02:43 in 2.4 MARC21 Koha should require utf-8
02:43 because it's the only valid encoding we can support
02:43 we _don't_ currently support MARC-8 as no browser can display MARC-8 chars above ascii range
02:43 it's currently implemented as 8859-1, but this is wrong for MARC-8
02:44 so for 2.4 we require UTF-8 for MARC21
02:44 and for UNIMARC we let the record decide the encoding
02:45 it should be quite simple to fix in fact
02:45 and I will work on it tomorrow
02:45 paul I don't see this mail from miker with this subject & date.
02:45 kados I'll forward it to you
02:45 paul so I do nothing & just wait for your fix ?
02:45 kados paul: it's on perl4lib list
02:45 paul: yes
02:45 paul that's OK for me :-D
02:45 kados paul: I have EMN system running
02:46 paul: so I can test with real data
02:46 paul: did you have another question?
02:46 paul yep :
02:46 kados listening
02:46 paul about your marc_time.pl scripts : they are fine. BUT, you must remember that packaging them for 2.4.0 means : put them in default templates / create a menu entrey / * translate them / check & check again.
02:46 kados paul: sorry, I meant to commit to head
02:47 paul: as they are not needed in rel_2_2
02:47 paul ah, ok.
02:47 kados: ++
02:47 kados paul: they are for the Zebra Plugin
02:47 I should probably stop for the day, I'm starting to make mistakes :-)
02:47 anything else?
02:47 paul ok, so go to bed & have a nice sleep ;-)
02:47 kados ok :-)
02:47 g'night #koha
02:48 paul (+ tina may find bad to have such a man that never go to bed with her !)
02:48 so: kados => bed
02:48 bye
02:50 osmoze whois paul,
02:50 oups
02:50 excuse
03:27 paul hello pierrick
03:27 à propos des bindings
03:27 tu peux aussi utiliser des arrays et faire un truc du genre :
03:28 $query='insert into stopword (word) values ('
03:28 foreach (split / /,$input->wordlist) {
03:28 $query.="?,";
03:28 push @values,$_;
03:28 }
03:28 chop $query;
03:29 pierrick OK, comprendo :-)
03:29 paul $query.=')';
03:29 ...
03:29 (ces quelques lignes montrent que je maitrise nettement mieux perl qu'en 2002 ;-)
03:29 pierrick (je l'écrirais pas comme ça, mais je comprends le principe)
03:29 paul TRES nettement mieux même :-D
03:30 pierrick je peux me permettre une remarque technique sur ton exemple ?
03:30 paul zyva
03:30 pierrick ton foreach est inutile
03:31 enfin, pas come ça
03:31 paul intéressante remarque : j'hésite tjs à simplifier mon code, parce qu'à un certain moment, le néophyte est totalement perdu. Déjà, le $_ est un peu "obscur" pour le débutant...
03:32 et il y a déjà assez peu de codeurs pour Koha pour que l'on ne décourage pas trop les bonnes volontés.
03:32 pierrick oui, c'est pour ça que j'évite d'utiliser le $_
03:32 paul et en même temps, faut quand même assumer le langage que l'on a choisi !
03:32 pierrick c'est parfois difficile de trouver la limite entre du code propre et du code lisible
03:32 paul (à propos : ta visite était intéressante hier ?)
03:32 pierrick (oui très)
03:33 (bib impressionnante)
03:33 je retourne dans le code :-)
03:49 paul, tu trouves ça lisible pour un non expert : $query = 'DELETE FROM stopwords WHERE word IN ('.join(",", map {"?"} (1 .. scalar @words)).')' ?
03:53 sinon, je peux proposer ... IN (?'.(',?' x scalar @words).') (mais je trouve ça moins classe
03:53 (oups, j'ai oublié un -1
03:53 IN (?'.(',?' x (scalar(@words) - 1)).')
03:53 paul franchement ? non, je trouve ca peu lisible.
03:53 pierrick (faut imaginer ça avec de la coloration syntaxique
03:54 ni l'un ni l'autre ?
03:54 paul et autant sur des modules très critiques, utilisés souvent, je pense qu'il faut optimiser à la microseconde, autant sur un module d'admin, qui est peu utilisé, mieux vaut privilégier la lisibilité. Enfin, c'est mon avis.
03:55 pierrick dans ton foreach, comment tu fais pour enlever le dernier ',' après le dernier '?', il va générer une erreur
03:55 paul ouaip, remarque, la 2eme option est plus lisible.
03:55 chop
03:55 pierrick franchement, le chop, ça fait bidouille, non?
03:55 mettre puis enlever... bof bof :-/
03:55 paul mmm... la capillotraction nous guette...
03:56 pierrick mais c'est vrai que si on ne maîtrise pas le map, c'est plus compréhensible
03:56 paul cela dit, le IN (',?' x scalar) me plait
03:56 pierrick Paul, je risque d'utiliser ce genre de choses souvent, je veux savoir ce que je peux me permettre de faire et ce qu'il faut que j'évite
03:56 paul l'autre, c'est un join de map de boucle...
03:57 ah, c'était ma grande crainte : qu'on récupère un jour un mongueur dans l'équipe noyau de développement... bon, on va faire avec ;-)
03:57 pierrick OK, je retiens que tu aimes l'astuce du 'x' :-)
03:57 mongueur... tu y vas un pu fort
03:58 paul ;-)
03:58 (grand crainte était aussi un peu fort, c'est donc équilibré au final !)
03:58 pierrick il faut écrire du code propre et maintenable, c'est l'objectif
03:59 dans le code que j'ai eu l'occasion de lire, je vois beaucoup de variable inutile, de for construit comme en C (alors qu'un for écrit en Perl est bien plus lisible).
03:59 paul si tu parles surtout de /admin/, comme je l'ai dit, c'était mes débuts en perl et en Koha. donc c'est très mal écrit, j'en suis parfaitement conscient !
03:59 osmoze pierrick, c est plus le vendengeur mais le nettoyeur
04:00 au fait, j ai toujours pas compris le vendengeur...
04:00 pierrick je pars sur le 'x' alors :-)
04:00 paul n'hésites pas à écrire un espèce de "framework" pour l'administration que l'on pourrait recopier ensuite pour tous les modules d'admin.
04:00 pierrick paul, je ne te fais aucun reproche, je ne sais pas qui a écrit les pages. De plus, le code que j'écris maintenant, je le trouverai nul dans 1 an certainement.
04:01 paul ne t'inquiète pas, je ne me vexe pas, je suis même très conscient de mes limites passées.
04:01 mais maintenant tout va mieux, je suis un génie enfin éclos...
04:01 pierrick à quel type de framework penses-tu ?
04:01 paul rien de particulier, juste avoir une structure commune dans l'organisation de tous les scripts.
04:01 comme on a aujourd'hui dans /admin/, mais en plus efficace.
04:01 pierrick ah... un template de page ?
04:02 pour moi, il y en a déjà un
04:02 les pages semblent toutes construites à peu près de la même façon
04:02 paul ouaip, exact.
04:02 mais le script perl pour la section /admin/ est pas organisé le mieux du monde. Je nettoierai bien des choses si j'avais le temps.
04:03 pierrick à base de if ($op eq 'operation1'){}elsif ($op eq 'operation2')
04:03 hop, je retourne à mes stopwords ;-)
04:03 paul oui, mais un a un searchstring pas tjs bien d'aplomb, que l'on néglige parfois. On a un redirect-> à la fin des suppressions qui n'est pas tjs bon. On ne lit pas tjs les variables CGI au début, parfois oui, parfois au milieu du code
04:04 bref, plein de petits trucs pas graves mais pas cool non plus.
04:05 pierrick Je vois ce que tu veux dire maintenant que je suis plongé dans le code
04:05 tu me diras ce que tu penses de la nouvelle structure de stopwords.pl, ce sera une base de discussion concrète
04:08 paul oki
08:11 pierrick is there anybody to explain me what are itemtypes images?
08:11 paul oui, moi !
08:11 pierrick :-)
08:11 please do
08:11 paul it's a new feature (uncomplete)
08:11 that will enable an image to appear on result list (& bibliodetail)
08:12 the image depends on the itemtype.
08:12 it can be :
08:12 * an image provided with the template (there are some for default)
08:12 * an external image, available on a given URL
08:17 pierrick OK, because itemtypes.pl requires the current template to have these images (I've found them only in tempate "css") and template "prog" does not use them
08:17 paul right. That's because I did it before PROG.
08:17 pierrick so I'll look into template "css" how it's managed and report it to template "prog"
08:17 hi owen
08:18 paul pierrick: right
08:18 pierrick paul, I've commited stopwords, waiting for your feedback (when you have time of course)
08:25 kados morning guys
08:26 paul wow, 5 hours in bed. that's really too much joshua !
08:27 kados hehe
08:27 paul kados:  I just discovered that my cloneTag is buggy when applied to an authority entry...
08:27 as the reported tag number don't change !
08:27 kados hmmm
08:27 paul are you a geek at javascript ?
08:28 kados I can take a look
08:28 paul my question is fairly simple : when the user clic on ..., I send the "index" as parameter.
08:28 kados right
08:28 paul index contains the number of the field in the area.
08:28 except that when you duplicate the field, the number changes !
08:28 kados hmmm
08:29 the way to get around that
08:29 paul thus, I search a js function that give me the entry number dynamically !
08:29 kados I think
08:29 wait ... I better see how you did it first
08:29 did you use cloneSubfield as a guideline?
08:29 paul yep.
08:30 I added a <div id="tagXXX">
08:30 that div is duplicated by cloneTag
08:30 I have removed the code that empty the values.
08:30 so, cloneTag is now very small
08:32 kados I also think we want to clear the value out of the clone
08:32 so if I type something in the field, then duplicate the field
08:32 the duplicate should be blank
08:33 instead of now, where it's duplicated exactly
08:33 paul maybe you're right.
08:33 but in this case we should empty the clone tag, not the original one.
08:33 kados right
08:33 paul as usually, the librarian type the most important subject 1st, then..
08:33 kados to fix your authortiies prob
08:34 paul so, the clone must create an empty AFTER.
08:34 kados we need to be able to identify the '...'
08:34 and when cloning, we should change the id for that as well
08:34 (well, change the 'index' value for it)
08:34 paul mmm... good suggestion...
08:35 and who can you find the id ?
08:35 kados in previous 'addfield', was a blank tag put inbetween two identical tags?
08:35 if so, clonetag must do the same
08:35 paul yep
08:37 kados I don't think that the '...' has an id now but I'll check
08:37 paul no, the ... don't have an id.
08:37 and the report is done on subfield, not on the ...
08:38 kados in addbiblio, we have:
08:38 <a  style=\"cursor: help;\" href=\"javascript:Dopop('../authorities/auth_fin​der.pl?authtypecode=".$tagslib->{$tag}->{$subfie​ld}->{authtypecode}."&index=$i',$i)\">...</a>";
08:38 so in clonetag
08:38 paul yep.
08:39 kados clone.setAttribute('href', "the long href string");
08:40 maybe use 'getAttribute to put the new 'index' in a variable
08:40 make sense?
08:40 paul nope
08:40 kados hehe
08:41 paul because index is hardcoded & i think i must get rid of it
08:41 kados index is needed to identify which tag to clone
08:41 paul yep.
08:41 kados but when you clone a tag, the href for the '...' doesn't change
08:42 paul yep
08:42 kados so it always points to the original
08:42 so just change the href
08:42 paul yep
08:42 to point where ?
08:42 kados to the new index :-)
08:42 paul as I don't know the number of the clone !
08:42 kados see this line:
08:42 clone.setAttribute("id", index + index);
08:42 now you can do:
08:42 newindex = clone.getAttribute("id");
08:43 to get the new number
08:43 (or, you can do index + index to get it (+ in javascript == . in perl)
08:43 paul mmm... no, as the index is related to SUBFIELD, while the id is related to TAG
08:43 kados ahh
08:43 gotcha
08:44 paul index = the number in the array of values.
08:44 kados still not a prob as each subfield containing a ... has an id
08:44 paul if I add one, everything becomes false.
08:44 kados right
08:44 paul I must get rid of this hardcoded index & find it dynamically.
08:44 kados cloneTag is definitely trickier than cloneSubfield :-)
08:45 paul right !
08:45 I thought it was easy, but i was wrong...
08:45 kados so while cloning a tag
08:45 you need to find and replace the ids of all subfields within it
08:45 paul conference.mai06 just registered Thomas Dukleth !
08:46 kados didn't Thomas already register?
08:46 paul if he already did, he did it again !
08:46 kados hehe
08:46 paul ok, I will have to put a div id=... on the subfield.
08:46 I see how to do it & even how to clone it.
08:47 how to get the id on the right of the ... now ?
08:47 (on the left)
08:47 kados you can set any attribute with 'setAttribute()'
08:48 subfield.setAttribute("id", newid);
08:48 paul I don't want to set if for instance, I want to GET it ;-)
08:48 kados ahh
08:48 subfield.getAttribute("id") should do the trick
08:48 pierrick hi kados
08:49 kados hi pierrick
08:49 paul mmm...
08:49 kados subfieldid = subfield.getAttribute("id");
08:49 pierrick paul, sorry to disturb, but I have a problem with itemtypes images
08:49 kados in fact
08:50 paul ok, I think i see how to do kados. i'll beep you if I need more help.
08:50 pierrick paul, images are in OPAC template, how can I display them in the intranet
08:51 (without creating symlinks)
08:51 paul did you try to switch to default template to see if/how it works ?
08:51 pierrick I'v taken the code from css template, but I didn't check if it was working
08:52 paul it was, at least when I commited it ;-)
08:52 pierrick sorry, I took the code from "default" not "css"
08:53 paul, do you have a separate virtual server for OPAC and intranet ?
08:53 paul yep
09:00 pierrick paul, even with default it doesn't work
09:00 paul sorry, but you'll have to investigate alone. Maybe it's buggy, it was commited soon in head.
09:00 pierrick Perl finds the pictures (with the filesystem) but Apache can't find them
09:01 paul (you'll have to investigate alone because I have a big problem with cloneTag that must be solved ASAP)
09:01 pierrick OK paul, IMO it can't work, I'll force to have a symlink between OPAC and intranet templates
09:08 paul kados: another question
09:08 (still javascript)
09:08 If I write :
09:08 defaultid=document.getElementById(subfieldid);
09:08 I get an object containing some <input>
09:09 I want to get the value of the field <input name="value"> in this object
09:09 how to do this ?
09:09 kados right
09:09 'name' is an attribute
09:09 so :
09:10 name = defaultid.getAttribute("name");
09:10 and 'name' should contain 'value'
09:10 paul name.value ?
09:10 kados yes
09:10 paul ok, i try this.
09:11 maybe i'll end by enjoying javascript...
09:11 kados in fact, you might not need name.value
09:11 paul (I already succeeded to enjoy Perl, so, hope is permitted ;-) )
09:11 kados name will probably just be a var containing value already
09:11 hehe
09:11 js can be fun when only dealing with firefox
09:11 otherwise, forget it!
09:12 pierrick (paul, with symlink itemtypes images work like a charm)
09:16 paul kados: it doesn't work
09:16 here is my HTML :
09:17 <div style=";" id="subfield600220"><p>
09:17 <input type="text" name="field_value" value="" size="70" maxlength="255" DISABLE READONLY>
09:17 <a  style="cursor: help;" href="javascript:Dopop('../authorities/a​uth_finder.pl?authtypecode=SAUT&index=su​bfield600220','subfield60220')">...</a>
09:17 <input type="hidden" name="tag" value="600"/>
09:17 <input type="hidden" name="subfieldYYY" value="a" size="2" maxlength="1"/>
09:17 <input type="hidden" name="mandatory" value="0"/>
09:17 <input type="hidden" name="kohafield" value=""/>
09:17 <input type="hidden" name="tag_mandatory" value="0"/>
09:17 </p>
09:17 </div>
09:17 here is my js :
09:17 defaultid=document.getElementById(subfieldid);
09:17 alert("DEF"+defaultid);
09:17 defaultvalue=defaultid.getAt​tribute("subfield_value");;
09:17 alert("DEF"+defaultvalue);
09:17 the 1st alert gives me :
09:17 object HTMLDivElement
09:17 the 2nd one answer : NULL
09:18 kados hmm
09:18 paul missing : function Dopop(link,subfieldid) {
09:18 (at the beginning of js)
09:18 kados right
09:18 defaultvalue=defaultid.getA​ttribute("subfield_value");
09:18 how does it know "subfield_value"?
09:19 hehe
09:19 did I write that?
09:19 paul no, you wrote "getAttribute("name")
09:19 but it doesn't work either
09:19 kados hmmm
09:20 it should work
09:20 http://www.mozilla.org/docs/do[…]dom_el_ref38.html
09:20 don't put it in ""
09:20 as that converts a var to a string
09:21 paul ??
09:21 kados no, I'm wrong
09:21 it's ok as ""
09:21 try:
09:22 defaultvalue=defaultid.getAttribute("name");
09:22 alert("DEF"+defaultid.value);
09:22 woops
09:23 alert("DEF"+defaultvalue.value);
09:23 paul js errove : defaultvalue has no properties
09:24 (as expected : as defaultvalue is null, it has no .value)
09:25 kados hmmm
09:25 paul the defaultid should contains some other objects (1 for each <input>)
09:25 so, what i'm looking for is not an attribute of defaultid.
09:25 kados ahh!
09:25 that's it then
09:25 paul it's the value of the object named "subfield_value"
09:26 "under" subfieldid
09:26 kados right
09:26 paul (that is unique)
09:26 kados so you can 'walk the DOM'
09:26 paul yo ! i'll become a walk the DOM man if you explain me how to do !
09:26 kados http://www.howtocreate.co.uk/t[…]ript/domstructure
09:26 hehe
09:27 I'm not very good at it myself, only having done it once or twice
09:30 paul Yo, Ithink I just started to walk the DOM.
09:30 a very good day ;-)
09:30 kados cool :-)
09:30 paul getElementsByTagName
09:30 is my friend now !
09:30 kados excellent!
09:31 we could really improve Koha quite a bit with some nice javascript
09:31 paul & we could improve our js skills with some understandable docs...
09:31 kados docs++
09:32 paul: one of my clients has bib + authority data _with_ linking numbers
09:33 paul: they are of the form: A123456.1 in the Bib record, and 123456.1 in the Auth record
09:33 paul: but we don't have a bulkauthimport.pl script, correct?
09:34 paul: how difficult would it be to import auth records assuming that all the links were correct (and in $9)
09:35 paul it should not be too hard I think
09:36 are the auth records in an iso2709 file ?
09:37 kados yes
09:37 each type of auth record is a separate file
09:37 authors.mrc, subjects.mrc, etc.
09:38 paul thus you should just have to modify bulkmarcimport to do an NEWauthority instead of a NEWbiblio !
09:38 and that should be enough.
09:38 kados great!
09:38 paul (assumed the links are correct & in $9)
09:38 kados yep
09:40 thx
09:40 I'll give that a shot
09:48 paul: where is 'NEWauthority' method?
09:48 paul: I see 'newNEWbiblio', but no NEWauthority
09:48 paul AUTHaddauthority
09:48 (in AuthoritiesMarc.pm
09:48 )
09:49 kados ahh, thanks
10:01 paul kados : do you know if thd will stay for the devWeek ?
10:04 kados I'm not sure
10:15 paul kados: how to get all <div> that are childs of an object ?
10:15 i explain what i'm doing : i pass the tag$id to be able to find all <input> (that are the subfields of the tag)
10:16 to report the authority value.
10:16 hi thd.
10:16 (or is it an auto reconnect ?)
10:17 thd hello paul
10:17 paul hi thomas.
10:17 just saw your registration for 2/3 may.
10:17 do you plan to come to Marseille too ?
10:18 (for devWeek ?)
10:18 thd yes, I merely had neglected to register for the convention
10:19 paul did you reserve an hotel ?
10:19 (for Marseille I mean)
10:19 thd paul: hdl was kind enough to change his room in Marseille for a twin to share with me
10:19 paul ok, great
10:20 (+ we now have a problem, as we will be 11 for 2 cars !)
10:20 i'll try to find a solution to this problem...
10:21 thanks, I go back to bug hunting
10:21 thd paul: do you mean cars between the hostel and the conference location in Marseille?
10:21 paul yep
10:21 mine + hdl one
10:24 thd paul: I made the change with hdl about a week ago when I found that the hostels had all been booked but I believe there is public transport in Marseille.
10:24 paul don't worry, i'll take care of this.
10:25 thd paul: Do you live near Marseille?
10:25 paul I live in Marseille !
10:25 (south of)
10:25 (and the CMI is on the north)
10:25 the hotel being in the center !
10:25 on the left is the sea.
10:26 and on the west a part of the city, then "calanques"
10:26 thd paul: I thought there was more sea to the south :)
10:26 paul that's a mistake everybody does...
10:26 Marseille is N/S oriented.
10:26 the mediteranean sea is on the west
10:30 thd paul: I only have to pester the US state department to ensure that my passport arrives in time,  There should be no danger even if they took the maximum time from my application but I do not have it yet.
10:32 paul: kados:has given me some work which has kept me busy and under communicative recently.
10:35 paul: Is the any real risk of the places for convention in Paris becoming over full.  I have been trying to have someone from Madrid come to Paris but his plans keep changing.
10:35 ?
10:36 paul for the 1st day, no risk : there are more than 100
10:36 for 3rd, we may need to move to a larger room !
10:36 (for instance, it's only 30places)
10:37 thd paul: I told him that the 3rd day was likely to have the best detailed information.
10:39 paul: From the presenters, it would seem that 3 May will also mostly be in English.  Is that correct?
10:39 paul yep.
10:39 translated by jp sakoun & me.
10:39 thd paul: Is that an oral translation?
10:40 paul yes
10:40 but I asked everybody to send presentations 1 week before to have it on paper too
10:41 thd paul: Will you provide an oral translation from French into English as well?  I had noticed paper translation of text previously.
10:41 paul I won't, but jean pierre will
10:41 (or maybe i will as well)
10:42 (but my accent is really poor, jean pierre's highly better)
10:46 thd paul: I can guess at the text of a few languages, mostly French,  but I cannot follow the spoken language in any language but English :)
10:51 paul: my French is mostly serviceable for buying and simple cataloguing.of books.
11:02 pierrick read you tomorrow, I'm leaving (paul, I'll commit itemtypes tomorrow)
11:06 paul_away see you later
11:40 griffjon OK, so I've used the marc import tool to get my old Access DB loaded into the bilbio table -- but I can't figure out how to "activate" these records so that they appear in the catalog?

← Previous day | Today | Next day → | Search | Index

koha1