Open Source Integrated Library System

Evergreen on IRC

#openils-evergreen Logs for Monday, April 20th, 2009

< Sunday, April 19th, 2009Raw Log FileTuesday, April 21st, 2009 >
#TimeNickMessage
#00:07:49dbs has quit IRC
#00:38:13brendan_ga has quit IRC
#00:53:35eby_ has quit IRC
#01:09:53sylvar has quit IRC
#01:19:55lmcfarland has quit IRC
#01:20:45phasefx has quit IRC
#01:21:23dmcmorris_esi has quit IRC
#01:23:58sylvar has joined #openils-evergreen
#01:25:48dmcmorris_esi has joined #openils-evergreen
#04:05:54sylvar_ has joined #openils-evergreen
#04:18:38sylvar has quit IRC
#06:10:19BenO has joined #openils-evergreen
#06:54:11natschil has joined #openils-evergreen
#07:01:37natschil is now known as natschil_
#07:01:39natschil_ is now known as natschil
#07:06:04natschilwhat is used by the evergreen perl code to manipulate marc stuff? e.g. is there a function that would let me do something like my $marc=record.marc; my @strings = marc.subfields(650);
#07:41:46natschil_ has joined #openils-evergreen
#07:49:14kgs has joined #openils-evergreen
#07:55:51natschil has quit IRC
#08:38:52sylvar_home has joined #openils-evergreen
#08:41:50rickd_ has quit IRC
#08:42:29rickd has joined #OpenILS-Evergreen
#09:02:49_dkyle1 has joined #openils-evergreen
#09:39:07natschil_sorry for repeating this question, but when I asked it the first time I'm not sure if anyone was on the channel (early morning us time)... what is used by the evergreen perl code to manipulate marc stuff? e.g. is there a function that would let me do something like my $marc=record.marc; my @strings = marc.subfields(650);
#09:44:10phasefx has joined #openils-evergreen
#09:44:17bericknatschil_: see the marc::record perl module
#09:46:09natschil_berick: thanks a lot
#09:55:12wjr processes like 9 opac password reset requests
#09:55:18wjrhappy monday
#10:27:47dbs has joined #openils-evergreen
#10:28:05brendan_ga has joined #OpenILS-Evergreen
#10:28:31dbsjust thinking out loud here: i bet site running Evergreen clusters use an NFS mount for /openils
#10:30:48gmcharlt has joined #OpenILS-Evergreen
#10:33:43miker_dbs: some do. generally, per-brick, served from the apache box (brick head)
#10:34:41dbsmiker_: it makes so much sense, once you're in the position of trying to synchronize a handful of servers :)
#10:35:02dbsor 40 (or whatever PINES went live with)
#10:38:13dbsbtw, all is going relatively well at the moment, although the --max_uri / --max_cn parms for direct_ingest ; those are intended to enable parallel batch processing, I'm guessing?
#10:38:22berickwith 1.4, there is the added need for a globally shared NFS ..er.. share to store MARC upload files... writable by apache and readable by all drones
#10:38:32dbsberick: right, that's been on my mind
#10:39:40brendan_ga has quit IRC
#10:40:37dbsI was a bit surprised that the auri's seem to be allowing the DB to assign IDs, as the auricnm depends on auri.id
#10:42:05brendan_ga has joined #OpenILS-Evergreen
#10:42:31miker_dbs: there're not intended for that, though I suppose they serve that purpose. I wanted to avoid the id lookup when doing batch processing
#10:42:52brendan_ga has quit IRC
#10:43:08miker_they being the max_foo switches
#10:43:39dbsokay - right now I think it would be pretty much impossible to process two batches in parallel, because there are no guarantees about how many URIs a given bib will have (0..*)
#10:43:49dbsyeah, it took me a second to parse that :)
#10:45:49miker_dbs: you could count the number of 856 tags (grep on the marcxml) and assume all will be magical. that would leave holes, but that's not a problem, per se
#10:47:04dbsmiker_: yeah, I would have to count 856 with subfield 9s to be accurate - maybe in yaz-marcdump -o line output
#10:48:43natschil_why doesn't opensrf let me return a string? if I do something like my my $result = "<h1>" . $record->marc.author() . "</h1>"; return result; this causes open-ils.search to crash
#10:49:18miker_$record->marc.author() doesn't look like valid perl to me
#10:49:54natschil_sorry, record->marc->author();
#10:50:24natschil_ is too used to using -> with pointers from c/c++
#10:50:26miker_what is $record? a Fieldmapper::biblio::record_entry object?
#10:52:17miker_natschil_: assuming so, the content of the marc field in that object is the marcxml. it would need to be handled by some xml code
#10:53:11natschil_well, I'm not too sure myself :) I basically copied the part that gets me the marc record from biblio_record_to_marc_html, and I assumed that it is a MARC::Record object, this creates the reocrd in biblio_record_to_marc_html: $record = $e->retrieve_biblio_record_entry($recordid)
#10:53:57dbsheh, i think that's a bad assumption :)
#10:54:05natschil_probably
#10:54:29natschil_but even doing return 'Hello World'; gives me an error
#10:55:09miker_natschil_: mind pastebin'ing your sub along with the method registration?
#10:56:28natschil_well, I tried doing something like this: sub hello_world() {return 'Hello World';}, and this ran fine when I ran it in perl. Method registration works, as return 0; works
#10:56:35dbsLooks like that's using the CStoreEditor, which would retrieve an entry from the biblio.record_entry table due to the magical method name, which would be represented as a Fieldmapper::biblio::record_entry with member variable "marc" which would indeed by MARCXML (if I understand all this correctly)
#10:56:38natschil_or something along those lines
#10:57:02natschil_yup, its probably marcxml....how do I manipulate it?
#10:58:05sylvar_laptop has joined #openils-evergreen
#10:58:29miker_my $author = $parser->parse_string($record->marc)->findvalue('//*[@tag="100"]/*[@code="a"]'); # for the super-idomatic version
#10:58:52natschil_is there an easier way?
#10:59:09miker_natschil_: what do you mean by "Method registration works, as return 0; works"?
#10:59:29miker_can you pastebin your hello world example?
#10:59:34miker_http://paste.lisp.org/new/openils-evergreen
#10:59:36natschil_sure
#11:02:17lisppaste6natschil pasted "perl hello world sub" at http://paste.lisp.org/display/78894
#11:03:14natschil_sorry, I forgot the () ....
#11:03:22natschil_in the paste
#11:03:58dchristens has joined #OpenILS-Evergreen
#11:04:29miker_and what error do you get in srfsh when you attempt to call open-ils.search.biblio.bibliographic_entry.html?
#11:05:18miker_hrm... what () did you forget?
#11:05:49miker_fg
#11:05:55miker_heh
#11:09:26natschil_heh, strangely enough now it works, even though it didn't work before (even with the () :)), but replacing the 'Hello World' with 0 did work....now I tried it again and it works :)
#11:10:07miker_;)
#11:12:49natschil_ feels like an idiot
#11:13:20miker_sometimes all it takes is to say/type it
#11:18:43natschil_where would perl put errors like that?
#11:21:25dbsmight be logged to /openils/var/log/*log somewhere
#11:24:39natschil_strange....as soon as I changed anything, i get that same error again (Unable to communicate with service open-ils.search) fom srfsh... could someone tell me if there is anything blatantly wrong with my perl code?
#11:25:07lisppaste6natschil pasted "perl stuff" at http://paste.lisp.org/display/78895
#11:26:58dchristensMorning, folks. Question: on the holds pull list (Circ menu -> pull list for holds requests), is it possible to change the width of the "title" column? (Say, by eliminating the patron barcode, which doesn't help staff pluck the book from the shelf)
#11:28:00dchristensI'm looking at var/web/xul/server/patron/holds.js (but I'm not even sure I'm looking in the right place) :-)
#11:28:38dbslisppaste6: strange to see () on the function name, that's usually only used for specifying arg types to Perl subs (which is generally discouraged)... but otherwise, nothing immediate
#11:29:42natschil_oh, I don't need the () ? I thought that not having it was what was wrong with the code in the first place...
#11:29:44dbsheh, I'm talking to lisppaste6 now... you can pretty much disregard anything that comes out of my allergy-inflicted head today
#11:31:24natschil_ok, I removed the (), and voila, it works! ... now why did it work before *with* the () ?
#11:31:57natschil_before
#11:33:16dbsperhaps you were passing no arguments to it before? unknown
#11:34:17dchristenshrm... server/admin/hold_pull_list.xhtml looks more promising....
#11:37:31natschil_now back to the original question...what is the library used by evergreen for xml manipulation? miker_ said that this ( my $author = $parser->parse_string($record->marc)->findvalue('//*[@tag="100"]/*[@code="a"]');) would get me the author from some marcxml, (for the super-idomatic version), but is there also another, easier way to do this?
#11:40:29sylvar_laptop has quit IRC
#11:41:04natschil_or, I mean a shorter way to do it with something like $xmlfile->get("author/a") that would let me get stuff from an xml file like the evergreen installation instructions tell you which values to modify...I think they call it an XPath like syntax
#11:41:05dbsnatschil_: this is why I was pointing you at ModsParser.pm and the mvr before (open-ils.search.biblio.metarecord.mods_slim.retrieve in OpenILS/Application/Biblio.pm
#11:41:18natschil_dbs: what does this do?
#11:42:00dbsGives you a JSON representation of the pertinent fields of a bib record, including author, title, etc.
#11:42:46natschil_ is now known as natschil
#11:43:50dbsI guess you could run stuff through MARC::Record and use its convenience functions for author() and the like. *shrugs*
#11:44:08natschilwhat would be the "better" way to do it?
#11:47:41dbsIf this is in the rdetails page, then you're already retrieving the mods_slim record (open-ils.search.biblio.record.mods_slim.retrieve) so I would just reuse that
#11:48:09dbs(mods_slim = mvr)
#11:52:16Roger2k10 has joined #openils-evergreen
#11:54:11natschilok
#11:54:23Roger2k10This is probably a dumb question but I'm having problems locating any kind of information about this. How do I add a branch or change branch information? I've tried using cgi-bin/lib-setup.cgi but none of the changes I make there seem to get reflected in the opac.
#11:54:48natschilRoger2k10: have you run autogen.sh? restarting memcached could also help
#11:55:01BenO has quit IRC
#11:55:27natschildbs sorry, but I don't quite understand what you mean with mvr... is it another name for mods_slim?
#11:56:22dbsnatschil: yep. http://dev.gapines.org/osrf-gateway-v1?locale=en-US&method=open-ils.search.biblio.record.mods_slim.retrieve&param=189840&service=open-ils.search is the service call that returns the mvr record (mvr class hint as defined in fm_IDL.xml) used by http://dev.gapines.org/opac/en-US/skin/default/xml/rdetail.xml?r=189840&t=ginger&tp=keyword&d=0&hc=35&rt=keyword for its bibliographic info
#11:56:30miker_Roger2k10: after making changes there you'll need to run the autogen.sh script (typically in /openils/bin/)
#11:57:44Roger2k10Would I run it as opensrf?
#11:58:17natschilRoger2k10: yes, you would run something like autogen.sh -c /openils/conf/opensrf_core.xml -u
#11:59:14natschildbs: does this go into a javascript var?
#11:59:56dbsnatschil: yep, if you look at rdetail.js (although the method name will be replaced by a const defined in config.js which can make it a bit of a pain to correlated the two)
#12:00:45jamesrf has joined #openils-evergreen
#12:05:19Roger2k10Nice. Seems to have worked. Now how do I remove things using this lib-setup.cgi or is there something else I'm supposed to do. I see how to add organizational units, but no way to remove them
#12:08:23eby has joined #OpenILS-Evergreen
#12:09:09dchristens:-) solved my holds-pull-list title question. Width of a column seems to depend on the width of the longest element... change <td>&staff.server.admin.hold_pull.title.label;</td> to <td>&staff.server.admin.hold_pull.title.label;................................</td>
#12:09:18dchristens(not pretty, but it works)
#12:09:36sylvar_laptop has joined #openils-evergreen
#12:10:12dchristenshide a column by adding "class='hide_me' to the <td> for both title and row :-)
#12:17:43dbsdchristens: hah, nice hack :)
#12:18:31dbscould add some CSS too, I would imagine, but if it works for you, it's a win! dchristens++
#12:18:32phasefxuse the alternate pull list and have printing be templatable :)
#12:25:40dchristensdbs: thx :-)
#12:26:11dchristensphasefx: ok, that piqued my curiousity....
#12:26:36phasefxdchristens: under Admin -> Local System Administration, there are two other "experimental" pull lists
#12:27:08phasefxone is XUL interface, and ties into the templating system configurable through Admin -> Receipt Template Editor
#12:27:20dchristensphasefx: sweet!
#12:27:52phasefxthe other is a hack of the standard pull list, to make it resemble some email PINES libraries used to get
#12:29:57dchristensOk, I'm definitely going to play around with that, in my Copious Free Time (tm) :-)
#12:30:07phasefxdchristens++
#12:38:26natschildbs: I think I'll stick to trying to do it with perl for now...if I have a MODS record, how would I get something e.g. the author from it (in perl). is there some related cpan module, or do I need to do it with open of the evergreen modules?
#12:38:48dbsMODS is just plain ol' XML, so XML::LibXML or whatever you like
#12:38:49natschili meant: with one of the evergreen modules?
#12:39:12dbsInterestingly, ModsParser.pm demonstrates that :)
#12:41:50natschilk....so is the mods data basically just the marcxml, but with fewer things in it?
#12:43:27natschilsorry, I'm still confused about what ModsParser.pm actually does :)
#12:43:56dbsMODS = semantically meaningful elements and attributes
#12:44:03natschilok
#12:44:17dbsMARC(XML) = semantically meaningless tags and subfields
#12:44:53dbsMARC2MODS*.xsl = represent MARC in a semantically meaningful XML representation
#12:45:29natschilis mods_slim the same as mods?
#12:46:11dbsMODS record: http://dev.gapines.org/opac/extras/supercat/retrieve/mods32/record/189840
#12:46:22dbsMARCXML record: http://dev.gapines.org/opac/extras/supercat/retrieve/marcxml/record/189840
#12:47:28dbsnatschil: no, mods_slim is a subset of MODS that pulls the most interesting bibliographic fields together
#12:51:34natschilso, correct me if I'm wrong: MODS is the important stuff from MARCXML, and mods_slim is the important stuff from mods, right?
#12:51:55sylvar_laptop has quit IRC
#12:52:07sylvar_laptop has joined #openils-evergreen
#12:52:19dbsnatschil: that's a reasonable way of looking at it.
#12:52:35sylvar__ has joined #openils-evergreen
#12:52:49sylvar__ is now known as sylvar_laptop
#12:52:57dbscould substitute "more convenient means at getting at the most important stuff" for each step there, but yeah
#12:53:21natschilis there somewhere that I could find a mods_slim file?
#12:53:54dbsnatschil: not really, just the URL I pointed at earlier as an example
#12:54:52natschilok, is the "MODS record" a mods_slim one?
#12:55:33dbsno, http://dev.gapines.org/osrf-gateway-v1?locale=en-US&method=open-ils.search.biblio.record.mods_slim.retrieve&param=189840&service=open-ils.search
#12:57:30natschilbut that doesn't look like xml
#12:57:45dbscorrect, it isn't
#12:58:27natschilok, so MODS and MARCXML are xml, but mods_slim is the information from MODS all in a string, seperated by commas?
#12:58:31dbsbut you can use JSON2perl to turn it into a living, breathing mvr object in Perl
#12:58:33dbsit's JSON
#12:58:42dbsand it's an opensrf class
#12:58:59dbsand I really, really have to focus on some of my work for a bit :)
#12:59:36natschilsorry, I ask too many questions :)
#12:59:48phasefxnatschil: so that string is the serialized form of an object, and can be turned back into an object (in perl, in javascript, in python, etc.)
#13:00:28phasefxin fact, if you're using OpenSRF libraries to call that method (through the gateway or otherwise), you'll get the response as an object automatically
#13:02:11natschilwhat kind of object is this? i.e how would I get the data from this object?
#13:03:45phasefxthere are classes associated with these, that defines getters/setters for each of the fields available. These classes are constructed dynamically based on the contents of fm_IDL.xml
#13:04:18phasefxso if you search for fm_IDL.xml for class="mvr", you'll see how this type of object is defined
#13:04:51phasefxin javascript, you can do something like var foo = new mvr(); foo.author()
#13:05:31natschiland in perl?
#13:05:38phasefxperl would be something similar.. the underlying object would be an array, that gets "blessed" into an object with those methods
#13:05:50phasefxfoo->author() or some such for access
#13:06:02natschilok, thanks, I'm starting to understand how this works
#13:06:15phasefxbut instead of mvr, it'd be a longer identifier based on perl modules
#13:06:23phasefxFieldmapper::something
#13:14:38r123 has joined #openils-evergreen
#13:20:52natschilwhat does mods do if there's two authors?
#13:25:33dbscreates two name elements, just like http://dev.gapines.org/opac/extras/supercat/retrieve/mods32/record/189840
#13:31:58granthpal has joined #openils-evergreen
#13:32:57natschilbut then, in perl, if I do foo.author(), does it only give me the first author, and how do I get the second author? also, does mods_slim include the palce of publicatio?
#13:33:54dbsI think foo->author would return a list of authors, so something like foo->author[0] would give you the first. Although I am heavily medicated right now.
#13:35:56granthpal has quit IRC
#13:37:53natschildbs: thanks
#13:43:08gmcharlt has quit IRC
#13:46:37eby has quit IRC
#13:47:29granthpal has joined #openils-evergreen
#13:53:20Roger2k10in terms of bulk importing marc records, if my holdings data is stored in the 852 field instead of 999, am I pretty much boned?
#13:55:16sylvar__ has joined #openils-evergreen
#13:56:00natschilRoger2k10: you could probably replace all occurences of 852 with 999 in the marc records, if you are not using the 999 field for something else.
#13:57:17sylvar__ has quit IRC
#13:57:29dchristensRoger2k10: I think you can specify the holdings tag/subfields in the bulk import script(s).... somewhere....
#13:58:16dbsyeah, you can search/replace the 999 in the ultra-stupid import script (i can say that because I wrote it!)
#13:58:25gmcharlt has joined #OpenILS-Evergreen
#13:58:35Roger2k10ok
#13:58:44dbspreferred method is to load the holdings separately a la http://open-ils.org/dokuwiki/doku.php?id=importing:holdings:import_via_staging_table
#13:59:35dbsso if you can get your holdings out of your old system separately, that's probably easier than parsing them out of the MARC record itself
#14:01:42gmcharlt has quit IRC
#14:13:43sylvar_laptop has quit IRC
#14:16:20Roger2k10The old system isn't very flexible. The only export is usmarc with 852 holdings data.
#14:32:25natschil_ has joined #openils-evergreen
#14:34:11dbsphasefx: uhh, where did you see that super-funky network message in the staff client?
#14:34:24dbs'cause I'm seeing it trying to connect to our trunk server right now
#14:34:33dbs(or some variation on it)
#14:35:26lisppaste6dbs pasted "funky staff client message from trunk for phasefx" at http://paste.lisp.org/display/78907
#14:35:39phasefxdbs: it was a trunk client.. trying to print from the Item Status interface
#14:35:46natschil has quit IRC
#14:36:14dbshuh, this is occuring on the first login attempt. hrm.
#14:36:18natschil_ is now known as natschil
#14:39:11granthpal has quit IRC
#14:44:07Roger2k10So another question along those lines. My records don't seem to have an 035 field. What is this exactly?
#14:45:56chrissharp123Roger2k10: http://www.oclc.org/bibformats/en/0xx/035.shtm
#14:46:07chrissharp123just happened to be watching as you asked :-)
#14:53:21Roger2k10Is this information something I would be likely to have in another field perhaps?
#14:54:06chrissharp123since it's not a required field, perhaps not...
#15:19:56dchristens has left #OpenILS-Evergreen
#15:27:38natschil has quit IRC
#15:32:01r123 has quit IRC
#15:58:54natschil has joined #openils-evergreen
#16:07:46jamesrf has quit IRC
#16:19:21natschil has quit IRC
#16:21:43dchristens has joined #OpenILS-Evergreen
#17:01:19levani_ele has joined #openils-evergreen
#17:01:42jamesrf has joined #openils-evergreen
#17:18:25dchristensAnyone on have experience setting up the simple2zoom z39.50 server, as per http://www.open-ils.org/dokuwiki/doku.php?id=evergreen-admin:sru_and_z39.50 ?
#17:19:10dchristens(er... "and the time for a couple of questions" :-)
#17:31:26dchristensHeh... guess not :-)
#17:31:42dchristens has left #OpenILS-Evergreen
#18:13:16phasefx has quit IRC
#18:13:16sylvar_ has quit IRC
#18:13:16lisppaste6 has quit IRC
#18:13:16phasefx_ has quit IRC
#18:20:00phasefx has joined #openils-evergreen
#18:20:00sylvar_ has joined #openils-evergreen
#18:20:00lisppaste6 has joined #openils-evergreen
#18:20:00phasefx_ has joined #openils-evergreen
#19:41:12eby has joined #OpenILS-Evergreen
#19:45:14mib_2is2yc has joined #openils-evergreen
#19:47:30levani_ele has quit IRC
#19:50:46jamesrf has quit IRC
#20:07:34mib_2is2yc has quit IRC
#20:23:44dbs has quit IRC
#20:39:25djfiander has joined #OpenILS-Evergreen
#20:48:07jamesrf has joined #openils-evergreen
#21:00:09dbs has joined #openils-evergreen
#21:00:43dbsmiker_: 830K bibs loaded in one big chunk, no problems with the auris + friends
#21:00:53dbsand holy hell is our database server fast. yayz
#21:01:13dbs goes to play a celebratory game of hockey
#21:59:19kgs has quit IRC
#22:10:40djfiander has quit IRC
< Sunday, April 19th, 2009Raw Log FileTuesday, April 21st, 2009 >