Monday, February 12, 2018

encodeURIComponent, ssh keys, and Gift Books

  1. So this first one surprised me that no one mentioned it before, but I think that is because most librarians got straight to Advanced Search for their catalog searches.

    If you searched our catalog from the main page for a search string with a "&" in it, it would chop the search string and only pass on the first part of the string.

    I think we were okay with this until we switched to the new UI, to fix this I just added a javascript call to encode the URI components in the query.

    query = encodeURIComponent(query);
  2. SSH keys are going to save my fingers some work. I was able to use the technique described here to, to create public/private rsa key pairs so I can just ssh bkelm@libtest,  and I'm directly connected. I then also set up a shortcut in a bookmark to open an SSH connection, ssh://bkelm@libtest-1, and now I just have to choose that bookmark on my mac and I get a shell opened.
  3. I have always wanted to at least return a link to the list of gift books by a given donor . I knew I could do this if I could grab the data from the PNX record, and thanks to Corinna Baksik at the University of Harvard. She shared some examples at ELUNA 2016 which let me try out the following.  First I add a component, that I bind to prmBriefResultAfter, which will use a controller which then has access to the data model of the parent, which is the PNX record. Very cool, so the code below appends a link under our Gift Book line, to look at all Gift Books from a donor.

    I added the script to our Github repository:

No comments:

Post a Comment