]> git.evergreen-ils.org Git - contrib/Conifer.git/log
contrib/Conifer.git
4 years agoCapture more than just " /" from 245$h tools_current
Dan Scott [Tue, 7 Apr 2020 20:22:28 +0000 (16:22 -0400)]
Capture more than just " /" from 245$h

"‡h[microform] :" happens too

Signed-off-by: Dan Scott <dan@coffeecode.net>
4 years agoAllow date option to be unspecified, fix 245$h handling
Dan Scott [Tue, 7 Apr 2020 20:02:10 +0000 (16:02 -0400)]
Allow date option to be unspecified, fix 245$h handling

We had always been adding the last two characters of 245$h, even if they
were just "].", which messes up some records. Let's only add them if
they are " /".

Signed-off-by: Dan Scott <dan@coffeecode.net>
4 years agoRecognize more DOIs for Springer books
Dan Scott [Tue, 7 Apr 2020 17:05:04 +0000 (13:05 -0400)]
Recognize more DOIs for Springer books

Signed-off-by: Dan Scott <dan@coffeecode.net>
4 years agoUse the HTTPS version of Scholars Portal books
Dan Scott [Tue, 7 Apr 2020 17:04:44 +0000 (13:04 -0400)]
Use the HTTPS version of Scholars Portal books

Signed-off-by: Dan Scott <dan@coffeecode.net>
4 years agoStop appending periods to publisher/platform
Dan Scott [Tue, 7 Apr 2020 17:04:11 +0000 (13:04 -0400)]
Stop appending periods to publisher/platform

Signed-off-by: Dan Scott <dan@coffeecode.net>
4 years agoAdd a date cutoff option for Scholars Portal books
Dan Scott [Tue, 7 Apr 2020 17:03:12 +0000 (13:03 -0400)]
Add a date cutoff option for Scholars Portal books

Signed-off-by: Dan Scott <dan@coffeecode.net>
4 years agoTweak for better Oxford Scholarship Online handling
Dan Scott [Tue, 7 Apr 2020 16:08:39 +0000 (12:08 -0400)]
Tweak for better Oxford Scholarship Online handling

4 years agoUse the DOI to determine platform for 956 Springer
Dan Scott [Wed, 22 Jan 2020 01:27:01 +0000 (20:27 -0500)]
Use the DOI to determine platform for 956 Springer

Signed-off-by: Dan Scott <dan@coffeecode.net>
4 years agoRun black and pylint-3 against prep_ebook_records.py
Dan Scott [Tue, 21 Jan 2020 02:35:35 +0000 (21:35 -0500)]
Run black and pylint-3 against prep_ebook_records.py

Signed-off-by: Dan Scott <dan@coffeecode.net>
4 years agoAdd an input pattern to the web UI for patron-load
Dan Scott [Mon, 9 Sep 2019 14:51:32 +0000 (10:51 -0400)]
Add an input pattern to the web UI for patron-load

Signed-off-by: Dan Scott <dan@coffeecode.net>
4 years agoMore robust patron-load interface
Dan Scott [Fri, 30 Aug 2019 16:29:59 +0000 (12:29 -0400)]
More robust patron-load interface

Feels bad to be hard-coding the path in the template, but something in
the reverse proxy broke, so let's just ensure that we're complying with
expectations. Not a bad thing to add in an isnumeric() check for
example.

Signed-off-by: Dan Scott <dan@coffeecode.net>
4 years agoRobustify in face of new affiliation: "Collaboration"
Dan Scott [Thu, 29 Aug 2019 17:00:18 +0000 (13:00 -0400)]
Robustify in face of new affiliation: "Collaboration"

Also map "Collaboration" to the same as "Affiliate" (Staff).

Signed-off-by: Dan Scott <dscott@laurentian.ca>
4 years agoTweak graduate vs. undergraduate profile determination
Dan Scott [Thu, 29 Aug 2019 16:19:18 +0000 (12:19 -0400)]
Tweak graduate vs. undergraduate profile determination

If lulPrimaryAffiliation = 'Student', we also need to check
lulStudentLevel to determine if they are graduate or undergraduate
students.

Signed-off-by: Dan Scott <dan@coffeecode.net>
4 years agoPython is case-sensitive, remember?
Dan Scott [Wed, 14 Aug 2019 16:14:09 +0000 (12:14 -0400)]
Python is case-sensitive, remember?

Signed-off-by: Dan Scott <dan@coffeecode.net>
4 years agoAnother invalid Colleague ID pattern to skip over
Dan Scott [Thu, 8 Aug 2019 21:33:28 +0000 (17:33 -0400)]
Another invalid Colleague ID pattern to skip over

Signed-off-by: Dan Scott <dan@coffeecode.net>
4 years agoBe really strict about invalid lulColleagueId values
Dan Scott [Wed, 7 Aug 2019 21:12:39 +0000 (17:12 -0400)]
Be really strict about invalid lulColleagueId values

Signed-off-by: Dan Scott <dan@coffeecode.net>
5 years agoPrefer URIs for relators in RDA fields
Dan Scott [Sun, 13 May 2018 14:22:16 +0000 (10:22 -0400)]
Prefer URIs for relators in RDA fields

Signed-off-by: Dan Scott <dscott@laurentian.ca>
6 years agoSupport Python 3
Dan Scott [Tue, 24 Apr 2018 16:36:56 +0000 (12:36 -0400)]
Support Python 3

Switch to requests and beautifulsoup4 modules, use the
interoperable print() function, adjust to the updated
exceptions approach, and use dict.items() instead of
the (gone) dict.iteritems().

Signed-off-by: Dan Scott <dscott@laurentian.ca>
6 years agoPrefer RDA fields (33x) to GMD
Dan Scott [Tue, 17 Apr 2018 18:11:15 +0000 (14:11 -0400)]
Prefer RDA fields (33x) to GMD

Strip out the GMD (245 $h) and add 336, 337, 338 fields
that include our desired content, media, and carrier.

These should probably be made optional as well, for example
for different content types, or for records that are already
RDA-compliant.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
6 years agoAdd a "cut-field" option to strip fields
Dan Scott [Tue, 17 Apr 2018 18:10:38 +0000 (14:10 -0400)]
Add a "cut-field" option to strip fields

Note that this will strip all instances of the field from every
record, so use with care.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
6 years agoMake 'consortium' flag optional
Dan Scott [Tue, 17 Apr 2018 18:10:04 +0000 (14:10 -0400)]
Make 'consortium' flag optional

As not all purchases are consortial in nature.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
6 years agoEnsure the leader says we are a text record
Dan Scott [Tue, 17 Apr 2018 18:08:29 +0000 (14:08 -0400)]
Ensure the leader says we are a text record

Of course, we might want to revisit this with an option to support serials as
well.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
6 years agoPrep ebooks: we know if it's Springer
Dan Scott [Fri, 2 Mar 2018 22:48:02 +0000 (17:48 -0500)]
Prep ebooks: we know if it's Springer

Signed-off-by: Dan Scott <dscott@laurentian.ca>
6 years agoOff-by-one error in 008 munging
Dan Scott [Wed, 7 Feb 2018 16:58:57 +0000 (11:58 -0500)]
Off-by-one error in 008 munging

Signed-off-by: Dan Scott <dscott@laurentian.ca>
6 years agoAvoid entering entirely empty library hours
Dan Scott [Tue, 19 Dec 2017 17:58:14 +0000 (12:58 -0500)]
Avoid entering entirely empty library hours

If every day is closed, then calculating a due date leads to infinity. Which
wreaks havoc on your database queries...

Signed-off-by: Dan Scott <dscott@laurentian.ca>
6 years agoHours parsing tool
Dan Scott [Wed, 13 Sep 2017 20:18:45 +0000 (16:18 -0400)]
Hours parsing tool

Signed-off-by: Dan Scott <dscott@laurentian.ca>
6 years agoDon't label the 956 platform, because we know not what it is
Dan Scott [Fri, 8 Sep 2017 17:50:09 +0000 (13:50 -0400)]
Don't label the 956 platform, because we know not what it is

Signed-off-by: Dan Scott <dscott@laurentian.ca>
6 years agoClean up ISBN fields while we're processing
Dan Scott [Fri, 1 Sep 2017 20:09:51 +0000 (16:09 -0400)]
Clean up ISBN fields while we're processing

Might as well put junk into 020q if we have it.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
6 years agoArgs can be UTF8 people too!
Dan Scott [Fri, 1 Sep 2017 19:17:46 +0000 (15:17 -0400)]
Args can be UTF8 people too!

Signed-off-by: Dan Scott <dscott@laurentian.ca>
6 years agoHack to support Oxford DOIs in 956 fields
Dan Scott [Tue, 29 Aug 2017 17:12:15 +0000 (13:12 -0400)]
Hack to support Oxford DOIs in 956 fields

ScholarsPortal MARC records put Oxford DOIs in their 956 fields instead
of 856; let's use both of them and hope that no other records use a 956
that doesn't actually resolve.

Also, if the URL is for books.scholarsportal.info, identify
ScholarsPortal as the platform.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
6 years agoDefault to HTTPS for ebook / SFX links
Dan Scott [Mon, 28 Aug 2017 18:25:53 +0000 (14:25 -0400)]
Default to HTTPS for ebook / SFX links

Signed-off-by: Dan Scott <dscott@laurentian.ca>
6 years agoScript for generating cover images
Dan Scott [Fri, 25 Aug 2017 19:15:28 +0000 (15:15 -0400)]
Script for generating cover images

Signed-off-by: Dan Scott <dscott@laurentian.ca>
7 years agoConnect to the right OpenSRF host for authentication feature/tools_current
Dan Scott [Fri, 17 Mar 2017 17:37:38 +0000 (13:37 -0400)]
Connect to the right OpenSRF host for authentication

Signed-off-by: Dan Scott <dscott@laurentian.ca>
7 years agoWe don't have a code for some exceptions
Dan Scott [Fri, 17 Mar 2017 17:37:22 +0000 (13:37 -0400)]
We don't have a code for some exceptions

Signed-off-by: Dan Scott <dscott@laurentian.ca>
7 years agoRefine Alumni mappings
Dan Scott [Fri, 17 Mar 2017 17:36:39 +0000 (13:36 -0400)]
Refine Alumni mappings

Give them the correct (non-reader) profile mapping and 5 years expiry
date, because alumni never really expire.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
7 years agoPrefer primary affiliation over student level feature/tools_2_4
Dan Scott [Tue, 17 Jan 2017 14:33:48 +0000 (09:33 -0500)]
Prefer primary affiliation over student level

When figuring out the intended profile for a given account, let primary
affiliation win; we have accounts that started as students and are now back as
faculty, and the lulStudentLevel still identifies them as undergrads. That
ain't right!

Signed-off-by: Dan Scott <dscott@laurentian.ca>
7 years agoUpdate profile mappings for faculty and grads
Dan Scott [Thu, 12 Jan 2017 21:22:11 +0000 (16:22 -0500)]
Update profile mappings for faculty and grads

Signed-off-by: Dan Scott <dscott@laurentian.ca>
7 years agoAdd visitor profile parsing
Dan Scott [Thu, 27 Oct 2016 15:19:27 +0000 (11:19 -0400)]
Add visitor profile parsing

We have a strange category of students who come here for the summer but are not
officially LU students, so treat them as visitors. More work may need to be
done to distinguish them from guests.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
7 years agoSkip NO_COLLEAGUE_ID situation
Dan Scott [Thu, 27 Oct 2016 15:16:40 +0000 (11:16 -0400)]
Skip NO_COLLEAGUE_ID situation

Rather than literally using "NO_COLLEAGUE_ID" as the colleague ID, refuse to
create or update the corresponding record. Any LDAP records created through the
normal process should have colleague IDs, even for visitors/guests.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
7 years agoMake loginExpirationTime attribute great again
Dan Scott [Thu, 27 Oct 2016 15:15:50 +0000 (11:15 -0400)]
Make loginExpirationTime attribute great again

If the LDAP record has this attribute, it should trump everything.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
7 years agoSupport query parm of "creation end time"
Dan Scott [Thu, 27 Oct 2016 15:12:13 +0000 (11:12 -0400)]
Support query parm of "creation end time"

Having both a start and end time enables staging of
updates over swathes of users by time.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
8 years agoAdd platform identifier to the 856 link text
Dan Scott [Tue, 15 Mar 2016 13:07:23 +0000 (09:07 -0400)]
Add platform identifier to the 856 link text

We want "Available online / Disponible en ligne (<platform>) so let's do
that.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
8 years agoRemove Windsor options from book script
Dan Scott [Mon, 14 Mar 2016 16:54:57 +0000 (12:54 -0400)]
Remove Windsor options from book script

Signed-off-by: Dan Scott <dscott@laurentian.ca>
8 years agoColleague IDs are now alphanumeric
Dan Scott [Fri, 19 Feb 2016 22:03:56 +0000 (17:03 -0500)]
Colleague IDs are now alphanumeric

Signed-off-by: Dan Scott <dscott@laurentian.ca>
8 years agoGuest affiliates map to Reader accounts
Dan Scott [Fri, 19 Feb 2016 22:03:04 +0000 (17:03 -0500)]
Guest affiliates map to Reader accounts

Signed-off-by: Dan Scott <dscott@laurentian.ca>
8 years agoWhen updating a user, do not reset their password
Dan Scott [Mon, 25 Jan 2016 17:33:51 +0000 (12:33 -0500)]
When updating a user, do not reset their password

Also, avoid a logic issue where if we have the barcode in hand it
prevented us from syncing the user's attributes.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
8 years agoRepopulate bookbags based on ACQ funds
Dan Scott [Thu, 15 Oct 2015 20:15:44 +0000 (16:15 -0400)]
Repopulate bookbags based on ACQ funds

Now that we're using acquisitions, commit ourselves to an approach that
populates our existing bookbags using the fund codes.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
8 years agoMake the web form reflect the patron load/update
Dan Scott [Thu, 8 Oct 2015 15:53:38 +0000 (11:53 -0400)]
Make the web form reflect the patron load/update

Now that we sync the LDAP attributes directly through the web form, tell
the user that.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
8 years agoImprove debug output
Dan Scott [Wed, 7 Oct 2015 21:17:59 +0000 (17:17 -0400)]
Improve debug output

For some exceptions, we don't get a message object with an info key, so
be more tolerant.

Also, dump the DN when we dump the general data.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
8 years agoAlumni (from DN) trumps all else
Dan Scott [Wed, 7 Oct 2015 21:17:15 +0000 (17:17 -0400)]
Alumni (from DN) trumps all else

We need to reflect Alumni status, which comes only from the DN, rather
than from the primary affiliation, etc, so trump everything else with
that.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
8 years agoUse the lower-case version of the CN
Dan Scott [Mon, 28 Sep 2015 19:43:17 +0000 (15:43 -0400)]
Use the lower-case version of the CN

Because CamelCase names don't work well when people are logging in with
lower case names.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
8 years agoFix an "always OSUL" thinko
Dan Scott [Mon, 28 Sep 2015 19:41:54 +0000 (15:41 -0400)]
Fix an "always OSUL" thinko

A conditional that always returns true but looks conditional is a little
nasty!

Signed-off-by: Dan Scott <dscott@laurentian.ca>
8 years agoDo not create accounts for applicants
Dan Scott [Fri, 17 Jul 2015 15:14:15 +0000 (11:14 -0400)]
Do not create accounts for applicants

Signed-off-by: Dan Scott <dscott@laurentian.ca>
8 years agoDo a better job of tolerating missing credentials.py
Dan Scott [Wed, 31 Jul 2013 19:32:35 +0000 (15:32 -0400)]
Do a better job of tolerating missing credentials.py

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoAdjust ldap_osrf_sync for generic BC generation
Dan Scott [Thu, 10 Jan 2013 22:10:44 +0000 (17:10 -0500)]
Adjust ldap_osrf_sync for generic BC generation

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoEResource handling improvements
Dan Scott [Tue, 20 Nov 2012 18:55:02 +0000 (13:55 -0500)]
EResource handling improvements

* Add the ability to read (via -F xml) and write (via -T xml) MARCXML
  records. Writing XML records will place one per line, making it
  ideal for inserting into a database via COPY().
* Make the "Mark ISBN for SFX" functionality optional via the -I flag,
  as not all electronic resources have ISBNs. (Hi, journals and music
  records).
* Reduce code duplication significantly

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoInsert fields in order in ebook processing
Dan Scott [Thu, 25 Oct 2012 14:56:54 +0000 (10:56 -0400)]
Insert fields in order in ebook processing

pymarc 2.8.5 offers the add_ordered_field() method for inserting fields
in the correct numerical order in the record - so use that. Note that
you may have to run "easy_install --upgrade pymarc" to get the latest
version of pymarc installed.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoDelete ILL copies as well as ILL call numbers
Dan Scott [Mon, 12 Nov 2012 17:58:42 +0000 (12:58 -0500)]
Delete ILL copies as well as ILL call numbers

Evergreen 2.3 likes to show available copies in the holdings maintenance
window even if the parent call numbers are deleted. So, do what we
should have done before and delete the copies too.

Guard against deleting copies that have been renewed rather than having
their due dates extended.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoEbooks: Only output one record, no matter how many dupes
Dan Scott [Thu, 4 Oct 2012 22:17:12 +0000 (18:17 -0400)]
Ebooks: Only output one record, no matter how many dupes

If you specify dupe-checking by TCN, URL, and ISBN, you only want to
generate one output record per input record, no matter how many types of
matches you get - so short-circuit the logic.

Also, handle the case where you're not specifying all dupe checks :)

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoEbooks: Laurentian's wildcard cert expired, use plain HTTP
Dan Scott [Thu, 4 Oct 2012 21:54:58 +0000 (17:54 -0400)]
Ebooks: Laurentian's wildcard cert expired, use plain HTTP

Rather than frightening people with expired certificate warnings in
their browser, just send them to HTTP. Sigh.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoEbooks: handle multiple dupe options
Dan Scott [Thu, 4 Oct 2012 21:17:04 +0000 (17:17 -0400)]
Ebooks: handle multiple dupe options

process_fields() modifies the base record, and we were inadvertently
running the base record through the ringer every time we checked for
dupes - which would be evidenced by the addition of one 506 and 590 per
consortial member per dupe check we ran.

In the process of cleaning this up, try to dedupe some of our own code
(heh). We can probably go futher but this is a good start.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoEbooks: add an option to clean diacritics
Dan Scott [Thu, 4 Oct 2012 21:16:15 +0000 (17:16 -0400)]
Ebooks: add an option to clean diacritics

Some sets of records seem to come with cleaner diacritics than others.
Huzzah for an increasingly UTF8 world?

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoEbook processing - more pythonic string coercion
Dan Scott [Thu, 4 Oct 2012 19:08:02 +0000 (15:08 -0400)]
Ebook processing - more pythonic string coercion

Avoid the regurgitation of errors due to trying to add a string to an
integer

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoEbooks script code cleanup
Dan Scott [Thu, 4 Oct 2012 18:45:56 +0000 (14:45 -0400)]
Ebooks script code cleanup

Lots of accumulated whitespace / line length code convention issues.
This makes pylint happier (from 8.65 to 9.44).

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoAdding 2 options to prep_ebook_records.py script
Art Rhyno [Thu, 4 Oct 2012 18:32:46 +0000 (14:32 -0400)]
Adding 2 options to prep_ebook_records.py script

This supports 2 additional options to Dan Scott's ebook script:

    -t / --tcn : The name of the file to route TCN duplicates to.

The tcn search takes the 001 and does an OpenSRF open-ils.search.biblio.tcn
call.

   -u / --url : The name of the file to route URL duplicates to.

The url search is based on the 856u field and is done with the OpenSRF
open-ils.search.biblio.multiclass.query call.

Signed-off-by: Art Rhyno <art632000@yahoo.ca>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoAdd a gale code for the Gale electronic resources
Dan Scott [Thu, 4 Oct 2012 18:17:07 +0000 (14:17 -0400)]
Add a gale code for the Gale electronic resources

Every electronic resource provider has to be different, eh? Sheesh.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoAdd Leddy to the list of libraries for circ_date_to_expire
Dan Scott [Thu, 23 Aug 2012 14:56:41 +0000 (10:56 -0400)]
Add Leddy to the list of libraries for circ_date_to_expire

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoLDAP: Create and push barcodes from Web UI
Dan Scott [Mon, 16 Jul 2012 16:24:44 +0000 (12:24 -0400)]
LDAP: Create and push barcodes from Web UI

Now that we're beyond basic testing, go ahead and create accounts or
push barcodes into LDAP for realz.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoEnsure we only generate unique barcodes
Dan Scott [Fri, 13 Jul 2012 15:20:15 +0000 (11:20 -0400)]
Ensure we only generate unique barcodes

Rather than looping over existing barcodes only when we update the
patron account, let's not return duplicate barcodes in the first place,
mmmkay?

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoPrep for use in mod_wsgi
Dan Scott [Wed, 11 Jul 2012 13:46:10 +0000 (09:46 -0400)]
Prep for use in mod_wsgi

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoUse synchronous methods and cleaner results
Dan Scott [Wed, 11 Jul 2012 01:20:41 +0000 (21:20 -0400)]
Use synchronous methods and cleaner results

Rather than calling ldap.result(), which results in awkward lists of
lists which are hard to handle, just iterate over the results from
ldap.search_s() (which, btw, is now a synchronous call).

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoRevert debug code that showed all LDAP attributes
Dan Scott [Tue, 10 Jul 2012 20:48:21 +0000 (16:48 -0400)]
Revert debug code that showed all LDAP attributes

Not that I mind verbosity, but unless you request the custom attributes
specifically, you only get the default LDAP attributes. And I'm more
interested in the custom ones.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoExperimental web.py frontend for creating Conifer accounts
Dan Scott [Tue, 10 Jul 2012 20:25:42 +0000 (16:25 -0400)]
Experimental web.py frontend for creating Conifer accounts

Use web.py to surface a simple Web UI for generating Conifer accounts
based on the Laurentian ID of a given user. Required a little
refactoring of ldap_osrf_sync to make it usable as a module rather than
just as a script, but that's all for the better.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoCarry over the leader from the original record
Dan Scott [Fri, 9 Mar 2012 20:35:36 +0000 (15:35 -0500)]
Carry over the leader from the original record

We iterate over every field of the original record to create the new
record. Except... the leader is not an iterable field. So we were
pushing default leaders onto every new record we were creating. That
is... suboptimal to the max.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoUpdate codes for new located URI scoping behaviour
Dan Scott [Fri, 24 Feb 2012 05:44:19 +0000 (00:44 -0500)]
Update codes for new located URI scoping behaviour

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoAvoid double-proxying boreal links
Dan Scott [Thu, 23 Feb 2012 21:48:11 +0000 (16:48 -0500)]
Avoid double-proxying boreal links

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoAddress encoding errors due to 1st UTF8 usage in options
Dan Scott [Thu, 23 Feb 2012 21:47:08 +0000 (16:47 -0500)]
Address encoding errors due to 1st UTF8 usage in options

We have to tell Python that our strings are UTF-8, naturally.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoAdd Boreal to the ebook handling script
Dan Scott [Thu, 23 Feb 2012 20:18:52 +0000 (15:18 -0500)]
Add Boreal to the ebook handling script

Also simplify some code paths through the power of Python list
comprehensions and dictionaries, instead of repetitive code.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoFully-qualified CN is not a good basis for email addresses
Dan Scott [Thu, 2 Feb 2012 20:09:00 +0000 (15:09 -0500)]
Fully-qualified CN is not a good basis for email addresses

Not unless you really like cn=Foo,ou=Bar@foobar.ca as an email address,
anyway.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoGenerate email addresses where none are in LDAP
Dan Scott [Tue, 24 Jan 2012 21:32:31 +0000 (16:32 -0500)]
Generate email addresses where none are in LDAP

Per discussion with MLaferriere, we should expect to see LDAP entries
without a 'mail' attribute, and should build email addresses based on
the CN. For additional flourish, append @laurentian.ca or
@laurentienne.ca based on the language preference.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoLDAP sync: If EG user found, reactivate
Dan Scott [Mon, 16 Jan 2012 22:53:27 +0000 (17:53 -0500)]
LDAP sync: If EG user found, reactivate

In theory, we won't be asked to create a user that already exists in
Evergreen if they are already there and active. So, go ahead and set the
"active" flag to true and update the account expiry date when we are
asked to create an existing user.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoMore robust identity value handling for LDAP tooling
Dan Scott [Tue, 10 Jan 2012 19:00:16 +0000 (14:00 -0500)]
More robust identity value handling for LDAP tooling

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoAdjust to new values of permission groups in 2.1
Dan Scott [Tue, 10 Jan 2012 18:47:06 +0000 (13:47 -0500)]
Adjust to new values of permission groups in 2.1

We shifted the permission group IDs when we upgraded to 2.1 and have to
compensate accordingly in this hard-coded script.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoAdd located URI update script (PGSQL function)
Dan Scott [Tue, 10 Jan 2012 18:25:38 +0000 (13:25 -0500)]
Add located URI update script (PGSQL function)

Given MARCXML, modifies the 856 $9 subfields to map to owning systems
rather than individual branches to address the located URI visibility
change in 2.1.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoLDAP: More robust processing and error reporting
Dan Scott [Mon, 5 Dec 2011 16:44:30 +0000 (11:44 -0500)]
LDAP: More robust processing and error reporting

Don't die if we don't have an lulColleagueId; spit out the attributes
that we have ready at hand to help identify the problem record.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoDon't srip our own 924 field from the record
Dan Scott [Sat, 12 Nov 2011 05:18:51 +0000 (00:18 -0500)]
Don't srip our own 924 field from the record

Also, a lot of other changes to make the ebrary option actually work.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoEbrary CEL: Work towards ebook requirements
Dan Scott [Sat, 12 Nov 2011 01:59:00 +0000 (20:59 -0500)]
Ebrary CEL: Work towards ebook requirements

Of most importance, copy the incoming 001 value identifying the Ebrary
record into the 924 for use in SFX lookups.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoAdd Boreal preferences for ebooks
Dan Scott [Thu, 10 Nov 2011 19:50:42 +0000 (14:50 -0500)]
Add Boreal preferences for ebooks

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoHandle "thornloe" profile
Dan Scott [Fri, 7 Oct 2011 17:21:55 +0000 (13:21 -0400)]
Handle "thornloe" profile

Apparently our LDAP system or a system upon which it depends is either
enforcing an 8-char limit for some reason, or we have to deal with
typos. Whatever.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoLDAP patron load: map "thornloe" to staff
Dan Scott [Fri, 7 Oct 2011 17:19:43 +0000 (13:19 -0400)]
LDAP patron load: map "thornloe" to staff

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoLDAP patron load: handle more errors more gracefully
Dan Scott [Fri, 7 Oct 2011 17:16:09 +0000 (13:16 -0400)]
LDAP patron load: handle more errors more gracefully

It's possible for users in LDAP to not have email; instead of absolutely
dying, just warn and move on to the next user.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoDon't update the barcode if user was not created
Dan Scott [Wed, 14 Sep 2011 20:47:38 +0000 (16:47 -0400)]
Don't update the barcode if user was not created

Check the return value and bail if the user creation was a failure.
For large updates, one can use --create and --push to update barcodes
for users who already exist.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoUse the new opt_in_override method to search for users
Dan Scott [Wed, 14 Sep 2011 20:03:08 +0000 (16:03 -0400)]
Use the new opt_in_override method to search for users

Now that we have the opt_in_override method, use it to find users who
might exist in any OU in the consortium, rather than just the
workstation OU.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoAdd and use a patron search that overrides opt-in invisibility
Dan Scott [Wed, 14 Sep 2011 20:02:14 +0000 (16:02 -0400)]
Add and use a patron search that overrides opt-in invisibility

Something like this is required for API calls that need to operate
against a number of libraries in a given instance that are using opt-in;
otherwise, attempts to search for users will fail and you may end up
creating near-duplicates etc.

The implementation adds an
open-ils.actor.search.patron.advanced.opt_in_override method to
open-ils.actor, which, if invoked, checks to see if the caller has the
OPT_IN_OVERRIDE permission. If so, then the crazy_search ignores the
normal opt-in limits and searches all pertinent users in the database.

As a global permission, OPT_IN_OVERRIDE is a blunt instrument. Others
might want to put together a more refined version that uses OU depths to
define boundaries.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Conflicts:
Open-ILS/src/perlmods/lib/OpenILS/Application/Actor.pm
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/actor.pm

10 years agoMore defensive error handling
Dan Scott [Wed, 14 Sep 2011 19:00:18 +0000 (15:00 -0400)]
More defensive error handling

When users aren't opted-in, we can't search for them. Fiddlesticks! This
was breaking the script rather annoyingly; now we print out an error and
move on to the next user.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoCorrect a dangling reference to a raw variable
Dan Scott [Wed, 14 Sep 2011 16:33:10 +0000 (12:33 -0400)]
Correct a dangling reference to a raw variable

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoPass User objects rather than raw vars
Dan Scott [Wed, 14 Sep 2011 15:56:09 +0000 (11:56 -0400)]
Pass User objects rather than raw vars

Also strip out functions that are not used in this script relating to
the creation of barcodes.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoHandle new 'Proxy' lulAffiliation a bit more gracefully
Dan Scott [Mon, 12 Sep 2011 21:27:46 +0000 (17:27 -0400)]
Handle new 'Proxy' lulAffiliation a bit more gracefully

In general, if we don't have an explicit profile, just return.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoNew --push-barcode option updates LDAP with Evergreen barcodes
Dan Scott [Fri, 9 Sep 2011 04:45:30 +0000 (00:45 -0400)]
New --push-barcode option updates LDAP with Evergreen barcodes

By default, the --create-users option will update LDAP with the new
barcode that was generated for the new users.

One can also use a --query of some type and pass --push-barcode to
retrieve the barcodes for all of the LDAP users from Evergreen and then
push those barcodes into their respective LDAP accounts.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
10 years agoGenerate barcodes and push them into LDAP
Dan Scott [Tue, 7 May 2013 18:48:51 +0000 (14:48 -0400)]
Generate barcodes and push them into LDAP

Call the new custom API to open-ils.actor for generating barcodes;
accepts one argument, user ID, which gets the barcode set to their new
value. If no arg is passed, just generates a new barcode and returns it
(should be useful on the patron editor screen).

As far as pushing the barcodes into LDAP goes, I can't confirm that the
updates are actually working, because I can't see them, but the lack of
errors suggests that it's working.

Signed-off-by: Dan Scott <dscott@laurentian.ca>