Giter Site home page Giter Site logo

caltechlibrary / boffo Goto Github PK

View Code? Open in Web Editor NEW
4.0 7.0 1.0 14.53 MB

Boffo is an add-on for Google Sheets written by the Caltech Library. It lets you select item barcodes in a spreadsheet and retrieve information about the item records from a FOLIO server.

Home Page: https://caltechlibrary.github.io/boffo/

License: Other

JavaScript 60.50% HTML 22.75% Makefile 16.76%
folio folio-lsp google-apps-script google-scripts google-sheet google-sheets javascript library-automation

boffo's Issues

Add tests

This code doesn't have any tests. I need to figure out how to do unit testing in JS.

Adjust selection filter to allow alpha-only barcodes

Boffo as of version 1.6.0 filters the user's spreadsheet selection in the command for looking up barcodes. It filters out anything that doesn't have at least one digit. The only purpose of this particular filter is that I wanted to guard against the user selecting a whole column with a title. If they have a spreadsheet like

Our Barcodes
────────
0930950
0930951
0930952
...

etc., and they select the whole column instead of selecting just the cells containing barcodes, I wanted to filter out the text "Our Barcodes" (or whatever they might have written in the header row) because in the output, Boffo creates a new sheet where the first column has a title (and the title is "Barcodes").

In a conversation with Kyle Banerjee on the code4lib Slack on 2023-09-01, I learned that some other sites do have barcodes that have no digits in them. This would be a problem for Boffo, which would ignore those barcodes completely.

I'm not sure what the solution is going to be. Maybe there needs to be a user preference setting that allows them to say "allow anything" or something like that.

Add a progress bar dialog with a cancel button

Currently, you can't cancel an ongoing lookup. You can only stop it by refreshing the browser page, but that's not obvious. Better would be to have a typical progress bar dialog and add a cancel button that the user could click to stop things deliberately.

Fetch multiple barcodes at once

Turns out it's possible to look up multiple barcodes in one API call. Use OR in the CQL query, and make sure to encode the spaces. Roughly like this:

OKAPI-URL/inventory/items?query=barcode=12345%20OR%20barcode=45678

Also watch out for the maximum length of the URL.

Add function to look up by call numbers

The library staff would like a way to get the records for items that span a range of call numbers. My current thinking is that it would work roughly like this:

  1. user selects a range of cells in the spreadsheet containing barcodes
  2. Boffo looks up all the items
  3. Boffo determines which call numbers are the bounds of the range of call numbers covered by the selected cells
  4. Boffo does a Folio lookup based on wildcarding the call numbers, somehow

Detect if user clicks "x" to close dialogs

If the user clicks "x" in the upper right-hand corner in a dialog like the folio credentials dialog, Boffo does not detect it and doesn't do the right thing for canceling the process.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.